Note that there are some explanatory texts on larger screens.

plurals
  1. POGlobal.asax not firing for .aspx pages in IIS7
    primarykey
    data
    text
    <p>We run a link redirection service which can handle links thrown at it in various formats. One of these formats is to append the destination URL to the end of the link, for example</p> <p><a href="http://url.fwd/abcd/http://www.mydomain.com/page.aspx" rel="nofollow noreferrer">http://url.fwd/abcd/http://www.mydomain.com/page.aspx</a></p> <p>This was working on a Windows Server 2003 / IIS6 box for the last two years, but now we're trying to move to a Windows Server 2008 / IIS7 setup and its not working anymore. </p> <p>I've read about the problem with colons in the URL but it doesn't affect pages not ending in '.aspx'. For instance, </p> <p><a href="http://url.fwd/abcd/http://www.mydomain.com/page.php" rel="nofollow noreferrer">http://url.fwd/abcd/http://www.mydomain.com/page.php</a> </p> <p>would redirect fine.</p> <p><a href="http://url.fwd/abcd/http//www.mydomain.com/page.aspx" rel="nofollow noreferrer">http://url.fwd/abcd/http//www.mydomain.com/page.aspx</a> </p> <p>also works fine (note the lack of a second colon). Despite being the wrong URL, it does get handled by our URL forwarding system, which uses a custom 404 page. On the old system, we had a similar problem, so a method was written in Global.asax > Application_Error specifically to handle the '.aspx' case, and it worked fine. </p> <p>On our new server, the Application_Error never gets thrown in Global.asax. Instead, I get a System.NotSupportedException - "The given path's format is not supported". This System.NotSupportedException is the exact case we handle in the Global.asax page, so it's definitely not being fired. </p> <p>I've changed the registry keys indicated in several forum posts, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET VerificationCompatibility=1 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP|Parameters AllowRestrictedChars=1</p> <p>I've tried changing the Handler Mappings settings for .aspx.</p> <p>I've tried setting the App pool to use classic mode instead of integrated, but this causes a completely different error where static content such as images and CSS do not display at all. I've checked that static content is enabled in the windows features, and it is. Under classic mode, the '.aspx' request throws two Bad Request errors with absolutely no information whatsoever. The code of the error page I get is literally </p> <p>Bad Request&lt;html&gt;&lt;body&gt;Bad Request&lt;/body&gt;&lt;/html&gt;</p> <p>UPDATE: I've changed the static file Handler Mapping to the form found in this page <a href="http://improve.dk/blog/2006/12/11/making-url-rewriting-on-iis7-work-like-iis6" rel="nofollow noreferrer">http://improve.dk/blog/2006/12/11/making-url-rewriting-on-iis7-work-like-iis6</a> However, as the author rightly points out, this is a hack and not the correct way of doing things under IIS7. It also only fixes the static file problem in classic mode. '.aspx' pages still throw an error under classic mode. </p> <p>Any thoughts or input would be greatly appreciated at this point. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload