Use current HTTP request id as default credentials for SharpSVN

I am trying to call RemoteCreateDirectories in SharpSVN through a web application and want the credentials to be the same as the logged in user. Is it possible to do this implicitly or specify a username and password in accordance with the example below?

using (var svnClient = new SvnClient())
{
  svnClient.Authentication.DefaultCredentials = new NetworkCredential(@"aaa\bbb", "ccc");
  svnClient.LoadConfiguration(repoName);
  svnClient.RemoteCreateDirectories(uris, args);
}

I don’t want to explicitly request credentials from the user (his integrated auth application), so the only other way I see around this is to use a service account, which is not ideal.

+3
source share
3 answers
0

CredentialCache.DefaultCredentials . / .

, Subversion SharpSvn.

+1

CredentialCache.DefaultCredentials - .

http://support.microsoft.com/kb/813834

0
source

Source: https://habr.com/ru/post/1716867/


All Articles