如何在ASP.NET中使用SharpSVN?

发布于 2024-08-27 09:38:51 字数 756 浏览 8 评论 0原文

尝试在 ASP.NET 应用程序中使用 SharpSVN。到目前为止,除了麻烦之外什么也没有。首先,即使 NETWORK SERVICE 对目录具有完全权限,我仍然收到“锁定”文件(不存在)的权限错误。最后,我沮丧地授予每个人完全控制权。现在我收到一个新错误:

OPTIONS of 'https://server/svn/repo': 授权失败:无法对服务器进行身份验证:拒绝基本质询 (https://server)

无论我是否设置了以下 DefaultCredentials,都会发生这种情况:

using (SvnClient client = new SvnClient())
{
    //client.Authentication.DefaultCredentials = new System.Net.NetworkCredential("user", "password");
    client.LoadConfiguration(@"C:\users\myuser\AppData\Roaming\Subversion");

    SvnUpdateResult result;
    client.Update(workingdir, out result);
}

有什么线索吗?我希望这个库有一些文档,因为它看起来很有用。

Trying to use use SharpSVN in an ASP.NET app. So far, it's been nothing but trouble. First, I kept getting permission errors on "lock" files (that don't exist), even though NETWORK SERVICE has full permissions on the directories. Finally in frustration I just granted Everyone full control. Now I get a new error:

OPTIONS of 'https://server/svn/repo': authorization failed: Could not authenticate to server: rejected Basic challenge (https://server)

This happens whether I have the DefaultCredentials set below or not:

using (SvnClient client = new SvnClient())
{
    //client.Authentication.DefaultCredentials = new System.Net.NetworkCredential("user", "password");
    client.LoadConfiguration(@"C:\users\myuser\AppData\Roaming\Subversion");

    SvnUpdateResult result;
    client.Update(workingdir, out result);
}

Any clues? I wish there was SOME documentation with this library, as it seems so useful.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

那些过往 2024-09-03 09:38:51

您需要授予权限的用户很可能是 ASPNET 用户,因为这是 ASP.NET 代码默认运行的用户。

The user you need to grant permission is most likely the ASPNET user, as that's the user the ASP.NET code runs as by default.

江湖正好 2024-09-03 09:38:51

ASPNET 用户是本地帐户,最好您希望使用为此特定原因设置的网络帐户在模拟块中运行此代码

ASPNET user is a local account, preferably youd'd want to run this code in an Impersonate block, using a network account set up for this specific reason

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文