Visual Studio ASHX 文件调试 [英] Visual Studio ASHX files debugging

查看:190
本文介绍了Visual Studio ASHX 文件调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 VS2008 的一个非 web 项目中有一个 ashx 文件.Web 项目的类型(与 Share Point 一起使用的 stsdev)将 ashx 文件部署到服务器.我可以导航到该文件,它就在那里.在 VS2008 中,当我尝试在 ashx 代码中放置一个断点时,它不会让我这样做.这意味着当我连接到 WP3.exe 进程进行远程调试时,不会触发任何操作.我可以采取哪些步骤来调试它?

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?

推荐答案

这里的链接涵盖得很好:

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

简而言之

  1. 将 {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} 添加到 .prodj 文件
  2. 创建通用处理程序
  3. 在标记引用中添加对程序集的引用,例如:<%@ Assembly Name="SharePointHttpHandlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=23d6ec32decbea39" %>.您可以通过使用 Reflector 来获得它.

这让我可以在运行时进行调试.

This allowed me to debug at runtime.

这篇关于Visual Studio ASHX 文件调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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