您好,我有 WCF 服务 如果我使用超过 260 个字符变量的路径调用,则 url 不起作用 有人有什么建议吗?
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime maxUrlLength="32766" maxQueryStringLength="2097151" maxRequestLength="2097151" requestValidationMode="2.0" relaxedUrlToFileSystemMapping="true" />
<customErrors mode="Off"/>
</system.web>
<system.serviceModel>
<bindings>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="DToolsSynchronizationService.SyncService">
<endpoint kind="webHttpEndpoint"
contract="DToolsSynchronizationService.ISyncService" />
</service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
我有 IIS 7,它在 64 位 Windows Server 2008 中运行
我正在打开 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters]
我右键单击参数选择新的 dword 32 位值我将其命名为
MaxFieldLength(我选择十六进制)输入 fffe 即 0x0000fffe (65534)
MaxRequestBytes(我选择十六进制)输入 1000000 即 0x0000fffe (16777216)
UrlSegmentMaxLength(我选择十六进制)输入 fffe 即 0x001fffff (2097151)
就像在图片中一样https://dl.dropbox.com/u/541519/fb/reg.png
我重新启动服务器,但仍然只能看到 260 个字符。我究竟做错了什么
我还打开了 iis 以将请求过滤设置为正确的值(查询字符串->启用设置 2097151 以获取最大 url 长度,最大查询字符串)