积极答复者
vc dialog的项目,如何访问asmx web service?

问题
-
我的开发环境是vc2010.
我看了这篇文章的方法。
http://www.360doc.com/content/07/0130/15/1_349998.shtml
文章中“在VC项目名称上,单击右键,选择“添加Web引用”。如下图(图3):”
我在我的vc2010项目右键中没有看到有添加web引用的选项。
请问如何做?
谢谢。
答案
-
你好:
你所参考的文档时针对Visual Studio.net 2003的,你现在的编译器是visual studio 2010。
托管代码的话加引用可以参考:http://blogs.msdn.com/b/windowssdk/archive/2009/10/20/building-web-services-on-windows-with-c.aspx
你的MFC是个非托管代码,现在的编译器已经不支持了。如果你的应用是C#下的web应用程序的话是可以直接找到添加web引用的。如果您独立于 Visual Studio 创建代理类(例如,通过使用 .NET Framework 工具),则编程语言取决于使用的工具。 例如,如果使用 WSDL.exe,则在命令行上将编程语言指定为 C# 或 Visual Basic。 如果使用 SProxy.exe,则编程语言是 Visual C++。 Web Services Description Language Tool (Wsdl.exe)。
详细信息请参考:http://msdn.microsoft.com/zh-cn/library/tydxdyw9.aspx
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.
- 已编辑 Anna CcModerator 2013年11月19日 7:12
- 已标记为答案 Anna CcModerator 2013年11月26日 2:47
-
CDHtmlDialog类应该可以的吧。
请参考这个:http://blog.csdn.net/sky04/article/details/7587406
希望对您有所帮助~Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.
- 已建议为答案 Anna CcModerator 2013年11月21日 4:00
- 已标记为答案 Anna CcModerator 2013年11月26日 2:47
全部回复
-
VCResearch,你好:
我发现了一个相似的帖子,你可以参考里面的方法。
http://social.msdn.microsoft.com/Forums/zh-CN/d180334e-614d-485c-81da-65f1d1b01e2e/vc2010-webservice
如果你的问题还没解决,请随时联系我们并提供详细信息。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.
-
VCResearch,你好:
我发现了一个相似的帖子,你可以参考里面的方法。
http://social.msdn.microsoft.com/Forums/zh-CN/d180334e-614d-485c-81da-65f1d1b01e2e/vc2010-webservice
如果你的问题还没解决,请随时联系我们并提供详细信息。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.
我按这篇文章
http://www.360doc.com/content/07/0129/21/1_349238.shtml
“在MFC程序中,一样可以调用 WebService ,我们可以建立一个简单的基于对话框的MFC程序,工程名字为TranslateMFC。由于需要使用托管类型,所以 在编译器设置里面,需要打开/clr开关。(图4)选择项目—TranslateMFC属性,打开项目的属性页,在常规,下面的使用托管扩展选项,将其选择为“是”。 这样,我们的项目就支持托管了C++扩展了。”
我在项目属性 常规 中选择了 “ 公共语言运行时支持(/clr) ”。
但是在项目中还是没有找到添加web引用啊?
请问如何解决?
-
你好:
你所参考的文档时针对Visual Studio.net 2003的,你现在的编译器是visual studio 2010。
托管代码的话加引用可以参考:http://blogs.msdn.com/b/windowssdk/archive/2009/10/20/building-web-services-on-windows-with-c.aspx
你的MFC是个非托管代码,现在的编译器已经不支持了。如果你的应用是C#下的web应用程序的话是可以直接找到添加web引用的。如果您独立于 Visual Studio 创建代理类(例如,通过使用 .NET Framework 工具),则编程语言取决于使用的工具。 例如,如果使用 WSDL.exe,则在命令行上将编程语言指定为 C# 或 Visual Basic。 如果使用 SProxy.exe,则编程语言是 Visual C++。 Web Services Description Language Tool (Wsdl.exe)。
详细信息请参考:http://msdn.microsoft.com/zh-cn/library/tydxdyw9.aspx
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.
- 已编辑 Anna CcModerator 2013年11月19日 7:12
- 已标记为答案 Anna CcModerator 2013年11月26日 2:47
-
你好:
你所参考的文档时针对Visual Studio.net 2003的,你现在的编译器是visual studio 2010。
托管代码的话加引用可以参考:http://blogs.msdn.com/b/windowssdk/archive/2009/10/20/building-web-services-on-windows-with-c.aspx
你的MFC是个非托管代码,现在的编译器已经不支持了。如果你的应用是C#下的web应用程序的话是可以直接找到添加web引用的。如果您独立于 Visual Studio 创建代理类(例如,通过使用 .NET Framework 工具),则编程语言取决于使用的工具。 例如,如果使用 WSDL.exe,则在命令行上将编程语言指定为 C# 或 Visual Basic。 如果使用 SProxy.exe,则编程语言是 Visual C++。 Web Services Description Language Tool (Wsdl.exe)。
详细信息请参考:http://msdn.microsoft.com/zh-cn/library/tydxdyw9.aspx
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.
我的程序是 vc mfc dialog应用,开发环境是vs2010.
您要我看的
http://msdn.microsoft.com/zh-cn/library/tydxdyw9.aspx
我已经看了。
没有找到关于在我的这样的项目中如何添加web 引用的内容。
-
CDHtmlDialog类应该可以的吧。
请参考这个:http://blog.csdn.net/sky04/article/details/7587406
希望对您有所帮助~Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.
- 已建议为答案 Anna CcModerator 2013年11月21日 4:00
- 已标记为答案 Anna CcModerator 2013年11月26日 2:47