Server Error in Application

I get an error, like all other pages that work fine, but I get an error. I added a new page on my site locally. It works.

Server error in application "/".

Runtime Error Description: Application error on the server. The current user error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). However, it can be viewed by browsers running on the local server.

Details To include the details of this specific error message for viewing on remote computers, please create a tag inside the configuration file "web.config" located in the root directory of the current web application. Then this tag should have its Attribute "mode" set to "Off".

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

Notes. The current error page that you see can be replaced with a custom error page by changing the defaultRedirect attribute of the application configuration tag to point to the user URL of the error page.

 <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web> </configuration> 
+4
source share
1 answer

If you want to know what the error is, modify the web.config file as follows:

  <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration> 

Basically, the error you get tells you to do this so that you can see the actual error.

A warning. If your site is on the Internet, anyone trying to browse will see the exact error message. This can be a security issue, as it can allow people to see parts of your code or even configuration.

+2
source

Source: https://habr.com/ru/post/1432006/


All Articles