简体   繁体   中英

VS2008 debugs old ASP.NET web service

I'm writing an ASP.NET web service, in C#. Before yesterday if I wanted to debug it I would just press F5, and ASP.NET Development Server would start hosting my service. Breakpoints would be enabled and would work. Recently this functionality is gone. Now when I start debugging, Development Server is started but the old version of my web service is hosted, and breakpoints do not work. I get a warning that versions do not match.

It does not help if I rebuild everything, or change the assembly version, or even change the file name of the DLL. It does not help if I delete the whole temp folder %TEMP%\\Temporary ASP.NET Files . Old web service will be pulled out from who knows where, and stored in temp folder again.

Major change before yesterday was that I had installed IIS. Web service that is installed there works as expected, but I need to debug it as well. I thought that the problem is that I installed the web service (with vdproj), so I uninstalled it, but this did not help either.

How to prevent the system from caching the old version of web service. Where is this old version stored anyway?

Check the Web settings on your ASP.NET project. To get back to using the ASP.NET Development Server for F5 debugging make sure the "Use Visual Studio Development Server" radio button is selected under the Server heading. I also specify a specific port so other projects in my solution can consistently reference it (in my case I'm dealing with a web service). There's a good chance that you will find the "User Local IIS Web server" radio button selected.

Hope that helps.

EDIT: The problem here is not about IIS, but about changing the target build output folder of web service. It must be bin\\ , or Development Server cannot find it. Rebuild did not help because it would change dll file in new folder, but old file would remain undisturbed in bin folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM