|
-
Dec 23rd, 2005, 04:02 AM
#1
Thread Starter
New Member
[RESOLVED] Problem getting started
I'm getting an error when I run my asp.net site on my host, that I don't get when I run it locally. Unfortunately 'for security reasons' I'm not told what the error is. My host doesn't seem to provide the ability to view my site 'on the server', as some do, so I need to know how to display the real error. The error page tells me how to do this:
...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".
My site was created using Web Developer 2005 Express, and currently consists of the word 'Test', a textbox, and a button. The button has the code 'MsgBox("test")'. As already mentioned, it displays OK locally, and the button works correctly. The error ("Server Error in '/' Application") occurs when I run the same page online.
WD created a web.config file which already had a <customErrors> tag, so I modified it as follows:
<customErrors mode="Off"/>
'<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
'<error statusCode="403" redirect="NoAccess.htm" />
'<error statusCode="404" redirect="FileNotFound.htm" />
'</customErrors>
...i.e. I commented out the original code and added the suggested code. I still get exactly the same error. (I've also tried it with the </customErrors> not commented out.)
Any idea what I need to do to enable viewing of the 'real' error? Or why my site won't display pages with associated code? (The site supports asp.net and is configured for v2.)
Thanks!
-
Dec 23rd, 2005, 07:04 PM
#2
Re: Problem getting started
Just have a
<customErrors mode="off"/>
there.
And note, using an apostrophe isn't the way to comment out lines in an XML file. Either delete them, or use <!-- -->
-
Dec 24th, 2005, 06:53 AM
#3
Thread Starter
New Member
Re: Problem getting started
Thanks Mendhak, a bit of beginner's idiocy there on my part - I got so used to VS opening VB pages I didn't even notice I was editing XML. Correcting the comment worked!
-
Dec 24th, 2005, 07:43 AM
#4
Re: [RESOLVED] Problem getting started
BTW, this is the ASP 3.0 forum, for classic ASP and VBScript. ASP.NET is a little further down.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|