强制密码 (P4PASSWD) 无效或未设置。如何使用P4.Net解决

发布于 2024-12-09 14:30:56 字数 542 浏览 0 评论 0原文

我确实在 API 方面遇到了一些其他问题。 安装了 Microsoft Visual C++ 2010 Redistributable Package (x86)

所以我从http:// www.microsoft.com/download/en/details.aspx?id=5555

用于解决这些问题。安装此软件包后问题得到解决。但是我的一些客户在安装此程序后现在出现此错误消息。错误消息如下:

运行 Perforce 命令时出错! 强制密码 (P4PASSWD) 无效或未设置。

异常来自这一行:

P4RecordSet recordd = p4.Run("workspaces", "-u", userName);

这里的 userName 是 perforce 服务器的有效用户名

对于其他语言的这个问题有很多帮助。但我无法获得 P4.NET 的任何帮助。任何建议请。

I did have some other issue with the API. so I installed Microsoft Visual C++ 2010 Redistributable Package (x86) from

http://www.microsoft.com/download/en/details.aspx?id=5555

for solving those issues. the issues were solved installing this package. But some of my clients are now having this error message after installing this.the error message is like this :

Error running Perforce command!
Perforce password (P4PASSWD) invalid or unset.

the exception is coming from this line:

P4RecordSet recordd = p4.Run("workspaces", "-u", userName);

here userName is a valid username of perforce server

There are lots of help regarding this issue with other language. But I could not get any help for P4.NET. Any suggestion please.

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

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

发布评论

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

评论(1

一身骄傲 2024-12-16 14:30:56

我找到了解决方案。主要问题是登录时,p4.password 返回票证值。但之后我将密码分配给 p4.password 。就是这样。

p4.Login(password);
p4.Password = password; // here password is the input.

所以 p4.password 与票号不匹配。所以密码就被取消了。我刚刚删除了 p4.password = password 行。
然后这段代码执行成功

P4RecordSet recordd = p4.Run("workspaces", "-u", userName);

I found the solution. main problem was while login a ticket value was returned at p4.password. But I was assigning password to p4.password after that. It was just like that.

p4.Login(password);
p4.Password = password; // here password is the input.

so p4.password did not match with the ticket number. So the password got unset. I just removed p4.password = password line.
And later this code executed successfully

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