We often encounter errors such as Server Error in Application. errors. Below I will summarize some solutions to this problem. For more information, see.
Error message:
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 cocould, 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 shoshould then have its "mode" attribute set to "Off ".
The Code is as follows: |
Copy code |
<! -- 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> |
Cause Analysis
Because the network service group does not have sufficient permissions for temporary ASP. NET file folders, this problem occurs when you install Active Directory to install IIS 6.0 and ASP. NET.
Solution
This is because the content contains html tags and the following attributes are added to web. config:
The Code is as follows: |
Copy code |
<System. web> <HttpRuntime requestValidationMode = "2.0" type = "codeph" text = "/codeph"/> </System. web> |
The error information shown above is not a real error message. If you want to see a real error message, you can use either of the following methods,
The first method is to open the website on the server to view the specific error message.
In the second method, follow the error message to modify the mode in the customErrors node in the web. config file to Off, and then open the website to see the specific error information.
Method 3
If the binfile is not deployed, put the DreamweaverCtrls in the binfile. copy the dll file, delete the binfile, and create a new binfile under the previous directory to run DreamweaverCtrls. paste the dll in. If the problem persists, it is a problem with iis.
You need to, Start, Run, cmd, and enter cd C: WINDOWSMicrosoft. NETFrameworkv2.0.50727, and then press Enter. Then, asp.net is being installed. After the installation is complete, restart iis. the startup method is as follows: right-click my computer, manage, services and applications, right-click Internet information service, and choose all tasks to restart iis,
This should be done.