I'm using eBay.Services to find items.
The code is as bellow
eBay.Services.Finding.FindingServicePortTypeClient client;
ClientConfig config = new ClientConfig();
config.EndPointAddress = "http://svcs.ebay.com/services/search/FindingService/v1";
config.ApplicationId = "xxxxx-xx-xxx-xxxxxxxxx-xxxxxxxx";
client = FindingServiceClientFactory.getServiceClient(config);
This code working fine in my .net website but not working in my WindowsService
'client.State' is showing 'Created' in website,
whereas
'client.State' always showing 'Faulted' in WindowsService.
'client.InnerChannel' threw an exception of type 'System.ServiceModel.CommunicationObjectFaultedException'
Please suggest.
Nilesh SawardekarPosted Jul 6, 2016, 1:50 PM
Depending on your binding (protocol) used, this might be one of several methods:
Windows authentication: on by default for wsHttp and netTcp bindings - user's Windows account will be used (and this requires the calling user and the called service to be on the same Windows domain, or at least in trusted domains)
UserName/Password authentication against ASP.NET membership - this typically requires quite some configuration, so I don't think you'll have that "on by default"
X.509 certificates - again, requires configuration
My guess would be: your web IIS server somehow doesn't understand / interpret the caller's identity correctly. Is that IIS server maybe not member of the Active Directory domain? Or is the caller's machine not member of that same domain? It must be something in that area, I think.
Marc
PS:
To turn off security all together (NOT RECOMMENDED! - at least not for real production systems),