简体   繁体   中英

How can I make Visual Studio 2005 call a WCF service?

如何使Visual Studio 2005调用WCF服务?

是的,使用wsHttpBinding将服务公开为标准Web服务。

Yes you can.

  • If you have .NET 3.0 or 3.5 installed, you can add references to the WCF assemblies (System.ServiceModel.dll etc) which are in the directory "%WINDIR%\\Microsoft.NET\\Framework\\v3.0\\Windows Communication Foundation". Visual Studio 2005 does not include the svcutil utility that generates a WCF proxy, but you can download this (it comes with the Windows SDK), or use WCF without a generated proxy (eg by using the ChannelFactory<T> class).

  • Or you can add a web reference to a WCF service that uses the basicHttpBinding, as suggested by Jeremy Lew.

You need to use the basic HTTP binding. See this article for details.

Just to prevent some from looking this up - you used to be able to download a CTP version of WCF extensions to VS 2005, but this has never gone beyond CTP see this thread

It is still possible to get these in non-ms sites, if all you wish is to try some stuff, but without a doubt the correct way is to either use basicHttpBinding and consume the service as a "normal" web service or move to Visual Studio 2008.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM