WCF: Call Service using parameter in URL with &

余生长醉 提交于 2019-12-21 11:33:06

问题


I have my WCF service with URL template like..

http://localhost:8448/service/SearchProduct/{productid}/{categoryid}/{search}/{pageSize}
/{currPage}

Here, I want to call this service path by using & parameters in the URL, like..

http://localhost:8448/service/SearchProduct/?productid=10&categoryid=34&search=newproducts&pageSize=10&currPage=5

But when I call service using above path, I got the exception "Endpoint not found."

Could you please tell me How would I call this service by using passing parameter in the URL with &categoryid=10&currPage=10 ??

Thanks in Advance!


回答1:


Try to modify your URI template like that :

http://localhost:8448/service/SearchProduct/?productid={productid}&categoryid={categoryid}&search={search}...

It should work



来源:https://stackoverflow.com/questions/6408041/wcf-call-service-using-parameter-in-url-with

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!