Tuesday, July 12, 2011

An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.

I am currently working on a new reservation website that requires to make connections to a third party data provider to get the latest rates and availabilities. I am using a web service to get the data in real time, and the web service itself uses basic authentication.

Now, I have tried connecting using the traditional C#.NET web service wrapper, which from my experience is less strict and very easy to use. For some reason, though it would not pass through the basic authentication in the header, and after a few hours of failed Google searches I decided to try an use the newer service reference model wrapper.

This now seemed to work better establishing a secure connection between myself and the third party web service. After solving some initial security issues, I have come across the above mentioned error:

An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
And again after several Google searches, what seems to be causing it is a clock difference between my PC and the third party server.

SURELY NOT!!!

I need to do more investigation into this, but most articles that cover this subject mention the clock difference as the likely cause.

Finally, I found it in MSDN forum – it was due to system clock not sync between the web server and the web service server!!! According to Microsoft the 2 servers can only have certain time difference for security reason. (http://www.mythos-rini.com/blog/archives/2536)
 What now.....?

No comments: