I wrote an .NET Web Application to make Perforce connection but keeps getting below error message. This issue only occurs when I publish into the server. When I run this application in the local machine, it works perfectly fine but in the server, it looks like it keeps failing when I try to login.
[P4Exception: Fatal client error; disconnecting! Operation 'client-SetPassword' failed. Too many trys to get lock C:\WINDOWS\system32\config\systemprofile\p4tickets.txt.lck. ]
Perforce.P4.P4Exception.Throw(String cmd, String[] args, P4ClientErrorList errors, P4ClientInfoMessageList details) in c:\tmp\104564385\P4.NET\r19.2\p4api.net\p4api.net\P4Exception.cs:393
Perforce.P4.P4Server.RunCommand(String cmd, UInt32 cmdId, Boolean tagged, String[] args, Int32 argc) in c:\tmp\104564385\P4.NET\r19.2\p4api.net\p4api.net\P4Server.cs:1106
Perforce.P4.P4Command.RunInt(StringList flags) in c:\tmp\104564385\P4.NET\r19.2\p4api.net\p4api.net\P4Command.cs:503
Perforce.P4.P4CommandResult..ctor(P4Command cmd, StringList flags) in c:\tmp\104564385\P4.NET\r19.2\p4api.net\p4api.net\P4CommandResult.cs:142 Perforce.P4.P4Command.Run(StringList flags) in c:\tmp\104564385\P4.NET\r19.2\p4api.net\p4api.net\P4Command.cs:373
Perforce.P4.Connection.Login(String password, Boolean allHostTicket) in c:\tmp\104564385\P4.NET\r19.2\p4api.net\p4api.net\Connection.cs:1071
Here is my partial code for connect/login
private void Connect(Connection con)
{
con.UserName = username;
if (con.Client == null)
{
con.Client = new Client();
con.Client.Name = "";
}
con.Connect(null);
con.Login(password);
}
I've been also trying to use P4.Option and store password inside here and pass it to con.Connect() as a parameter instead of using con.Login() but it had the same issue (only when I published to the server.)
Can someone please help to solve this issue?