to check to see if the user is authenticated with the .net 2.0 membership
stuff. I am trying this:
If application.Context.User.Identity.IsAuthenticated Then
app.Context.Response.Write("user authenticated")
End If
I get a "Object Reference not set to an instance of anobject." error on
application.Context.User.Identity.IsAuthenticated.
I am always getting an error. Does anyone have any suggestions? Do I need
to configure anything special for the module? Thanks.You should look into handling the PostAuthenticateRequest event instead.
That way you don't have ordering issues with the other modules during the
AuthenticateRequest event.
-Brock
DevelopMentor
http://staff.develop.com/ballen
> I am trying to create an HTTP module to run on ASP.NET 2.0. The
> module needs to check to see if the user is authenticated with the
> .net 2.0 membership stuff. I am trying this:
> If application.Context.User.Identity.IsAuthenticated Then
> app.Context.Response.Write("user authenticated")
> End If
> I get a "Object Reference not set to an instance of anobject." error
> on application.Context.User.Identity.IsAuthenticated.
> I am always getting an error. Does anyone have any suggestions? Do I
> need to configure anything special for the module? Thanks.
Thanks. That fixed it.
"Brock Allen" wrote:
> You should look into handling the PostAuthenticateRequest event instead.
> That way you don't have ordering issues with the other modules during the
> AuthenticateRequest event.
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
> > I am trying to create an HTTP module to run on ASP.NET 2.0. The
> > module needs to check to see if the user is authenticated with the
> > .net 2.0 membership stuff. I am trying this:
> > If application.Context.User.Identity.IsAuthenticated Then
> > app.Context.Response.Write("user authenticated")
> > End If
> > I get a "Object Reference not set to an instance of anobject." error
> > on application.Context.User.Identity.IsAuthenticated.
> > I am always getting an error. Does anyone have any suggestions? Do I
> > need to configure anything special for the module? Thanks.
>
>
0 comments:
Post a Comment