Windows user name in a smart client

E

Erik

I'm trying to get the login name for the user, and this is the code I use:



string userName = WindowsIdentity.GetCurrent().Name;



This works fine when the program is launched locally or from a network
drive. However, when I run the program as a smart client from our intranet
server the program fails on this line. How do I determine the windows user
when running my program as a smart client?



Thanks,

Erik.
 
E

Erik

Nvm, I found the problem. I forgot to configure the security policy in .NET
to trust my intranet zone.



Erik.
 

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