1.Create a folder to store proxy object or Class(here I created folder with name WCFProxy in d drive)
2.Host the Web Service Or WCF in server or Create virtual directory
3.Open Visual studio command prompt
4: Use the follwoing command as per your Service Host location
C:\Program Files\Microsoft Visual Studio 90.\VC> http://localhost/WCFService /Out:/D:/WCFProxy//Myservice.cs /config:d:/WCFProxy/MyService.config
5. Now How to use it in Client application(Called application)
Put the Created Proxy calss ( Myservice.cs) in App_code folder and add namespace to this class.
6.In page add namespace like Using WCFServenamespace
7. Create the Proxy class object Like
ServiceClient Obj=new ServiceClient();
Now you will get all the metheds list availabe in WCF Service
Sting Test=Obj.GetClientName();
This all about how to Create and use proxy Class in application.
.
No comments:
Post a Comment