Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1026897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:09:14+00:00 2026-05-16T12:09:14+00:00

I’m getting that exception when I try to access the HttpContext.Current.Request object. I’ve seen

  • 0

I’m getting that exception when I try to access the HttpContext.Current.Request object.

I’ve seen the responses in l1, l2 and l3 … so… my question then is :

For what in the world are IHttpModules now for?

I wanted to develop a module that gets hit every time a call enter to may website, so I can log the url accessed, the user IP address, etc… , but now it seems I cannot do it anymore in IIS7. Is there any workaround? (besides switch to “Classic Mode”).

alt text http://userserve-ak.last.fm/serve/126/24432467.jpg

Cheers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:09:15+00:00Added an answer on May 16, 2026 at 12:09 pm

    When are you doing that? is it in a module event?
    It should be perfectly doable in an integrated pool as well.
    Bottom-line there are changes on how ASP.NET hooks to IIS when running in Integrated mode that makes it “more first class”. This does mean that certain events fire before, for example Application_Start will now fire outside the context of an actual request. Other examples are expecting to have a Windows Authenticated Identity in the BeginRequest, since now BeginRequest happens even before IIS authenticates, which was not the case in the past.

    If your application depends on the old bad behavior you can still change your AppPool to run in Classic Mode and it will work just fine.

    You should be able to grab the Request in any notifications that are request specific such as BeginRequest, EndRequest, PostAuthorizeRequest, etc.
    Also, I would recommend against using HttpContext.Current since that incurs an additional look up in a hash table and usually you can get the context directly in other ways, specially in the context of a module, so for example if you handle the BeginRequest, you should be able to do:

        HttpApplication application = (HttpApplication)sender;  
        HttpContext context = application.Context;  
    

    and you will save the lookup.

    From your description it sounds like you should be implementing a module that handles BeginRequest and EndRequest and you should be fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I know there's a lot of other questions out there that deal with this
I don't have much knowledge about the IPv6 protocol, so sorry if the question
i got an object with contents of html markup in it, for example: string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.