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
Failed to Authenticate the Current User Error
Moderator: Phil Barton
-
- Posts: 8
- Joined: Thu Jul 18, 2013 12:21 pm
-
- Posts: 89
- Joined: Wed Nov 16, 2011 11:51 am
Re: Failed to Authenticate the Current User Error
While we do expose our API via WCF Services, it is not intended to be accessed directly in this fashion.Also, I get the following when trying to go to the server via the browser "HTTP Error 503. The service is unavailable"
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?
-
- Posts: 8
- Joined: Thu Jul 18, 2013 12:21 pm
Re: Failed to Authenticate the Current User Error
Yes, I can log in using the client
-
- Posts: 8
- Joined: Thu Jul 18, 2013 12:21 pm
Re: Failed to Authenticate the Current User Error
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>();
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>();