Questions tagged [ihttpmodule]

121 questions
0
votes
1 answer

Logging request length using IHttpModule

I've made an IHttpModule that logs web requests. It logs POST requests just fine. However for GET requests, the length always seems to be zero. Is there a way to get the length of the GET request? public void Init(HttpApplication context) { …
Fidel
  • 7,027
  • 11
  • 57
  • 81
0
votes
0 answers

How to prevent ASP.NET web site initialization error if to abort request early?

I tried to URLRewrite module to redirect, rewrite and abort requests to site. But site shown error. I wrote down IHttpModule which does similar, and calls HttpApplication.Context.Response.End(); in 'HttpApplication.BeginRequest'. This leads to…
0
votes
1 answer

IHTTPModule performance hit?

I'm implementing an IHttpModule as described in this question. Since we're examining every request, I'm worried there may be a performance hit. Has anyone run into performance issues implementing IHttpModules?
Dustin Kendall
  • 520
  • 8
  • 18
0
votes
2 answers

HTTPModule and Sharepoint Site

I am running into an issue with using a HTTPModule with a sharepoint deployed site. Here is what I have: my asp.net pages inside the /layouts/[ProjectName]/ folder. The aspx file uses a sharepoint masterpage i have a HTTPModule and implments…
Alok Khanna
  • 81
  • 2
  • 5
0
votes
0 answers

HttpModule is executed for JS/CSS/Images

Problem: HttpModule is executed for JS/CSS/Images. Following is current Configuration/Settings: Infrastructure: IIS 6.0 on Microsoft Windows Server 2003 R2, Enterprise Edition, Service Pack 2 IIS VD settings: Wildcard application mapping to…
amit
  • 251
  • 5
  • 8
0
votes
1 answer

How does WebPageHttpModule happen to be registered after my modules?

In my web.config section I add my custom module: and then in my HTTP handler I iterate over the modules list: var allModules =…
sharptooth
  • 167,383
  • 100
  • 513
  • 979
0
votes
1 answer

Setting session variable in class that implements IHttpModule error

I am trying to set a session variable in a class that implements IHttpModule. I receive a "Object reference not set to an instance of an object." Here is my code: public void Init(HttpApplication context) { …
Lucky Luke2
  • 2,056
  • 5
  • 25
  • 32
0
votes
0 answers

aspx page is rendered as plain text after RewritePath

My ASP.NET application using HTTP Moule same as here. But whenever I try to rewrite path in my Application_PostAcquireRequestState, I am viewing Default.aspx as plain text. Does anybody know why it is rendered like this instead of being rendered as…
Augis
  • 1,903
  • 1
  • 16
  • 21
0
votes
2 answers

Accessing context session variables in c#

I have an ASP.NET application and dll which extends IHttpModule. I have used the below method to save the session variables in httpcontext through public class Handler : IHttpModule,IRequiresSessionState { public void Init(HttpApplication…
GowthamanSS
  • 1,434
  • 4
  • 33
  • 58
0
votes
1 answer

IHttpModule Rewritpath to Layouts folder showing 404 error

I am working in sharepoint2010 rewrite using iHttpModule. It works good for pages in /pages/ , /sitepages/ libraries. but when i rewrite it to a layouts folder it is throwing 404 error. This is what i am trying to…
John Supakin
  • 141
  • 5
  • 14
0
votes
1 answer

IHttpModule RewritePath with StatusCode 404

I have a URL that looks like: /employees?employeeId=3992, which displays the employee with the ID 3992. That works fine and the HTTP Status Code is 200 OK. However when someone writes an invalid ID in the URL such as: /employees?employeeId=39920, I…
Martin
  • 2,302
  • 2
  • 30
  • 42
0
votes
2 answers

Sitecore context in HttpModule

I created simple HttpModule, all what I need is just get is valid Sitecore.Context inside but during processing I see that my Sitecore.Context is some kind of default. I can get Sitecore user that log in to Sitecore, etc. How to fix it ?
Arbejdsglæde
  • 13,670
  • 26
  • 78
  • 144
0
votes
1 answer

Create an ASP.NET HTTP Module

Let us consider two class with same name space and extend IHttpHandler as below Class 1: using System; using System.Web; using System.IO; namespace MyPipeLine { public class clsMyHandler1 : IHttpHandler { public void…
GowthamanSS
  • 1,434
  • 4
  • 33
  • 58
0
votes
1 answer

How to enable/disable IHttpModule for particular set of pages

I have a piece of code that is preprocessing submitted form. Currently it was copy/paste solution, but now as I'm using basically the same code on three pages I wanted to encapsulate it. By first thought was to do it using IHttpModule. The only…
dragonfly
  • 17,407
  • 30
  • 110
  • 219
0
votes
2 answers

Access to session variables from IHttpModule's OnBeginRequest method

I have a website that, in order to work properly, needs to have a XML file appended to all its URLs, let's say the file is called module-1.xml. In order to keep those URls clean, I wrote a IHttpModule's that uses the…
jdecuyper
  • 3,934
  • 9
  • 39
  • 51
1 2 3
8
9