我的浏览器中有这个网址:
https://localhost/service.svc/Add?clientGuid=cf4cca29-e144-4e6a-8485-792f809d84cc
&contractId=6
&endSession=False
&GroupIds='0,1,2,3,4,5,6,7'
&FamilyIds=
&PartNumbers=
我的网络服务机器中有以下方法:
[WebGet]
public void Add(string clientGuid,
int contractId,
bool endSession,
string GroupIds,
string FamilyIds,
string PartNumbers)
{
...
}
但是访问该网址会给我以下异常:" 400错误请求 - 查询语法错误"
答案 0 :(得分:1)
GUID忽略报价:
https://localhost/service.svc/Add?clientGuid=guid'cf4cca29-e144-4e6a-8485-792f809d84cc'
&contractId=6
&endSession=False
&GroupIds='0,1,2,3,4,5,6,7'
&FamilyIds=
&PartNumbers=