App works locally, bombs remotely

J

John

Hi

I have a very simply app with a single web form with a single button on it
and has the following code;

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Response.Write("Hello world!")
End Sub

This works fine on my local win2k server but when I upload to a remote
server I get the error given at the end. As I can see no specific error
message, I have no idea what the problem is. How can I proceed form here to
solve this problem?

Thanks

Regards


Server Error in '/' Application.

Runtime Error
Description: An application error occurred on the server. The current custom
error settings for this application prevent the details of the application
error from being viewed remotely (for security reasons). It could, however,
be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable
on remote machines, please create a <customErrors> tag within a "web.config"
configuration file located in the root directory of the current web
application. This <customErrors> tag should then have its "mode" attribute
set to "Off".
 
J

John Saunders

Details: To enable the details of this specific error message to be viewable
on remote machines, please create a <customErrors> tag within a "web.config"
configuration file located in the root directory of the current web
application. This <customErrors> tag should then have its "mode" attribute
set to "Off".

John, have you tried the suggestion above? Add a <customErrors> tag with
mode="Off", or modify the existing <customErrors> tag to have mode="Off".
You will then be able to see the precise error.
 
J

John

Hi

Below is the web.config that I am already using. Do I need to do anything
else to see the error messages?

Thanks

Regards

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="Off" />
<authentication mode="None" />
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
<trace enabled="true" requestLimit="10" pageOutput="true"
traceMode="SortByTime" localOnly="true" />
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
</configuration>
 
J

John Saunders

John said:
Hi

Below is the web.config that I am already using. Do I need to do anything
else to see the error messages?

No, you don't. This should do it.

If that doesn't work, you'll have to resort to trapping the error in
global.asax (Application_Error handler) and displaying it somewhere. One way
would be to use HttpContext.Trace.Write. In your <trace> element, change the
localOnly attribute to "false". Then, in the Error event, you can use:

Context.Trace.Write(Server.GetLastError().ToString())
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top