Web Config Error?



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 -->
<customErrors mode="Off"/>

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 -->
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>

Please find my web config file.

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

Please help and advise.

Many thanks.

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

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


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

Write back if the error still persists.


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

Latest member

Latest Threads