Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
I am getting
"Error HRESULT E_FAIL has been returned from a call to a COM component"
error when i am trying to upgrade the service reference. what should i do? am i missing some thing..plz suggest some solution.i m using mvvm,prism,silverlight 4,wcf
Posted
Updated 26-Jun-12 22:44pm
v2

delete web service reference and add it once a again.Find the “Web.config” file in Solution Explorer, and double-click on it to open it up. Once you’ve opened it, scroll to the bottom and look for the <services> section.

<service behaviorconfiguration="<br" mode="hold"> "AdventureWorks_WebServer.Service1Behavior"
name="AdventureWorks_WebServer.Service1">

<endpoint address="" binding="customBinding">
bindingConfiguration="customBinding0"
contract="AdventureWorks_WebServer.Service1" />

<endpoint address="mex">
binding="mexHttpBinding"
contract="IMetadataExchange" />



Notice that there are two endpoint tags: the top one, which has an address=””, and the bottom one, which has an address=”mex”. We want to focus on the top one, with the address=””, as follows:

<endpoint address="" binding="customBinding">
bindingConfiguration="customBinding0"
contract="AdventureWorks_WebServer.Service1" />
In order to successfully communicate with the Silverlight client application, we need to change the binding to “basicHttpBinding”, and remove bindingConfiguration, as follows:
<endpoint address="" binding="basicHttpBinding">
contract="AdventureWorks_WebServer.Service1" />
 
Share this answer
 
delete web service reference and add it once a again.Find the “Web.config” file in Solution Explorer, and double-click on it to open it up. Once you’ve opened it, scroll to the bottom and look for the <services> section.

<service behaviorconfiguration="<br" mode="hold"> "AdventureWorks_WebServer.Service1Behavior"
name="AdventureWorks_WebServer.Service1">

<endpoint address="" binding="customBinding">
bindingConfiguration="customBinding0"
contract="AdventureWorks_WebServer.Service1" />

<endpoint address="mex">
binding="mexHttpBinding"
contract="IMetadataExchange" />



Notice that there are two endpoint tags: the top one, which has an address=””, and the bottom one, which has an address=”mex”. We want to focus on the top one, with the address=””, as follows:

<endpoint address="" binding="customBinding">
bindingConfiguration="customBinding0"
contract="AdventureWorks_WebServer.Service1" />
In order to successfully communicate with the Silverlight client application, we need to change the binding to “basicHttpBinding”, and remove bindingConfiguration, as follows:
<endpoint address="" binding="basicHttpBinding">
contract="AdventureWorks_WebServer.Service1" />
 
Share this answer
 

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