Visual Studio ASHX files debugging

亡梦爱人 提交于 2019-12-11 06:23:44

问题


I have a ashx file in a non web project in VS2008. The type of web project (stsdev that is used with Share Point) deploys the ashx file to the server. I can navigate to the file and it is there. In VS2008 when I try and put a break point in the ashx code it will not let me. This means when I connect to the WP3.exe process to remotely debug it nothing will be fired. What steps can I take to get this to debug?


回答1:


The link here covers it well:

http://www.myrocode.com/post/2009/06/03/Custom-HttpHandler-in-SharePoint-2007-using-code-behind-and-debug-option.aspx

In short

  1. Add {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} to .prodj file
  2. Create Generic Handler
  3. Add reference to assembly in markup reference e.g: <%@ Assembly Name="SharePointHttpHandlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=23d6ec32decbea39" %>. You can get this by using Reflector.

This allowed me to debug at runtime.



来源:https://stackoverflow.com/questions/1334538/visual-studio-ashx-files-debugging

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!