开发者

Cannot get IIS7 and .NET 3.5 to allow urls containing colons

We are currently transitioning from php (apache) to a MVC web site on IIS 7. We have a large number of legacy urls to support (to keep google happy) which contain what IIS 7 considers to be invalid character开发者_如何学Pythons specifically : and &.

We have applied the standard fix blanket fix to allow these special characters through i.e.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET]
"VerificationCompatibility"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters]
"AllowRestrictedChars"=dword:00000001

and although we can now get & to work the colon will fail with the following error

[NotSupportedException: The given path's format is not supported.]
System.Web.Configuration.ProcessHostMapPath.MapPathCaching(String siteID, VirtualPath path) +868         
System.Web.Configuration.ProcessHostMapPath.System.Web.Configuration.IConfigMapPath2.MapPath(String siteID, VirtualPath path) +9

It looks like all of this is catered for in .NET 4.0 but we need to release against 3.5 for now.

Has anyone got support for urls containing colons working on Iis 7 and .NET 3.5 ?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜