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 3598360
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:13:56+00:00 2026-05-18T20:13:56+00:00

I was surprised that in MvcApplication.Init the Modules collection only has one entry in

  • 0

I was surprised that in MvcApplication.Init the Modules collection only has one entry in it, named “__ASP_IntegratedDynamicModule_Shim”. In my webforms app, there were about 13 modules, one of which was “FormsAuthentication”.

In my webforms app, I override HttpApplication.Init, then use Modules[“FormsAuthentication”] to grab the FormsAuthenticationModule and wire up to its Authenticate event in order to substitute my own handler. I’m not sure how to do this now that I’m moving to MVC 3.

The forms auth module is clearly running in my pipeline, because authentication mode=”forms” is working fine (I can log in and out using the standard FormsAuthentication techniques). I’m using IIS 7 with an integrated ASP.NET 4.0 pipeline.

Anybody else notice this? I’m probably just doing something really dumb…

  • 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-18T20:13:57+00:00Added an answer on May 18, 2026 at 8:13 pm

    In the integrated pipeline, your Init() method will run multiple times. Due to the way MVC 3 hooks itself into the ASP.NET pipeline, the very first call to Init() might contain an empty module collection. Subsequent calls should contain the module you’re looking for.

    I’d recommend modifying your Init() code to say if Modules[“FormsAuthentication”] doesn’t exist, no-op. Your code will eventually be called again, and you’ll eventually be able to hook that event.

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

Sidebar

Related Questions

I'm new to ReSharper and am surprised that there isn't a template defined for
I'm a little surprised that there isn't some information on this on the web,
I am surprised that there is no Android Hidden Features post yet in the
I'm always surprised that even after using C# for all this time now, I
I just worked through a book on WCF and was surprised that it didn't
I was surprised recently to find that it's possible to have a return statement
It's my understanding that StackOverflow (SO) was built using ASP.NET. What surprised me is
Surprised that i havent been able to find this myself, but anyway. Let's say
I am a bit surprised that while learning WPF/XAML/Silverlight almost all of the XAML/C#
I am surprised that I can't initialize my fields in structs, why is it

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.