签署程序集后未找到 WCF 方法

发布于 2024-07-17 18:59:17 字数 729 浏览 5 评论 0原文

我在这样的解决方案中有 3 个项目:

  • WCF 服务:托管几个方法
  • 类库:通过返回其 Soap 客户端的实例充当 WCF 服务的网关
  • WPF 应用程序:通过引用的类库使用服务方法

一切都运行良好...应用程序正在通过库访问肥皂客户端的实例并相应地使用方法。

现在我签署了我的程序集,所有内容仍在编译,当我添加新方法并更新库中的服务引用时,新方法会出现在应用程序中......但是当运行应用程序并尝试使用方法时,MissingMethodException 被抛出:

未找到方法: 'MusicData.Entities.User DBAccess_Gateway.DBInteraction_Service.DBInteractionGatewayClient.User_Login(System.String, System.String)'。

这是它的失败之处:

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

我认为这与程序集(现在在 gac 中,因为它们已签名?)被签名有关......但为什么没有找到方法? 签名的程序集现在没有正确更新吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浪荡不羁 2024-07-24 18:59:17

当您更新类库中的服务引用时,请确保您正在创建程序集的新版本并在 GAC 中注册此新版本,然后确保您的 WPF 应用程序正在引用此新版本。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文