ASP.NET 4.0, Extensionless Urls, and the eurl.axd errors

20 Apr ASP.NET 4.0, Extensionless Urls, and the eurl.axd errors

Tuesday April 20, 2010

Apparently ASP.NET 4.0 has something special for “extensionless URLs”—which is what we get from using ISAPI_Rewrite on our Windows Server 2003 machines. The symptom we were seeing was that the URL Rewriting kept unexpectedly returning something similar to this:

eurl.axd/ADkfjsFiSofmaWOeiejrlErF

so rewriting something like:

/myrewrite/articleID/articleName/

would end up rewriting to:

/myrewrite.aspx?id=eurl.axd/ADkfjsFi…..

On the server’s Registry Editor (regedit) I followed this article’s “option 3” and turned off the EnableExtensionlessUrls, which is a DWORD set to 0 (zero) within HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\4.0.30319.0 —then you must run theh iisreset command-line tool.