Controller action doesn't call if URL parameter is long

后端 未结 1 1282
轮回少年
轮回少年 2021-01-07 15:21

FYI: My question is not a duplicate of 404.20 for long url in MVC 3 so kindly do not confuse.

I have an Asp.net MVC application where I have a actio

相关标签:
1条回答
  • You got this error because there are too many URL segments in the request.

    Check this: http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-80-express-readme
    IIS 8.0 Express returns an HTTP 404.20 error for Too Many URL Segments.


    UPDATE:

    Follow the site below to change the limit of URL segments count.(The default value is 32.)

    http://blogs.msdn.com/b/vijaysk/archive/2012/10/11/iis-8-what-s-new-website-settings.aspx

    After changing the configuration, the url will pass the validation of segments count.

    Now error will throw about exceeding the maxUrlLength.

    You need to add following content to the <system.web /> section of your Web.config file.

    <httpRuntime maxUrlLength="9999" maxQueryStringLength="9999" />
    

    Then your long request url with many segments works finally!!!

    0 讨论(0)
提交回复
热议问题