Abdullah Saurav
Abdullah Saurav

Reputation: 33

Perforce password (P4PASSWD) invalid or unset. how to solve using 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.

Upvotes: 1

Views: 15282

Answers (1)

Abdullah Saurav
Abdullah Saurav

Reputation: 33

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);

Upvotes: 1

Related Questions