WinForm .Net 4.5调用Web服务.Net 3.5 [英] WinForm .Net 4.5 calling Web Service .Net 3.5

查看:89
本文介绍了WinForm .Net 4.5调用Web服务.Net 3.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在Visual Studio 2012中制作的Windows窗体项目,目标是.Net Framework 4.5。此程序调用Web服务,该服务也是在Visual Studio 2012中制作的,但是以.Net Framework 3.5为目标,因此它可以是具有.asmx扩展名的ASP.Net Web服务,而不是新的WCF服务。



这两个项目都是编译和工作但是我得到了意想不到的结果并希望调试我的Web服务,但我无法。 Visual Studio给出了这个错误:



无法自动进入服务器。无法确定停止位置。验证符号已加载。未找到符号:< ...其他内容...>



无论如何,我可以保留我的Windows窗体项目在.Net Framework 4.5和我的Web服务3.5并仍然调试它?我不想完全将我的ASP.Net Web服务重写为WCF服务。

I have a Windows Forms project that was made in Visual Studio 2012 and targets the .Net Framework 4.5. This program calls a Web Service which was also made in Visual Studio 2012 but targets the .Net Framework 3.5 so that it can be a ASP.Net Web Service with the .asmx extension and not the newer WCF Service.

Both projects compile and work but I'm getting unexpected results and wanted to debug my web service, but am unable to. Visual Studio gives me this error:

Unable to automatically step into the server. Unable to determine a stopping location. Verify symbols are loaded. Symbol not found: <...other stuff...>

Is there anyway that I can keep my Windows Forms project at .Net Framework 4.5 and my Web Service at 3.5 and still debug into it? I don't want to have to completely rewrite my ASP.Net Web Service into a WCF Service.

推荐答案

在尝试了一堆我通过谷歌发现的建议之后我实现了我做了一个糟糕的假设。即使在.Net 4.5项目中创建ASP.NET Web服务不是可用的项目类型,您也可以创建一个。基本上你创建一个作为.Net 3.5项目,然后将其更改为目标4.5框架。或者您可以创建一个基本网站,只需删除.aspx页面并手动添加.asmx页面。所以。基本上我将我的Web服务升级到.Net Framework 4.5,现在我可以调试了。



注意:我在VS 2010中创建了一个.Net 4.0 PC项目一个.Net 3.5 Web服务,并且能够很好地调试它。我无法让VS 2012这样做。所以这看起来很阴暗。这就是为什么我如此肯定有一种方法来调试.Net框架。



无论如何,这是帮助我的谷歌结果:

http://stackoverflow.com/问题/ 4345498 / asp-net-web-service-application-missing-in-visual-studio-2010 [ ^ ]



Hope这有助于其他人有相同的问题。
After trying a bunch of suggestions I found via google I realized that I had made a bad assumption. Even though the ASP.NET Web Service is not an available project type when creating at .Net 4.5 project, you can create one. Basically you create one as a .Net 3.5 project and then change it to target the 4.5 framework. Or you can create a basic web site and just delete the .aspx pages and manually add .asmx pages. So. Basically I upgraded my web service to .Net Framework 4.5 and am now able to debug.

Note: I had a .Net 4.0 PC project created in VS 2010 that consumed a .Net 3.5 Web Service and was able to debug into it just fine. I was unable to get VS 2012 to do so. So that seems pretty shady. And was why I was so certain there was a way to debug across the .Net frameworks.

Anyway, this is the google result that helped me:
http://stackoverflow.com/questions/4345498/asp-net-web-service-application-missing-in-visual-studio-2010[^]

Hope this helps if any one else has the same isssue.


这篇关于WinForm .Net 4.5调用Web服务.Net 3.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆