Trouble accessing .NET 2.0 Membership stuff from HTTP Module

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top