Posted on: 7/15/2012 12:46:35 PM | Views : 409



Hi All,
I am running writing a webapp w/ windows authentication. All i am trying to do is pass current login user credentials to PScredentials type. When i debug i notice that secureusername and securepassword is empty.

Below is the code

NetworkCredential credentfials = System.Net.CredentialCache.DefaultNetworkCredentials;

 System.Security.SecureString securepassword = credentfials.SecurePassword; string secureusername = credentfials.UserName; PSCredential credentials = new PSCredential(secureusername, securepassword);


...

Go to the complete details ...