Questions tagged [ihttpmodule]

121 questions
0
votes
1 answer

Can I access custom interface in IHttpModule?

I have a sessionTimeOutModule i.e. inherited from IHttpModule is being used for "if user gets session timeout, it handle the request to do some stuff, like Signout the user and some other stuff. but I have checked, even after signout i.e.…
Ram Singh
  • 6,664
  • 35
  • 100
  • 166
0
votes
1 answer

How to insert code in the static files like .html, .htm, .asp on IIS for non-asp project

I want to add a script on my IIS Server. So that it will be applied on all the websites that are upload will have that script in their request response. Anyone who knows how to do it? I had implemented the IHttpModule and IHttpHandler, it works fine…
0
votes
1 answer

Url Rewriting in C# .net

how can i rewrite a url so that it shows a path like subdomain.example.com/blog in the address bar but displays a page such as www.example.com/blog/?tag=/subdomain. here is the process of events I want to occur: first: I navigate to…
user796762
  • 21
  • 1
  • 4
0
votes
1 answer

IHttpModule Response.Filter Write with No Close HTML

I wrote a custom IHttpModule but it is causing issues when there is no closing tag in the source. I have ran across a few pages in the CMS I am running this for where the .aspx page is used more like a handler and forgoes closing the html to give…
Brad M
  • 825
  • 2
  • 12
  • 14
0
votes
1 answer

Within PreRequestHandlerExecute, determine name of class in .asmx file

Ultimately, i'm trying to obtain a reference to the webmethod that will handle a request, BEFORE it handles the request, in order to check its custom attributes. Currently, I have it working by appending the request path to the project namespace,…
David Hogan
  • 549
  • 6
  • 6
0
votes
0 answers

Equivalent method to IHttpRequest::NegotiateClientCertificate in an ASP.NET module

What method can be called by an IIS ASP.NET module that is equivalent to the IHttpRequest::NegotiateClientCertificate method in the IIS Native-Code Extensibility Web Server Core API? In other words, in an IIS native module, the method…
rossmpersonal
  • 49
  • 1
  • 5
0
votes
0 answers

Can httpModule "capture" outgoing http requests from a web API hosted on IIS?

I have created a class library test project that has one class which implements the IhttpModule interface. I have a demo web api project that is hosted on my local IIS and has an HttpPost method which inside uses a class that makes outgoing Http…
0
votes
1 answer

ASP.NET MVC + IHttpModule = Not Found

Ah to solving this problem, my mind is completely busy. When i register my httpmodule, I get not-found error, otherwise everything works like a charm. Here is my httpmodule public class UrlNormalizerModule : HttpModuleBase { protected override…
Sadegh
  • 4,181
  • 9
  • 45
  • 78
0
votes
1 answer

How can you mock a dependency that is a concrete class if you don't control the code?

I'm implementing an IHttpModule and am trying to write unit tests for it (using NUnit and Moq). I'm having a problem mocking the HttpApplication dependency for the Init method: void Init(HttpApplication context); Normally, ASP.NET controls the…
Lews Therin
  • 3,707
  • 2
  • 27
  • 53
0
votes
0 answers

Question about private fields of an IHttpModule implementation

For an application that runs in IIS integrated mode, I'm going to implement System.Web.IHttpModule and I want the implementation to contain a private field that I want to be in "the scope of the request". The following code illustrates my idea: //…
Chizh
  • 1,019
  • 7
  • 16
0
votes
1 answer

How to get login text boxes values in HTTP Module in asp.net 2.0?

I am making a Http Module for authentication in my web application in asp.net 2.0. When the AuthticateRequest event is fired then I get the userid and password values from current request. But Every time I am getting null in both. My code is…
Deepak
  • 7,507
  • 3
  • 24
  • 26
0
votes
1 answer

Getting reference to server controls when handler is MvcHandler

I am working working on an httpmodule to hide certain content on my website if certain criteria are not met. My handler setup is pretty simple. Here are the relevant parts to my question: Public Interface IFeatureItem Property ID As Guid Sub…
Dustin Hodges
  • 4,110
  • 3
  • 26
  • 41
0
votes
1 answer

Utilizing a WCF channel from an IIS ASP.net IHttpModule

I have an ASP.net project which involves using a custom IHttpModule. This module will sit in the pipeline and when certain criteria match up, it should invoke a method on a WCF service hosted in a simple C# console application on the same…
justacodemonkey
  • 620
  • 1
  • 8
  • 20
0
votes
3 answers

HTTP to HTTPS Browser issue

I been searching about this issue about a couple of days and done pretty much research but I just can't figure this out. I'm trying to control my pages to redirect them to http or https whatever I need it or not. I created an attrubte to put above…
Davy Quyo
  • 102
  • 6
0
votes
1 answer

How can I get the server address in an IIS 7 module OnAuthenticateRequest hook?

Can an IIS 7 module retrieve the server in an OnAuthenticateRequest hook or an OnPostAuthenticateRequest hook? By "server" I mean the server that the IIS authenticated against (even if it's localhost, for example in the case of windows…
polo
  • 1,352
  • 2
  • 16
  • 35
1 2 3
8 9