WCF Method not found after signing an assembly

北城以北 提交于 2019-12-11 15:12:30

问题


I have a 3 projects in a solution like such:

  • WCF Service: Hosts a couple of methods
  • Class Library: Acts as a gateway to the WCF service by returning an instance of its Soap client
  • WPF Application: Consumes the service methods via the referenced class library

Everything was working perfectly...the application was accessing an instance of the soap client through the library and consuming the methods accordingly.

Now I signed my assemblies and everything still compiles and when I add new methods and update the service reference in the library, the new methods come up in the application...but when running the application and try to use a method, a MissingMethodException is thrown:

Method not found: 'MusicData.Entities.User DBAccess_Gateway.DBInteraction_Service.DBInteractionGatewayClient.User_Login(System.String, System.String)'.

This is the line its failing at:

 var user = WSGateway.MR_WebService.User_Login(username.Text, crypto.Encrypt(passphrase.Password));

I think it has something to do with the assemblies (now in the gac because they are signed?) being signed...but why arent the methods are not being found? Are the signed assemblies not being updated correctly now?


回答1:


When you update the service references in your class library, make sure you are creating a new version of the assembly and registering this new version in the GAC, then make sure your WPF app is referencing this new version.



来源:https://stackoverflow.com/questions/774360/wcf-method-not-found-after-signing-an-assembly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!