문제

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/<account-name>/default.aspx to http://localhost/<virtual-directory>/default.aspx?AccountName=<account-name> 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/<account-name>/... (which I want it to do) and after the upgrade the tilde resolves to http://localhost/<virtual-directory>/... 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!

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top