且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

WCF库项目中未在Windows窗体应用程序中生成操作合同。

更新时间:2023-11-09 09:54:40

you are moving on the right path, you just need to care of the following steps :

1- Make all the methods 'public' for example your method


private UserData GetUserData(string userName)
       {
           ...
       }



is a private method which means you wont be able to access from outside the class.

2- Make sure all operation contracts of your methods are implemented inside the interface class of the service not outside it.

make sure to browse the service file itself 'service.SVC' and make sure that all your methods are there in the XML of it.