开发者

consuming WCF service in .net 2.0 windows application

开发者 https://www.devze.com 2023-03-27 13:11 出处:网络
I\'m new in WCF service and I need to 开发者_如何转开发consume the WCF service from my client for my current .net 2.0 windows app. I successfully added the WCF service as web reference in my .net 2.0

I'm new in WCF service and I need to 开发者_如何转开发consume the WCF service from my client for my current .net 2.0 windows app. I successfully added the WCF service as web reference in my .net 2.0 application but when using the web method of the service it took long time to execute the method and in the end my application is not responding. Base on the request in fiddler, the request has been timed out. My client provides me a user name and password but I don't know where to use it. Base on the wcf web service wsdl of my client, it uses WSHttpBinding.

I also created a sample .net 4.0 windows application and added the service as reference but still cannot use the web method. I check also the request in fiddler and gives me a response error "The request for security token could not be satisfied because authentication failed.".

Please help. I need to consume the WCF service using my existing .net 2.0 application.

Thank you very much in advance!


If you want to consume your WCF service from .NET 2.0 via adding web reference you must use BasicHttpBinding - that is only backward compatible build-in binding (except custom defined binding) with ASMX based client.

Your exception in case of .NET 4.0 test complains about security token - WsHttpBinding uses Windows security by default. It is hard to diagnose the problem further because you didn't provide enough information.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号