ASP.NET HTTP Modules are classes which implement the System.Web.IHttpModule interface.
Questions tagged [httpmodule]
834 questions
0
votes
0 answers
Access file in HttpModule from within HttpModule
I have a AFile.html inside an HttpModule. This file is being used to keep my actual code cleaner / more concise
Inside the HttpModule, in a file on the same structure level as the html file, I have
Response.WriteFile("AFile.html");
Expected…

Bardicer
- 1,405
- 4
- 26
- 43
0
votes
0 answers
HttpModules implement with httplistener
How can I use my httpmodules class with httplistener web service
here is my http module code as :
using System;
using System.Web;
using System.Collections;
public class MyCustomHttpModule: IHttpModule
{
public String ModuleName
{…

irfan shaikh
- 1
- 1
0
votes
1 answer
Check if a redirect then change the query string
I would like to remove the query parameter 'mobile' from all requests that are redirects. The page Redirect.aspx redirects a visitor to Default.aspx?mobile=1. And when a visitor browses to Redirect,aspx, then eventually he should be led to the…

myroman
- 561
- 1
- 5
- 11
0
votes
0 answers
Authentication Issue: Multiple publish of a single web application on IIS7 with different ports
I have a ASP MVC2 web application and I want to publish multiple versions of it on my customers' IIS Server. Everything works just fine except that no one can log in to any two of the websites in a single browser at once. I thought this might be…

Hosein
- 581
- 1
- 7
- 29
0
votes
3 answers
ASP.NET: require login based on netmask
I need to secure access to all pages in a .NET webapp - EXCEPT requests from:
local network (the network IIS is running on)
IPs listed/netmasks listed in a database
all other requesets should be redirected to a login form
I was thinking in the…

reinhard
- 818
- 1
- 10
- 24
0
votes
2 answers
ASP.NET Webforms Authorization
I want to implement the Authorization for my project. It would be a custom authorization where admins can create roles and assign to users. The authorization is simple at the page level, either a user has access to page or not. Now can somebody…

Karan Kukreja
- 23
- 1
- 5
0
votes
2 answers
Do I need SessionStateModule in my ASP.NET MVC3 application hosted in Azure web role?
In my ASP.NET MVC3 application I don't ever explicitly use SessionStateModule and so I assume I can just remove it by changing web.config. The application is hosted in Azure web role so I can't rely on per-instance session states anyway, can I?
Will…

sharptooth
- 167,383
- 100
- 513
- 979
0
votes
1 answer
HttpModule AcquireRequestState event handler has null sender
I have an HttpModule, something like this:
public class MyModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.AcquireRequestState += Context_OnAcquireRequestState;
}
private void…

cbp
- 25,252
- 29
- 125
- 205
0
votes
1 answer
Determining Page of current Url in an HttpModule
I suspect the answer is no (or at least, not in an intelligent manner), but felt like asking.
Is it possible in an asp.net HttpModule to determine the page that is going to be returned to the user, taking default page settings of IIS into account…

Brian
- 25,523
- 18
- 82
- 173
0
votes
1 answer
Reading IIS log fields as they are written
I am writing a custom HttpModule for an ASP.NET application. I would like to be able to access the W3C fields that are written to the IIS log. It looks like the data structure HTTP_LOG_FIELDS_DATA is the relevant data structure.
Is there a way to…

cm007
- 1,352
- 4
- 20
- 40
0
votes
0 answers
HTTP module re-writing the URL with some encryption
I am writing one class with the help of HTTPModule to check userIdentity in session before he access any page.If the variable in the session is null or empty i am redirecting the user in session expired page.
Code in Class:
public class…

UnableToGoogle
- 99
- 2
- 12
0
votes
1 answer
Errror 404 in httpmodule on IIS6 asp.net 3.5
I have created a simple URL rewrite module in an asp.net 3.5 webforms website. The module redirects to /default.aspx using this code :
HttpApplication app = (HttpApplication)source;
HttpContext ctx =…

George Statis
- 548
- 3
- 12
0
votes
1 answer
How do I register a custom IHttpModule with HttpServer
I am using the HttpServer class to test my web api. In my application, I have a custom IHttpModule that handles some URL rewriting. I need this module to process the requests for my web api as well. Here is my code that I use to create the…

Leslie Hanks
- 2,347
- 3
- 31
- 42
0
votes
1 answer
Best approach for HTTPModule
Recently created my first httpmodule. It drops and manages a user cookie. This all works fine.
I now need to drop another cookie relating to site affiliates.
The question is, is is better practice to create 2 entirely separate httpmodules or add…

dotnetnoob
- 10,783
- 20
- 57
- 103
0
votes
0 answers
Dynamically generate @ServiceHost directive / Dynamic SVC files
I am using Castle Windsor's WCF facility to host my services.
This means that my .svc files only contain this one line:
<%@ ServiceHost Service="MyService" Factory="Castle.Facilities.WcfIntegration.DefaultServiceHostFactory,…

TravelingFox
- 484
- 5
- 18