SOLVED .NET Application does not recognize my credentials

Joined
Jun 6, 2016
Messages
53
Reaction score
2
I have a .NET application C# V4.51 vs 2013 , Win 10 Prof

Application has problem read /write with IO system - permit ion problem .

I ran this app user my account , Created with Administrative rights

I got replay in previous post to check admin rights

--------

public static bool IsUserAdministrator()
{
bool isAdmin;

try
{
WindowsIdentity user = WindowsIdentity.GetCurrent();
WindowsPrincipal principal = new WindowsPrincipal(user);

isAdmin = principal.IsInRole(WindowsBuiltInRole.Administrator);
}
catch (UnauthorizedAccessException ex)
{
isAdmin = false;
}
catch (Exception ex)
{
isAdmin = false;
}
return isAdmin;
}
---------------------------------------

I always return that i'm not administrator
=================

I check my account again , and via Manager see me account administrators group

==========================================

What I can do about it


Application attached


Thank you for you efforts make windows 10 better.
 

Attachments

  • Program.zip
    1.3 KB · Views: 235

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top