1

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.

Abdullah Saurav
  • 33
  • 1
  • 1
  • 9
  • That's a normal message to get when you are not logged in to the server. – Bryan Pendleton Oct 13 '11 at 13:43
  • i am afraid its not that kind of problem. different forums say that its the problem regarding ticket expiration. I have found some solution about this. But could not convert it into C# language. Actually I m not getting any clue where I should write codes for this and which library functions of the API will be appropriate for this. For now I am doing some trial and error method. But it so brutal you know – Abdullah Saurav Oct 17 '11 at 05:20
  • 1
    Do you call Login() on the P4Connection after you've connected? – Mike O'Connor Oct 20 '11 at 18:03
  • Yes I do.does it have any problem?I have made an application with this perforce api.6 workstation does not have any problem. Just one having this problem.Some ticket expiring problem is there. I could not find out how to solve this with P4.Net. Any suggestion? – Abdullah Saurav Oct 24 '11 at 10:47
  • i Got where its getting problem. the code is P4RecordSet recordd = p4.Run("workspaces", "-u", userName); this code has getting the exception perforce password invalid or unset – Abdullah Saurav Oct 24 '11 at 11:57

1 Answers1

1

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);
Rup
  • 33,765
  • 9
  • 83
  • 112
Abdullah Saurav
  • 33
  • 1
  • 1
  • 9