【发布时间】:2013-08-01 09:39:31
【问题描述】:
我正在开发一个 web-api,我已将 web 配置文件设置为接受 6144 作为 url 的最大长度,如下所示
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime maxUrlLength="6144"
relaxedUrlToFileSystemMapping="true"
targetFramework="4.5"/>
当我使用 299 个字符调用 api 时,一切正常,但超过 299 个字符时,它会提供错误请求 - 无效 URL
示例网址:
http://localhost:56835/api/multibuys/10270001C1001034900|10358419P4001027620|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|
【问题讨论】:
-
尝试使用 IIS express 而不是 Cassini。
-
也许这篇文章对stackoverflow.com/questions/1185739/…有帮助
标签: asp.net-web-api