httpmodule in iis 7 & windows server 2008

eğer bir httpmodule (bir dll veya app_code dizinindeki bir class) iis 7 & windows server 2008 üzerinde çalışmıyorsa (ve herhangi bir hata vermiyorsa), bu modülü global.asax dosyasına yerleştirmek sorunu çözüyor. örnek:


httpmodule:

namespace xxx.Authenticator
{
public class Authenticator : IHttpModule
{
#region IHttpModule Members

public void Dispose() { }

public void Init(HttpApplication context)
{
context.AcquireRequestState += new EventHandler(context_AcquireRequestState);
}

#endregion

private void context_AcquireRequestState(object sender, EventArgs e)
{
HttpApplication app = (HttpApplication)sender;
HttpContext context = app.Context;
//IHttpHandler handler = app.Context.Handler;

string extension = VirtualPathUtility.GetExtension(app.Context.Request.Path).ToLower(Common.Common.CultureEN);

if (extension == ".aspx")
{
string path = app.Context.Request.AppRelativeCurrentExecutionFilePath.ToLower(Common.Common.CultureEN);
Utility.RedirectUrl = path;

if (!string.IsNullOrEmpty(app.Context.Request.QueryString.ToString()))
Utility.RedirectUrl += "?" + app.Context.Request.QueryString;

User currentUser = Utility.CurrentUser;

const string loginUrl = "~/admin/login.aspx";

if (!path.Contains(loginUrl)) // exception
{
// check user
if (path.Contains("/admin/"))
{
if (currentUser == null || currentUser.IsAdmin != true)
{
context.Response.Redirect(loginUrl + "?rUrl=" + Utility.RedirectUrl.ToLower(Common.Common.CultureEN));
}
}
}
}
}
}
}

global.asax:

void Application_AcquireRequestState(object sender, EventArgs e)
{
...
}

search this blog (most likely not here)