Questions tagged [httpmodule]

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

834 questions
0
votes
1 answer

IE10 & ASP.Net Handler bug

I tested my site on IE10. View source IE 10 not include some ScriptResource.axd files. But I copy site url and paste chrome work fine. This code not included IE10.( Right click -> View Source ) var theForm = document.forms['form1']; if (!theForm) { …
Codder AE
  • 3
  • 2
0
votes
2 answers

create custom response handler

Is it possible to create any kind of handler to handle the output response from an ASP.NET page? My scenario: I have a third party application (source code not provided) written in ASP.NET/C# hosted in IIS 7, and I want to create a 'handler' so that…
Bruno
  • 87
  • 9
0
votes
3 answers

ASP.Net httpmodule private property behaving as static?

I declared a private property in an httpmodule attached to PostAuthenticateRequest this way: Private Property roles as New List(Of Integer) Then in the various methods of the module I added a role to the List this…
Manight
  • 500
  • 5
  • 26
0
votes
1 answer

Common action filter or HttpModule for asp.net MVC web service

We have a web service written in MVC 1.0. There is a need to intercept every request being made to this service. In this case is it wise to develop a HTTPModule which intercepts every request and modifies the method parameter before it reached the…
Zeus
  • 3,091
  • 6
  • 47
  • 60
0
votes
1 answer

Check if anonymous in HTTPModule

I'm in the process of writing an HTTPModule in C#.NET that manages unhandled errors by our applications on a particular server. Some users are in our domain, some are anonymous. How can I determine in my HTTPModule whether the user is anonymous or…
Ray
  • 4,679
  • 10
  • 46
  • 92
0
votes
1 answer

Change English numbers to Persian and vice versa in MVC (httpmodule)?

I wanna change all English numbers to Persian for showing to users. and change them to English numbers again for giving all requests (Postbacks) e.g: we have something like this in view IRQ170, I wanna show IRQ۱۷۰ to users and give IRQ170 from…
Mohammad Dayyan
  • 21,578
  • 41
  • 164
  • 232
0
votes
1 answer

unit test http module, check http status code

I can't figure out why this unit test won't work. It is based off of the code sample found here: http://weblogs.asp.net/rashid/archive/2009/03/12/unit-testable-httpmodule-and-httphandler.aspx [Test] public void…
voam
  • 1,006
  • 13
  • 24
0
votes
2 answers

Intercept http request for the files on file server

http://myfileserver/images/car/chevrolet.gif I have this file server holding the files such as images, doc files etc. Now i want to intercept the http request and based on the file extension i want perform some action such as redirection to some…
Karan
  • 3,265
  • 9
  • 54
  • 82
0
votes
1 answer

httpModule does not fire when published to IIS

When I am debugging on my machine httpModule fires normally now after publishing it to IIS it does not run, what am I doing wrong? Am I missing something? here is what it looks like in web.config
Raymund
  • 7,684
  • 5
  • 45
  • 78
0
votes
1 answer

asp.net url rewriting dynamically using httphandler/httpmodule

I have an asp.net application and I need to do the following: Assume that i have a page called page1.aspx, what i need is that: when the user requests page1.aspx?id=1 to be redirected to http://myapp/books when the user requests page1.aspx?id=2 to…
Alex
  • 5,971
  • 11
  • 42
  • 80
0
votes
1 answer

XSLT Transform of Razor Output

I want to use XSLT to perform an HTML-to-HTML transform. The catch is, I want that transformation step done after the razor view engine is "done" rendering and before the response is sent back to the client. I see a post that deals with response…
Brent Arias
  • 29,277
  • 40
  • 133
  • 234
0
votes
2 answers

How to determine the encoding of request query string

Suppose I have a .NET HttpModule that analyzes incoming requests to check for possible attacks like Sql Injection. Now suppose that a user of my application enters the following in a form field and submits…
Forte L.
  • 2,772
  • 16
  • 25
0
votes
1 answer

asp.net mvc3 authentication

Is there any solution for redirect user to login page, when cookie expires? I create formsauthenticationticket and cookie. Expiration is set on 10minutes. When expiration is over, and user doesn't make any request 20-minutes, and after that,…
Bxx
  • 1
  • 7
0
votes
1 answer

.net custom httpmodule error page issue

My application has a custom HTTPModule for handling friendly URLs. And here is the modules section of the web.config file.
Kumar
  • 113
  • 1
  • 10
0
votes
2 answers

Will my HttpModule get called if IIS produces a 400: Bad Request?

I have an ASP.NET website and am having trouble capturing some specific requests that are giving me trouble. The website calls an asmx web service that it also hosts (therefore makes a webservice call to (http://localhost/whatever.asmx)). I'm…
MStodd
  • 4,716
  • 3
  • 30
  • 50