开发者

Issue with URL length in IIS7 (Windows Server 2008)

i have an issue with url lengths in iis7. If you go to:

http://www.somesite.com/myaccount/login.htm?ReturnUrl=aa2Fmyaccounta2FdefaultaaspxadnoaauserSuppliedIdentifierahttpa3Aa2Fa2Faaaaaaamaapenidacoma2Fadnoaareturnatoasigahandleaa7B633942228855348748a7Da7BaRINLQa3Da3Da7DadnoaareturnatoasigaxSa2FFPGusD7UvskGqfkJq4QtEYjc4fSVFoa2F3sXNwCBteGOBJ8mipo7yLsuSk2hEgLogbzn6SthYb0wY3pBQM1OQa3Da3Daopenidaassocahandleaa7BHMACaSHA256a7Da7B4b051c2ba7Da7ddufPa2BAa3Da3Da7Daopenidaclaimedaidahttpa3Aa2Fa2Faaaaaaaaaopbnidacoma2Faopenidaidentityahttpa3Aa2Fa2Faaaaaaaabcpenidacoma2Faopenidamodeaidaresaopenidansahttpa3Aa2Fa2Fspec

The page will load fine but if you add one more character to the end it will throw an error. This might seem abit picky to you but it's stopping me from using open id on my login form sinc开发者_JAVA技巧e it returns a long url. One option i did consider was changing the requestFiltering, therefore in my web.config i have the following:

<system.webServer>
    <security>
        <requestFiltering>
            <requestLimits maxQueryString="999999999" maxUrl="999999999" />
        </requestFiltering>
    </security>
</system.webServer>

But this did not resolve the issue. I'd appreciate it if someone could help. Thanks


nfplee - Are you using Ionics Isapi Rewrite Filter (IIRF) by any chance? I just ran into the same issue where long urls always returns a 404.

If I disable IIRF everything works fine.


This is a limitation of Windows and there is currently no workaround

See this StackOverflow article for more information:

ASP.NET url MAX_PATH limit


You may do something in web.config as follows.

<system.web>
  <httpRuntime maxUrlLength="4000"/>
</system.web>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜