添加 Web 引用不会生成预期的 reference.cs 文件。缺失的功能

发布于 2024-08-28 01:25:51 字数 307 浏览 4 评论 0原文

我正在 Visual Studio 2005 中使用旧的 Windows 应用程序。原始应用程序中引用的 Web 服务有 2 个函数,当我在自动生成的引用.cs 文件中达到峰值时,我注意到还有几个其他允许异步调用的函数生成,即 BeginWhateverFunctionNameIsCalled 和 EndWhateverFunctionNameIsCalled。

我的问题是,我创建了一个新的 Windows 应用程序并添加了相同的 Web 引用,但 Begin 和 End 函数未在我的 reference.cs 代理类中生成。有人知道发生了什么事吗?

I'm working with an old windows app in visual studio 2005. A webserviced referenced in the original app has 2 functions and when i peak inside the auto-generated reference.cs file I notice a couple of other functions to allow async calls have been geenrated i.e. BeginWhateverFunctionNameIsCalled and EndWhateverFunctionNameIsCalled.

My problem is that I've created a new windows app and added the same web references but the Begin and End functions are not generated in my reference.cs proxy class. Anyone know whats going on?

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

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

发布评论

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

评论(2

骷髅 2024-09-04 01:25:51

它是 VS2005,并且不生成异步方法。好的;是 .NET 2.0 还是 .NET 3.0(通过 VS2005/WCF 附加组件)?看起来“wsdl.exe”(原始版本)将生成“FooAsync”方法,但 WCF(“scvutil.exe”)可能会生成“BeginFoo”模式。您还可以查看是否使用过 WSE*,例如“wsewsdl2.exe”或“wsewsdl3.exe”。

我的赌注是 WCF 版本。另请注意,不同的框架(Silverlight 等)都有自己的代理生成类。

It is VS2005, and isn't generating the async methods. OK; is it .NET 2.0 or .NET 3.0 (via the VS2005/WCF add-on)?. It looks like "wsdl.exe" (the original) will generate "FooAsync" methods, but WCF ("scvutil.exe") may generate the "BeginFoo" pattern. You might also look to see if you have used WSE*, for example, "wsewsdl2.exe" or "wsewsdl3.exe".

My bets would be of the WCF version. Note also that different frameworks (Silverlight etc) have their own proxy generation classes.

还给你自由 2024-09-04 01:25:51

第一步是检查 Web 服务返回的 wsdl 文件是否这些方法在服务器上仍然可用。

First step would be to check wsdl file returned by web service if those methods are still available on the server.

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