Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a windows service ,it need to call the wcf service ,the wcf service is hosted in IIS, how can call the wcf service.

The wcf service is hosted in IIS successfully and also i can call it from windowsform successfully, but when i try to call the wcf service from window service using the same way, it's failed. By the way , the WCF service is hosted in remote computer.

The return error is : Could not find default endpoint element that references contract ;ServiceReference1.IService1' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

I check the Event Viewer and also found an error:

DCOM was unable to communicate with the computer EBMESF009 using any of the configured protocols.

Do i use the wrong way to call wcf? Or other reason?
Posted
Updated 5-Dec-12 21:14pm
v2
Comments
pree_kh 6-Dec-12 1:32am    
refer to the link below:
http://msdn.microsoft.com/en-us/library/ms733766.aspx

1 solution

 
Share this answer
 
Comments
zyysusan 6-Dec-12 2:37am    
Thanks, Krunal.
The wcf service is hosted in IIS successfully and also i can call it from windowsform successfully, but when i try to call the wcf service from window service using the same way, it's failed. By the way , the WCF service is hosted in remote computer.

The return error is : Could not find default endpoint element that references contract 'ServiceReference1.IService1' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

I check the Event Viewer and also found an error:

DCOM was unable to communicate with the computer EBMESF009 using any of the configured protocols.

Do i use the wrong way to call wcf? Or other reason?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900