Error. aspx? Aspxerrorpath1_404.htm? Cause and solution of aspxerrorpath =

Source: Internet
Author: User
Description of aspxerrorpath =

1. If the webpage cannot be opened, an error. aspx prompt will be displayed after you enter the URL? Aspxerrorpath =/about-us.html, what is the reason?

2. The ASP Website has a custom 404 error page. However, when accessing a website that does not exist, the aspxerrorpath parameter is always displayed after the website error page. How can this problem be solved?

3. When you access http://www.sowsoy.com/zmd/tbzmd-catindex.htm, a blank page is displayed for the retrieval of the Wanfang database ...... /404.html? Aspxerrorpathwhen tbzmd-catindex.htm?

Why aspxerrorpath = appears on the URL

This is a mechanism to handle errors. If the website program encounters an exception, or the visitor does not have the permission or the operation has an error, the webpage will be displayed by redirecting the professional error, at the same time, add this parameter to the URL of the error display page. If this parameter is not directed to this page, the program will report that the simple page does not exist or the error prompt is white.

1. The error page is configured in the web. config configuration file. The user has accessed a website that does not exist.

Currently, the website usually customizes the 404 error page. If the accessed website does not exist and is redirected to the custom 404 error page, the aspxerrorpath = parameter may be added to the website. In web. config, customerrors can define the 404 error page. For detailed configuration parameters, see <customerrors> in Web. config. For example, the configuration file of a website is as follows:

 

...
<Customerrors mode = "remoteonly">
<Error statuscode = "404" Redirect = "/error.html"/>
</Customerrors>
...

 

Here customerrors errors? Aspxerrorpath = ......

2. website code running error

If the website code DLL does not match the page, a system error occurs during running, and this problem occurs when you go to the error page.

3. Website intrusion by hackers

After a website is infiltrated by hackers, normal pages accessed by users may be maliciously redirected. If you jump to a page that does not exist and add a 404 error redirect setting, the aspxerrorpath = parameter can appear in the website.

Solution to aspxerrorpath = On the URL

1. Set customerrors in Web. config to off

In this case, the custom 404 error page becomes invalid. If you access a webpage that does not exist, the browser will pop up a simple page that does not exist. If you want to see the custom error page, you can set custom error pages on the server.

2. recompile the website code

If the website code is incorrect, recompile the code and update it to the server.

3. Website repair

If the website is hacked, you can try to fix it in these ways.

How does the IIS URLScan module disable URLs with aspxerrorpath = parameter query string to access your ASP. NET application?

First, install URLScan. After installation, find the configuration file.

% Windir % \ system32 \ inetsrv \ URLScan. ini

And open it. At the bottom of URLScan. ini, you can find the [denyquerystringsequences] area. Add "aspxerrorpath =" under the region, for example, and save the file

 

[Denyquerystringsequences]
Aspxerrorpath =

 

This function is used to disable the "aspxerrorpath =" query string in URLs to access your ASP. NET application, and the Web server returns an HTTP Error.

After saving it, run "iisreset" (under the Administrator permission) to make it take effect. To check whether the query string is effective, you can use the URL that contains the query string to visit your site or application to see if an HTTP Error is sent from IIS.

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.