Thursday, 22 August 2013

Calls to service request credentials only on one method, and always fails

Calls to service request credentials only on one method, and always fails

I have a Silverlight website and a WCF service. They use Windows
authentication. The Silverlight site correctly picks up the current user
and passes this to the WCF service so that it can load the correct menu
(if the user is not found or has no permissions, nothing is loaded). The
service is hosted in a Windows service.
On one particular method, the same one every time, the user is asked for
credentials - then regardless of what they enter, the method fails. To get
to that method, half-a-dozen service calls have already been made without
challenging for credentials and worked perfectly.
The issue only occurs with the service on the test server, I can't
replicate it when I run the service locally, but I can replicate it when
running the Silverlight client locally - an exception is thrown when
retrieving the response from the service (the ever-helpful Silverlight
'NotFound' error). Because of the length of time the method should take, I
believe it is challenging for credentials immediately on request but
failing when the result gets back. No exceptions are thrown by the
service.
The test service and the local dev service use exactly the same
configuration.
I've used Fiddler to check whether it is clientaccesspolicy/crossdomain
problems, but these are loaded fine (and both the client on the test
server and the WCF service are on the same domain).
Does anyone have any ideas why one particular method might be challenging
for credentials when the service is on the test server but not when
running locally, or any clues to debugging why this might be the case?

No comments:

Post a Comment