简体   繁体   中英

How to debug a web handler (ashx) in a web site project in Visual Studio 2013

I have a web site project in Visual Studio that includes some web handlers. I have tried various ways to try and debug the web handler code, but when I set a breakpoint and start the project the breakpoint becomes a circle and the breakpoint will never get hit. I've tried using the option to not open a page when starting the project and I don't see either w3wp.exe or any process for aspnet so there isn't any task to attach to.

在此处输入图片说明

I don't see anything in web.config that registers the handler but when I look at how to register a handler I'm confused. Here is the line of code in the aspx page that invokes the handler...

http://localhost:13196/handler.ashx?id=4764806f-2abb-40b4-a5d9-3139fdb060c2

When they talk about registering the handler they talk about a file type. What is the file type in this case?

Thank you for any help that you can provide.

Gary

Make sure you're debugging the project off the latest build, set your break point and try hitting F5 (Debug -> Start Debugging). If its running off IIS, you can debug by going to Tools -> Attach to Process and the check "Show processes from all users" and w3wp.exe should be listed. Once you attach you might be prompted to launch VS as an admin where you'll have to go through the motions of attaching it again.

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