I am receiving a null exception every time I try to send the HttpContext.Current.User.Identity.Name to the label. Any ideas why?
This is what im using.
String Utilizador = Page.User.Identity.Name;
Response.Write(Utilizador);
Label1.Text = Utilizador;
Since you are authenticated and you’re getting the
NullReferenceExceptioninLabel1.Text = Utilizador;, you don’t have a reference to that label.Rename it on the MasterPage, compile it, name it again
Label1(i would strongly recommended to use better names for exampleLblUserName). Then recompile it.