我无法使用URL
中的参数来使用WCF我在WCF中的方法:
Login(user,pass)
我的aspx.cs代码:
Service1Client respLogin = new Service1Client().Login(user, pass);
我的web.config:
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="AllocationBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<client>
<endpoint name="ServiceReference1.IService1"
address="http://1.234.567:8/service1.svc"
binding="webHttpBinding"
behaviorConfiguration="AllocationBehavior"
contract="ServiceReference1.IService1" />
</client>
</system.serviceModel>
错误讯息:There was no endpoint listening at that could accept http://1.234.567:8/service1.svc/Login message
这是正确的,http://1.234.567:8/service1.svc/Login
不存在(我需要在URL中添加参数),但http://1.234.567:8/service1.svc/Login/user/pass
确实存在且响应正常!!
我无法添加参数user并传入URL ...
我如何添加参数user&amp;使用WCF和C#传递URL?
谢谢啦!!