lunes, 3 de febrero de 2014

User.Identity.Name returns empty string

When we use the instruction User.Identity.Name for our aspx page we return the user name to log on or get up the site, and returns an empty string, this is because anonymous access is enabled virtual directory.
SOLUTION
Sign in IIS, then select the virtual directory of the project, right click, properties, directory security, click the Edit button, the anonymous access box, they should NOT be selected.

Try again and serve the instruction

No hay comentarios.:

Publicar un comentario