문제

I'm developping for CRM 2011 and I have to get the files in a SharePoint library. I'm able to get the files, but my problem is to hide the password in the code.

here my code :

string password = "password";
SecureString securePassword = new SecureString();
for (int g = 0; g < password.Length; g++)
  securePassword.AppendChar(password[g]);
ClientContext ctx = new ClientContext(url);
ctx.Credentials = new NetworkCredential("login", securePassword, "Foo");

return ctx;

I also tried with ctx.Credentials = CredentialCache.DefaultNetworkCredentials; but the user don't have the rights for the SharePoint Library.

Anyone has a solution to hide the password?

Thanks!

도움이 되었습니까?

해결책

Create a custom entity called "SharePoint Config" with username and password. When a record is created encrypt the password using a plugin / JavaScript. From your custom workflow code get the password using the username from the "SharePoint Config" and decrypt the password.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top