My machine name is lowercased (i see that in Advanced system settings dialog, Computer Name tab) but System.Environment.MachineName
reports it uppercased. Why is that? This is a real problem for me because from my tests PrincipalPermissionAttribute
performs case sensitive comparison for role names (i map my custom roles to Windows groups and my environment is non-domain). Any advise?
Use Dns.GetHostName instead, that should return it with the correct case (at least it does on my computer).