Web Config Error?

S

Sam

Inquiry?
--------
I would like to authenticate all subdirectory via asp.net at Windows Server
2003 and IIS 6.0 but it prompt an error message as shown as below:

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".

<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom
error page by modifying the "defaultRedirect" attribute of the application's
<customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>


WEB CONFIG
----------------
Please find my web config file.

<!-- Web.Config Configuration File -->
<configuration>
<appSettings>
<add key="ConnectionString"
value="server=SQLSVR;database=ERP;uid=Intranet;pwd=88;" />
</appSettings>
<system.web>
<customErrors mode="Off"/>
<authorization>
<deny users="?"/>
</authorization>
<authentication mode="Forms">
<forms name="Intranet"
loginUrl="http://SQLSVR/Finance/authentication.aspx" protection="All"
path="/" timeout="20"/>
</authentication>
</system.web>
</configuration>

Please help and advise.

Many thanks.
 
L

Lau Lei Cheong

The actual error can only be seen if you view the page locally with
"customErrors mode="RemoteOnly"" or on any client with "customErrors
mode="Off""

If you can't fullful either condition, you can only see that page which has
not much use in terms of debugging.
 
G

Guest

Dear Sam,

The error you see is a generic error. Please check your web.config file is
properly formed. It is an xml file, case sensistive and even leading spaces
can give error.

If you are getting this error despite your web.config's custom error
settings set to "off", then the possible chance could be with your
web.config's tag formation only.

Try copying the contents of the web.config into a notepad, save as an xml
file and try to browse the file. If the tags are well formed, the xml will
be rendered in your browser. Else, it will throw the error in the specific
line.

Write back if the error still persists.

Thanks.
 

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

No members online now.

Forum statistics

Threads
474,056
Messages
2,570,439
Members
47,101
Latest member
DoloresHol

Latest Threads

Top