IIS7 a workaround for HTML that already exists after URL rewrite

Source: Internet
Author: User
Tags stack trace
This article describes the next iis7 under the URL rewrite, the original existence of HTML can not be accessed, failed to execute the URL (asp.net to the real. HTML (but not conforming to the rules) do not know how to deal with the situation, friends can refer to the following

When the URL of the. html is handed to ASP.net (IIS no longer intervenes), the pseudo. HTML can correspond to aspx execution, while ASP.net does not know what to do with the real. HTML (but does not conform to the rewrite), causing the request not
for any treatment.

The following error occurred:

Server error in '/' Application.
--------------------------------------------------------------------------------
The URL could not be executed.
Note: An unhandled exception occurred during the execution of the current WEB request. Check the stack trace for more information about the error and where the error occurred in the code.
Exception Details: System.Web.HttpException: Failed to execute URL. ”

Treatment methods:

Copy Code code as follows:
Webconfig files are configured under the httphandlers node:
<add verb= "*" path= "*.html" type= "System.Web.StaticFileHandler"/>

Ok

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.