开发者

Adding custom request header works for IIS 7.0 but not Asp.net dev server

We're tracking the total time it takes for a request to be responded to. We implemented added custom header: request.headers.add("reqKey",key) with an unique key to the request in Application_AcquireRequestState of our 开发者_开发问答global.asax.cs.

When the Application_PostRequestHandlerExecute is hit for that request, it pulls the custom header with the unique key back out and uses that record the total response time. A bunch of other stuff is also logged with this, such as username, form data, etc., not just simple timings.

This currently works just fine when the code runs on IIS 7.5. However, when it's ran on an ASP.Net Development server, it throws a Operation is not supported on this platform exception.

Our Prod is IIS 7, so should how do I get around this error?


You can use IIS 7.5 Express if you are using VS2010 SP1. Download from here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=abc59783-89de-4adc-b770-0a720bb21deb

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜