IIS7.5 How to display verbose error messages _win server

Source: Internet
Author: User
Tags web hosting

With the increasing number of users using the WIN7/WIN2008/R2 operating system, Win7, if the program fails, IIS7 will prompt for a simple error message for HTTP error 500-internal server error (500-Internal server error). These simple messages are friendly to the user, but make the development testers unclear about specific error messages. How do I get the Win7 to display detailed error messages? You can configure IIS7 to output verbose error messages.

Configuring through IIS

1, open IIS Manager, or hold down the WIN + R Open command Line Input inetmgr open IIS Management

2, the left directory to select the target site, in the right-hand side of the IIS block, double-click the "error page"

3. In the error page, in the action item on the right, select Edit feature Settings

4, in the Error responses, select Detailed errors, stand-alone OK complete configuration.

Configuration via Web.config

In fact, the above in both configurations, will eventually be reflected in the corresponding web.config. Therefore, we can directly edit web.config. In particular, for a purchased virtual host (Shared Web Hosting), there is no permission to change IIS. Open the Site directory, find the Web.config file (if not, build a TXT file Save as Web.config), find the System.webserver configuration section, add Configuration .

<configuration>
  <system.webServer>
     
 

Attention
This parameter option can be applied to a Web site or subdirectory or to a virtual directory.
This parameter option is valid for all IIS applications, including ASP, Aps.net, PHP, and so on.
If it is a asp.net program, you may also need to configure<customErrors mode="Off" />

<system.web> 
  <customerrors mode= "Off"/>
</system.web>

Configuring through IIS
1, open IIS, or hold down the WIN + R Open command Line Input inetmgr open IIS Management
2, the left directory to select the target site, in the right-hand side of the IIS block double-click "ASP"
3. Expand the Debug Properties node in the ASP page
4, find "Send error to Browser", select True
5, application can be.

In addition, if you are an ASP program, you can also configure the Senderrorstobrowser option.

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.