Questions tagged [httpmodule]

ASP.NET HTTP Modules are classes which implement the System.Web.IHttpModule interface.

834 questions
20
votes
3 answers

HTTP module vs action filter in asp.net-mvc

I am developing an application in asp.net MVC3 and I have the following questions: When should I write an HTTP module and when should I write an action filter?
Martin
  • 745
  • 2
  • 7
  • 23
19
votes
2 answers

IIS7: Differences between static and dynamic content compression

IIS supports two types of compression: static content compression and dynamic content compression. According to applicationHost.config, they are handled by different modules: DynamicCompressionModule (compdyn.dll) and StaticCompressionModule…
Jan Zich
  • 14,993
  • 18
  • 61
  • 73
18
votes
3 answers

VS2010 development web server does not use integrated-mode HTTP handlers/modules

I am developing an ASP.NET MVC 2 web site, targeted for .NET Framework 4.0, using Visual Studio 2010. My web.config contains the following code:
Domenic
  • 110,262
  • 41
  • 219
  • 271
18
votes
4 answers

IIS6 + HttpModule: This operation requires IIS integrated pipeline mode

I am using IIS6, I've written an HttpModule, and I get this error? After googling the web I find that this problem is caused by the .NET framework 3.5, so I put this on a machine where I didn't install .NET 3.5, but the problem is still there!
sdhjl2000
  • 257
  • 1
  • 4
  • 11
17
votes
4 answers

Preventing upload of large files in ASP.NET 4.0

We'd like to restrict the maximum upload file size in our web site. We've already set the appropriate limits in our web.config. The problem we're encountering is if a really large file (1 GB, for example) is uploaded, the entire file is uploaded…
Jacob
  • 77,566
  • 24
  • 149
  • 228
17
votes
3 answers

httpModules not working on iis7

I have the following module public class LowerCaseRequest : IHttpModule { public void Init(HttpApplication context) { context.BeginRequest += new EventHandler(this.OnBeginRequest); } public void Dispose() { } public…
roncansan
  • 2,310
  • 6
  • 27
  • 34
16
votes
4 answers

How to get original url after HttpContext.RewritePath() has been called

I am working on a web app which makes use of a 3rd party HttpModule that performs url rewriting. I want to know if there's any way to determine the original url later on in Application_BeginRequest event. For example... Original…
jessegavin
  • 74,067
  • 28
  • 136
  • 164
13
votes
5 answers

Debugging an httpmodule on the asp.net development server

I want to integrate some http modules in my asp.net application (v 3.5, visual studio 2008) and I'm not sure how to debug or use such modules while debugging in the asp.net development server that fires when I run the web app. Do I need to include…
Caveatrob
  • 12,667
  • 32
  • 107
  • 187
13
votes
7 answers

Can .NET intercept and change css files?

UPDATE 1: I have now setup IIS6 so .NET can handle calls to .css files. What do I have to do now to get it to change css files based on the referal url? So if the referal url is http://intranet/, it should continue calling the old style sheets. …
oshirowanen
  • 15,297
  • 82
  • 198
  • 350
13
votes
8 answers

ASP.NET: Your most used httpmodules

Interested in description of your most used ASP.NET httpmodules that solved a specific problem for your webapp. Best practices and in-the-field usages are welcome.
Kb.
  • 7,240
  • 13
  • 56
  • 75
13
votes
2 answers

HttpModule.Init - safely add HttpApplication.BeginRequest handler in IIS7 integrated mode

My question is similar but not identical to: Why can't my host (softsyshosting.com) support BeginRequest and EndRequest event handlers? (I've also read the mvolo blog referenced therein) The goal is to successfully hook HttpApplication.BeginRequest…
Paul Smith
  • 3,104
  • 1
  • 32
  • 45
12
votes
2 answers

What are some best practices for managing background threads in IIS?

I have written an HttpModule that spawns a background thread. I'm using the thread like a Scheduled Task that runs in-process, which is really handy. What are best practices for keeping track of this thread? I've never done this before, and I'm a…
Deane
  • 8,269
  • 12
  • 58
  • 108
12
votes
4 answers

IIS7 Application Request Routing (arr reverse proxy) combined with managed module - time out

I am trying to build a proxy that would serve requests to an internal site (hiding the origin) but at the same time inspect the packets and asynchronously post-process them. E.g. let's say all SOAP calls to http://www.foo.com will go to…
user682385
  • 151
  • 1
  • 1
  • 6
12
votes
2 answers

Can I be sure that HttpModules are executed in the order in which they are listed in the HttpApplication.Modules collection?

I want to write an IHttpModule that has to be executed strictly after FormsAuthenticationModule, otherwise it will be useless. There's HttpContext.Current.ApplicationInstance.Modules property that returns a collection of IHttpModules. I can check…
sharptooth
  • 167,383
  • 100
  • 513
  • 979
12
votes
2 answers

How do I retrieve response html from within a HttpModule?

Here is what I'm specifically trying to do: I have written a HttpModule to do some site specific tracking. Some old .aspx pages on our site are hard coded with no real controls, but they are .aspx files so my module still runs when they are…
spilliton
  • 3,811
  • 5
  • 35
  • 35
1
2
3
55 56