Page 1 of 1

Failed to Authenticate the Current User Error

Posted: Fri Aug 23, 2013 5:46 pm
by tlyde_LCTMHS
Hi,

I am getting the below error message when trying to open a Softpro order. I am following the example givin in the SDK documentation. The lines of code and the error message are below. Also, I get the following when trying to go to the server via the browser "HTTP Error 503. The service is unavailable". Does anyone know how to fix this. Thanks.

Code:
NetworkCredential credentials = new NetworkCredential(@"username", @"password", SoftPro.ClientModel.Constants.ServerDomain);
SelectServer sps = new SelectServer(null, new Uri(@"http://SELECT-MID:8080/"), credentials);
OrderTracking ot = sps.GetService<OrderTracking>();

Error msg:
ProFormApiSample.vshost.exe Warning: 0 : An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
Fault Code: http://www.w3.org/2003/05/soap-envelopeSender -> http://docs.oasis-open.org/wss/2004/01/ ... urityToken
Reason: An error occurred when processing the security tokens in the message.
Message: An error occurred when processing the security tokens in the message.

ProFormApiSample.vshost.exe Information: 0 : Failed to authenticate the current user. An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
A first chance exception of type 'System.Security.SecurityException' occurred in SoftPro.ClientModel.dll

Re: Failed to Authenticate the Current User Error

Posted: Mon Aug 26, 2013 11:22 am
by john.morton
Also, I get the following when trying to go to the server via the browser "HTTP Error 503. The service is unavailable"
While we do expose our API via WCF Services, it is not intended to be accessed directly in this fashion.

In regards to the authentication error you're getting, let's make sure of the most basic thing first. Can you log in using the Select client with the username/password you're trying?

Re: Failed to Authenticate the Current User Error

Posted: Mon Aug 26, 2013 11:35 am
by tlyde_LCTMHS
Yes, I can log in using the client

Re: Failed to Authenticate the Current User Error

Posted: Mon Aug 26, 2013 3:58 pm
by tlyde_LCTMHS
Thanks John,

Fixed the problem. I was trying to use my Windows credentials to login. If using Windows credentials to login, leave the credentials off:

NetworkCredential credentials = new NetworkCredential(@"username", @"password", SoftPro.ClientModel.Constants.ServerDomain);
SelectServer sps = new SelectServer(null, new Uri(@"http://SELECT-MID:8080/"));
OrderTracking ot = sps.GetService<OrderTracking>();