Hello

I am getting the following error in my Manage.aspx file:

'GetUserName' is not a member of 'System.Security.Principal.IIdentity'. I had not opened that file previously, so I can only think that changes I have made - or NuGent Package Manager has changed when I installed Microsoft.AspNet.Identity.Core 2.1.0 - have impacted on other files.

Specifically, the error points to this line:

<p>You're logged in as <strong><%: User.Identity.GetUserName() %></strong>.</p>

To me that implies that the user is logged in but the script is unable to display his name because it can't understand GetUserName.

I am not sure if this is related, but in the Manage.aspx.vb file, I have:

User.Identity.GetUserId

Thanks for any advice!

I eventually resolved that, pritaeas, using:

 <p>You're logged in as <strong><%: User.Identity.Name()%></strong>.</p>

Thanks for your reply (I guess you were right!)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.