简体   繁体   English

从VS2003调试.NET 2.0 Web服务?

[英]Debug .NET 2.0 web service from VS2003?

I have a web service created in a VS2005 asp.net 2.0 framework app that I need to consume in a 1.1 framework app. 我有一个在VS2005 asp.net 2.0框架应用程序中创建的Web服务,我需要在1.1框架应用程序中使用它。 I built the web service - then built a little 1.1 framework tester app to call it and it worked great. 我构建了Web服务 - 然后构建了一个小的1.1框架测试器应用程序来调用它,它工作得很好。 So now I have added the web reference exactly the same way to the main 1.1 framework app that I need to consume it in. The web method being called is of type boolean and returns true if successful. 所以现在我已经将web引用完全添加到我需要使用它的主1.1框架应用程序中。被调用的web方法是boolean类型,如果成功则返回true。 I get back true - but the updates that the web method are supposed to perform are not occuring. 我回来了 - 但是web方法应该执行的更新没有发生。 When I was calling the web method from the small test app - they occured just fine. 当我从小测试应用程序调用Web方法时 - 它们发生了很好。

My question is - how can I debug this from my 1.1 consumer into my 2.0 provider? 我的问题是 - 如何从我的1.1消费者调试到我的2.0提供商? MS docs say I should just be able to set a breakpoint on the call to the web service and step right in (currently in development they are both on the same machine). MS文档说我应该能够在调用Web服务时设置断点并直接进入(目前正在开发中它们都在同一台机器上)。 This does not work as it just steps right over that line of code. 这不起作用,因为它只是跨越那行代码。 Any help appreciated. 任何帮助赞赏。

Make sure you have <compilation debug="true"/> in both web.config files, and make sure they are both built in DEBUG mode. 确保在两个web.config文件中都有<compilation debug="true"/> ,并确保它们都是在DEBUG模式下构建的。

Now that I think of it, that probably won't work. 现在我想起来了,这可能行不通。 I presume you are debugging the .NET 1.1 code with VS2003, right? 我假设您正在使用VS2003调试.NET 1.1代码,对吧? It's not going to step into .NET 2.0 code. 它不会进入.NET 2.0代码。 You're going to have to start a separate VS2005 instance, attach to the process running the web service, set your breakpoints, then wait. 您将不得不启动一个单独的VS2005实例,附加到运行Web服务的进程,设置断点,然后等待。

In VS 2005 or 2008 you can attach any process to debugger but in VS2003 i don't no, its very arquaiq. 在VS 2005或2008中,您可以将任何进程附加到调试器,但在VS2003中,我不是,它非常arquaiq。

If don't work you can always convert from 1.1 to 2.0 is very cleany because have half functions of 2.0 如果不工作你总是可以从1.1转换为2.0是非常清晰,因为有2.0的一半功能

I have never been able to debug a 2.0 web service using VS2003, but what I usually do, is set up two debuggers. 我从来没有能够使用VS2003调试2.0 Web服务,但我通常做的是设置两个调试器。 One for the 1.1 app in VS2003, and a second debugger attached to IIS that's running the webservice using VS2005 (attach to aspnet_wp.exe in WinXP, or W3WP.exe on WinServer2K3 or Vista). 一个用于VS2003中的1.1应用程序,另一个连接到IIS的第二个调试器,它使用VS2005运行Web服务(连接到WinXP中的aspnet_wp.exe,或WinServer2K3或Vista上的W3WP.exe)。 That way, you can debug your 1.1 app, and you can also have a debugger sitting on your Web Service. 这样,您可以调试1.1应用程序,也可以在Web服务上安装调试器。

Another way to always launch your debugger is to add the following line to your code, and it will pop up a dialog box when called that will give you the correct debugger options: 另一种始终启动调试器的方法是在代码中添加以下行,并在调用时弹出一个对话框,它将为您提供正确的调试器选项:

System.Diagnostics.Debugger.Break();

If you add that into your web service when you want to debug, it'll force you to open a debugger to continue code execution. 如果在要调试时将其添加到Web服务中,则会强制您打开调试器以继续执行代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在VB.net中的日期字符串+“-23.59.59.999”在VS2003中工作,而在VS2008或VS2010中工作 - In VB.net datestring + “-23.59.59.999” working in VS2003 not in VS2008 or VS2010 .Net 1.1 C#开发64位Vista,IIS 7.0和Vs2003 - .Net 1.1 C# Development on 64bit Vista with IIS 7.0 and Vs2003 使用.Net 2.0和.Net 4.5的JSON Web服务 - Consuming a JSON Web Service from .Net 2.0 and .Net 4.5 从Javascript调用ASP.NET 2.0 Web服务 - Calling ASP.NET 2.0 web service from Javascript 如何从ASP.NET 2.0 Web应用程序中的客户端脚本调用ASP.NET Web服务? - How to call an ASP.NET web service from client script in an ASP.NET 2.0 web application? Web Service .net 2.0,部署和使用 - Web Service .net 2.0 , deploying and consuming 是什么阻止了VS 2003 aspx Web表单在设计器中打开? - What is preventing a VS 2003 aspx web form from opening in the designer? NET 2.0 Web API的oAuth 2.0服务提供商 - oAuth 2.0 service provider for .NET 2.0 web API 现在,从ASP.NET 1.1升级到ASP.NET 2.0的Web服务调用失败 - Upgrade from ASP.NET 1.1 to ASP.NET 2.0 now web service call fails Windows Server 2008 R2上的.NET 2.0 Web Service找不到模块异常 - Module Not Found Exception From .NET 2.0 Web Service On Windows Server 2008 R2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM