WCF(如何克服urllength限制) [英] WCF(How to overcome urllength restriction)

查看:50
本文介绍了WCF(如何克服urllength限制)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





当我的请求网址长度时,我遇到了问题。我的浏览器异常是错误的请求 - 无效的网址HTTP错误400.请求网址无效。如果我更改我的网址大小然后响应正确。我尝试通过更改网址最大长度更改IIS设置仍然问题仍然存在。我也尝试更新此链接中给出的注册表(stackoverflow.com/questions/15004232/wcf-get -url-length-limit-issue-bad-request-invalid-url)这也行不通。



任何人都有解决方案请回复此帖。









问候

Vijay

Hi,

Iam having issue when my request url length .Iam getting browser exception as Bad Request - Invalid URL HTTP Error 400. The request URL is invalid.If i change my url size then response is coming correctly.I tried changing IIS setting by changing url max length still the issue remain.I also tried with updating the registry given in this link(stackoverflow.com/questions/15004232/wcf-get-url-length-limit-issue-bad-request-invalid-url) this also not worked.

Any one have the solution for this please reply to this post.




Regards
Vijay

推荐答案

更新:解决方案



我找到了一个对我有用的解决方案,当我进一步研究时就此而言。我在这里更新,因为它可能对遇到这个问题的其他人有用。



这是一个IIS设置



问题是因为,REST url中每个参数的默认字符限制是260,它是在注册表中定义的。



所以,你必须更新注册表以增加IIS服务器/ IIS Express运行时的大小限制。



以下是注册表的位置:



HKEY_LOCAL_MACHINE \SYSTEM\CurrentControlSet \services \HTTP \Parameters



值名称为UrlSegmentMaxLength。如果不存在,请使用类型REG_DWORD创建一个。并为值数据指定更高的值,例如十六进制的1000或十进制的4096.



这是一个http.sys设置。有关http.sys设置的更多信息:http://support.microsoft.com/kb/820129



确保重启服务器/机器以应用注册表更改。就是这样。
UPDATE: SOLUTION

I Found a solution which worked for me, when I research further on this. I'm updating here since it might be useful for others who come across this question.

This is an IIS Setting

The problem is because, the default character limit of each parameter in REST url is 260 which is defined in the registry.

So, you have to update the registry to increase this size limit where the IIS Server / IIS Express is running.

Following is the location of Registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters

And the value name is UrlSegmentMaxLength. If it is not there, create one with Type of REG_DWORD. And specify a higher value for value data such as 1000 in hexadecimal or 4096 in decimal.

This is a http.sys setting. More about http.sys settings : http://support.microsoft.com/kb/820129

Make sure, you restart the server/machine to apply the registry changes. And that's it.


这篇关于WCF(如何克服urllength限制)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆