Questions tagged [ihttpmodule]

121 questions
0
votes
1 answer

Does BeginRequest fire everytime? Which HttpApplication events fire when? Is it different for Ajax?

I am a little confused about the HttpApplication events. I have a SessionService* that is initialized from an HttpModule. The HttpModule subscribes to HttpApplication.BeginRequest. In the module I create a new SessionService(). The constructor…
smartcaveman
  • 41,281
  • 29
  • 127
  • 212
0
votes
0 answers

No InnerException in global HttpModule for ASMX Services

I successfully implemented an IHttpModule for our asmx-Services like suggested in https://stackoverflow.com/a/551532/6607492 Unfortunately the serialized exception (which is in JSON-Format in our case) does not contain any information about the…
0
votes
1 answer

IHttpModule EndRequest not firing during AJAX call to controller method

I'm trying to work out why when perform a javascript AJAX call to to a Controller GET method my registered IHttpModule does not fire its events, in particular the EndRequest method. This event fires correctly when there is a standard GET request to…
Guy Lowe
  • 2,115
  • 1
  • 27
  • 37
0
votes
1 answer

Does IHttpModule module work with WCF service,

I have WCF service. i want each and request to WCF operation be scanned throughthe IHttpModule module. But it not hitting the IHttpModule. Any help is highly appreciated.
user1844634
  • 1,221
  • 2
  • 17
  • 35
0
votes
2 answers

"Request is not available in this context" in a IHttpModule

I'm getting that exception when I try to access the HttpContext.Current.Request object. I've seen the responses in l1, l2 and l3 ... so... my question then is : For what in the world are IHttpModules now for? I wanted to develop a module that gets…
vtortola
  • 34,709
  • 29
  • 161
  • 263
0
votes
1 answer

Determine HttpContext.Current.Handler is my or system's

I want to add some headers to the response of my .aspx and .ashx files in my IHttpModule. How can I filter .axd and all other system handlers in IsSystemHandler()? I can do HttpContext.Current.Handler is Page for .aspx, but what about .ashx? public…
Denis
  • 3,653
  • 4
  • 30
  • 43
0
votes
1 answer

Option Strict On does not allow narrowing in implicit type conversions between method and delegate

Error: Option Strict On does not allow narrowing in implicit type conversions between method 'context_beginRequest' and delegate '' For the code: Public Sub Init(ByVal…
0
votes
1 answer

Error handling implemented by IHttpModule doesn't work in IIS6, works in IIS5.1

I implement common error handling by using IHttpModule. Locally on my machine with WinXP it works like a charm. Once I upload solution on our test server, which is W2003 it doesn't work. Once an error occurs it displays directly in an asp.net error…
Jaroslav Urban
  • 1,269
  • 3
  • 20
  • 32
0
votes
1 answer

HttpWorkerRequest.GetBytesRead() always returns 0

Anyone know why HttpWorkerRequest.GetBytesRead() always returns 0, even during and after a file upload? Would like to use this method to build a progress bar.
Sigray
  • 239
  • 4
  • 10
0
votes
0 answers

Log serialized response content in ASP.NET without serializing twice

I want to log the response content of requests to my service, and I'm wondering what is the best way to go about it. Here are my specific requirements: Response content should be serialized ONCE in the entire pipeline. Response content only, no…
0
votes
2 answers

how to capture the HTTPResponseBody data in ASP.Net?

I have written a HTTPModule after deriving from IHttpModule as follows. public void Init(HttpApplication httpApplication) { EventHandlerTaskAsyncHelper taskAsyncHelper = new EventHandlerTaskAsyncHelper(LogMessage); …
John Smith
  • 15
  • 3
0
votes
2 answers

Access session in IHttpModule and being able to do a response.redirect

Following the solution found at Can I access session state from an HTTPModule?, I am able to access the session state from an IHttpModule. I'm using it to control access to some files, so in the event someone doesn't have access, I would like to…
Arthurdent510
  • 1,290
  • 6
  • 18
  • 32
0
votes
1 answer

ASP.NET Webforms Module, context user is null

When a video request is handled by the HTTP Module (code below) such as /website/uploads/Video/M2U00001_2.mp4 the _context.User is null. When I run this in VS2010 on my local machine using the Visual Studio Development server _context.User is set.…
user3845056
  • 489
  • 7
  • 25
0
votes
1 answer

How to manipulate a header and then continue with it in C#?

I want to replace an old ISAPI filter that ran on IIS6. This filter checks if the request is of a special kind, then manipulates the header and continues with the request. Two headers are added in the manipulating method that I need for calling…
Simon Linder
  • 3,378
  • 4
  • 32
  • 49
0
votes
1 answer

Are HttpModules utilized when a .Net web service is called through the javascript proxy (AJAX)?

I am making our large set of web services available to AJAX calls. I have added the [System.Web.Script.Services.ScriptService] to each service. We have a registered HttpModule that initializes some objects we use regularly for logging and…
Colin
  • 1
  • 6
1 2 3
8 9