views:

115

answers:

1

My team is upgrading from ASP.NET 3.5 to ASP.NET 4.0. We are currently using Helicon ISAPI Rewrite to map http://localhost/&lt;account-name&gt;/default.aspx to http://localhost/&lt;virtual-directory&gt;/default.aspx?AccountName=&lt;account-name&gt; where <account-name> is a query string variable and <virtual-directory> is a virtual directory (naturally).

Before the upgrade the tilde (~) resolved to http://localhost/&lt;account-name&gt;/... (which I want it to do) and after the upgrade the tilde resolves to http://localhost/&lt;virtual-directory&gt;/... which results in an error because the <account-name> query string is required.

I'd like to avoid going down the road of replacing everything with relative paths because there are several features in our system that use the entire URL instead of just the relative path.

For what it's worth I'm using IIS7 in Windows 7, Visual Studio 2010 with ASP.NET 4.0 and the 64 bit Helicon ISAPI Rewrite. If I switch back to the ASP.NET 3.5 version then it still works fine (leading me to believe nothing changed in IIS unless it's within the 4.0 app pool - when I switch back and forth between 3.5 and 4.0 I have to change the app pool in IIS).

Any ideas? Thanks in advance!

+1  A: 

IIS 7 has a decent http redirect support. so you may not need to use that ISAPI filter anymore

http://technet.microsoft.com/en-us/library/cc732969(WS.10).aspx

another way around using ISAPI would be to use HTTP Module redirect.

http://weblogs.asp.net/fmarguerie/archive/2004/11/18/265719.aspx

Sonic Soul
Thanks for the link! Unfortunately there are still some developers on our team as well as some servers that are still using IIS6 so until they upgrade we'll probably need to stick with Helicon ISAPI.
Adam
hmm ok.. edited my answer to include the HTTP module way
Sonic Soul
Thanks! I'm hoping to stick with Helicon just so we don't have to migrate and test all the rewrites. But if it comes to that then it's good to know that I can use the HTTP Module redirect. I'm also curious to about what the underlying issue is. Maybe .NET 4.0 doesn't play nice with Helicon...if that's the case then HTTP Module Redirect sounds like the way to go.
Adam
it's your call.. but i can't imagine maintaining isapi filters is that easy, where as HTTP modules are managed .net code. offers greater flexibility and easier maintenance, so may be worth looking into..
Sonic Soul
ISAPI rewrite is very easy to maintain. All of the rewrite rules go in a text file that lives in the web folder root. It's source controlled and deployed just like everything else.
David Lively