使用当前的HTTP请求标识为SharpSVN默认凭据 [英] Using the current HTTP request identity as the default credentials for SharpSVN

查看:353
本文介绍了使用当前的HTTP请求标识为SharpSVN默认凭据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过一个Web应用程序来调用SharpSVN RemoteCreateDirectories和希望的凭据是,已登录的用户。可以这样做隐式或者是否需要按照下面的示例中的用户名和密码?

I’m trying to call RemoteCreateDirectories in SharpSVN through a web app and want the credentials to be that of the logged on user. Can this be done implicitly or is the username and password required as per the example below?

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

我不希望从用户explciitly要求凭据(它是一个集成的身份验证的应用程序),所以我解决这个唯一看到的另一种方法是使用的是不理想的服务帐户。

I don’t want to explciitly request credentials from the user (it’s an integrated auth app) so the only other way I see around this is to use a service account which is not ideal.

推荐答案

终于找到了的引用基本上说,这是不可能的使用当前用户的身份和唯一选项是目录树的人工建筑或使用管理/服务帐户。我选择了后者;不理想,但我并仍然在运行。

Finally found a reference which essentially says this is not possible using the identity of the current user and the only options are manual construction of the directory tree or using an admin / service account. I opted for the latter; not ideal but I’m up and running nonetheless.

这篇关于使用当前的HTTP请求标识为SharpSVN默认凭据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆