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"/>


Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.