I am new to coding in C# and to the open source blog engine called blogengine. I wanted to retrieve the logged in user name when a page loads. On the code behind of the "Page" file i placed the following code:
string username = System.Security.Principal.WindowsIdentity.GetCurrent().User;
I received the following error:
Cannot implicitly convert type 'System.Security.Principal.SecurityIdentifier' to 'string'
Can you tell me what I need to do to get this simple task done? I thought for sure the "User" would be a string value.