WebAPI中路由参数中包含字符-点‘.’, 比如:http://localhost:30695/api/studies/1.1.1.1.1
时间:2015-07-08 00:37:53
收藏:0
阅读:325
??
DICOM RESTFul服务中好多请求url都是类似:{SERVICE}/studies/{StudyInstanceUID}, UID如1.2.156.112605.75006881735343.1369658683.4.4.1。我们默认建立的Asp Net WebApi 服务时,如果请求url包含‘.‘,则返回404错误。
解决办法:
需要在web.config文件中添加如下节点。
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文:http://blog.csdn.net/muzizongheng/article/details/46795267
评论(0)