WCF:使用参数的URL与&放呼叫服务; [英] WCF: Call Service using parameter in URL with &

查看:220
本文介绍了WCF:使用参数的URL与&放呼叫服务;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有网址模板我的WCF服务,如..

I have my WCF service with URL template like..

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

在这里,我想通过使用与放大器来调用这个服务路径;在URL参数,如..

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."

能否请你告诉我,我怎么会调用这个服务通过在URL 与&安培;类别id = 10安培;!提前currPage = 10 ??

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

感谢

推荐答案

尝试修改您的URI模板那样:

Try to modify your URI template like that :

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

它应该工作

这篇关于WCF:使用参数的URL与&放呼叫服务;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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