Asp.net Server Error in Application solution

Source: Internet
Author: User
Tags html tags iis

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.