Click here to Skip to main content
15,905,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please see below code
C#
public class URLRewriter : IHttpModule {

public void Dispose() {

}
public void Init( HttpApplication context ) {
    context.BeginRequest += new EventHandler( context_BeginRequest );
}

void context_BeginRequest( object sender, EventArgs e ) {
            //code to make custom URL
    }
}

Here i am using IHttpModule for making custom URL redirection. But it showing error while setting session in destination page.

ERROR LINE Code : HttpContext.Current.Session[USERADMIN] == null

ERROR MEssage: "{System.NullReferenceException: Object reference not set to an instance of an object."

Please help me.
Thanks
Posted
Updated 22-Aug-13 3:55am
v2

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900