ASP.NET generates an eurl.axd Http exception error handling method

  • 2020-05-12 02:28:05
  • OfStack

After both ASP.NET 2.0 and ASP.NET 4.0 are enabled in IIS6, the website application may have the following error: "System.Web.HttpException: Path '// eurl.axd/' was not found."

The cause of the error is that when ASP.NET detects that the Web site is configured to use ASP.NET 4.0, the local ASP.NET 4.0 component passes a non-extensible URL hypervisor to ASP.NET for further processing. However, if a website below ASP.NET 4.0 is configured to use ASP.NET 2.0 to handle such non-extensible URL, the URL modification result will contain the string "eurl.axd" and the modified URL will be sent to the ASP.NET 2.0 application.

"eurl.axd" is not recognized in ASP.NET 2.0. So ASP.NET 2.0 will try to find a file called "eurl.axd" and execute it. Because there is no such file, the request fails, Http exception is thrown and an error with the string "eurl.axd" is thrown.

There are three ways to solve this problem:

1. If the website program does not require ASP. .0 support, then you can configure the website directly using ASP.NET 2.0.

2. If the website program requires ASP. NET With support for.0, you need to move the virtual directory using ASP.NET 2.0 from that site to another site.

3. If neither of the above methods is applicable to your situation, this is the only way to use it:

Open the registry and find "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\ ASP.NET \4.0.30319.0", add the key value of "EnableExtensionlessUrls" of type "DWORD" and set the value to "0". Then run "IISRESET" in cmd and restart IIS to read the registry changes. Note: this modification is to close ASP. .0 for the processing of URL without extension, if this key is set to "1", it is turned on.

Related articles: