Saturday, March 31, 2012

web.config error

i have a web.config and whe ni uploaded it to site , below error raise :

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

<!-- 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
but when i delete that file , allthing is right
why this error raise . i have a connection string in this file and use that to my code
how can i coorect this?Keep <customErrors mode="Off"/> in web.config and see what error you are getting and then correct it and then again change it to On or remoteOnly!

Hope it helps!
i turn custom error on and of and remoteonly ,but that error raise without any more information
Then I guess, the problem would be in web.config file. That's why you are keep on getting that error.

Please make sure your web.config file is correct! If possible try to open the page in the server it self! Probably that would helps you!

0 comments:

Post a Comment