Author: Caion | Posted on: 12/3/2009 1:54:38 PM | Views : 376

Hello everyone..
I have a problem with URL rewriting and Forms authentication in ASP.NET... Based on articles I've found on the net, I have created the following HttpModule:

public class UrlRewriter : IHttpModule { private UrlRewriteConfigurationSection config; public UrlRewriter() { config = ConfigurationManager.GetSection("urlrewrites") as UrlRewriteConfigurationSection; } public void Dispose() { } public void Init(HttpApplication context) { httpApplication.AuthorizeRequest += new EventHandler(OnAuthorizeRequest); } private void OnAuthorizeRequest(object sender, EventArgs e) { string requestedPath = HttpContext.Current.Request.Path; foreach (UrlRewriteRule rule in config.UrlRewriteRules) { RegexOptions options = config.IgnoreCase ? RegexOptions.I ...

Go to the complete details ...