Visual Studio >> Debug menu >> Start performance analysis
不适用于HttpHandler
,因为它不能单独运行。错误是这样的:
获取asp.net信息失败。 'http://localhost/myprojrct/VSEnterpriseHelper.axd'返回错误(500个内部服务器错误)
也仅通过w3wp.exe
附加到profiler
来配置CPU。
如何在HttpHandler
asp.net项目上进行性能分析(我不使用ashx
文件,并且没有asp.net页面,只有实现IHttpHandler
的类)
简单的答案是将处理逻辑从IHttpHandler
实现中移出,并移到一个[[可以用Profiler测试的类中。保持处理程序的占用空间尽可能小。