views:

50

answers:

1

Hi there,

I am trying to check if the user belongs to someone's friendlist from the database and redirect him accordingly.

I am doing this in a routehandler called by Global Asax.

I just want to know how to get the username (from the login information) in the route handler class (or Global asax)

I used this:

string username = HttpContext.Current.User.Identity.Name;  

and very strangely, its assigning ".aspx" as the username!!

ps: i did search for similar question but in vain. sorry if I dint search it thoroughly.

+1  A: 

It should work...must be something in your authentication method.

How do you have it setup?

It looks like you are doing the authentication yourself and assigning the identity from the wrong server variable

Ed B
I just joined this company and my project manager has gone off to a vacation.. so i am not really sure how its being done but I am sure that we have aspnet memberships for the initial roles... is this what you were expecting?
iamserious