No windows authentication after adding MvcTurbine

25 views
Skip to first unread message

Johannes Hansen

unread,
Oct 14, 2011, 7:23:40 AM10/14/11
to mvctu...@googlegroups.com
I have a problem with MvcTurbine in one of my web projects. After adding MvcTurbine apparently the WindowsAuthentication http module doesn't get executed. I've tried to understand/debug this problem for quite some time now, so I hope you can help. My current theory is that MvcTurbine inadvertently registers something in one of my libraries which somehow interferes with the authentication process. I'm pretty sure this is the case because when I removes the reference to one of my library projects it works again.

Unfortunately this cripples the project because the mentioned library contains all my shared web logic, such as base HttpApplication and Controller classes etc.

The size of the library makes it hard/impractical to go through and exclude code to see which part is causing the problem. So my question is how do you suggest I debug the problem?

Is there a way to disable the automatic registration of HttpModules, which I suspect is the root cause?

Johannes Hansen

unread,
Oct 14, 2011, 7:51:48 AM10/14/11
to mvctu...@googlegroups.com
It turned to be the automatic registration of an old custom authentication HttpModule, which caused the problem. As it turned out this module could be considered dead code so I simply deleted it.

However, I would still like to know how you turn of some of these auto-registrations. I mean, in a solution with many sites and base class libraries, such as the one I am working on, you rarely want to register all modules in the external libraries. Instead you want a little more control.

Javier Lozano

unread,
Oct 17, 2011, 9:53:50 AM10/17/11
to MVC Turbine
Hi Johannes,

There is a way to disable this, granted you're using at least v3.3 of
MVC Turbine. The gist here, https://gist.github.com/965878, shows you
how to do this. As you've mentioned, we added this feature since some
modules weren't designed with DI in mind thus making it hard to get
them working.

Johannes Hansen

unread,
Oct 17, 2011, 12:39:02 PM10/17/11
to mvctu...@googlegroups.com
Thanks Javier, exactly what I was looking for. Btw, I'm using version 3.4 from NuGet. ;)

Javier Lozano

unread,
Oct 17, 2011, 12:50:40 PM10/17/11
to MVC Turbine
Awesome! Also, thank you for using MVC Turbine :) Please know if
there's something you want or would liek to contribute, don't hesitate
to contact me :)
Reply all
Reply to author
Forward
0 new messages