Search code examples
c#asp.netdataservice

Failed to publish service reference (Web Deploy)


I am trying to publish my asp.net web application and it's work, But the problem is when I use my search engine to search in database an error show.

Maybe I also need to publish DataServiceReference? but how can I publish this DataServiceReference?

Error:

There was no endpoint listening at http://localhost:8732/Design_Time_Addresses/DataService/Service1/ that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

This is my Web.Config

<client>
  <endpoint address="http://localhost:8732/Design_Time_Addresses/DataService/Service1/" 
            binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService1" 
            contract="DataServiceReference.IService1" 
            name="WSHttpBinding_IService1">
    <identity>
      <dns value="localhost" />
    </identity>
  </endpoint>
</client>

I try to change localhost:8732 to 10.10.*.*** but it's the same still not working.

Maybe this can help...

This is my project Image:

enter image description here

This is what I use to publish my project.

enter image description here


Solution

  • If you have data service, in your solution, you have to publish it to server as well too, and change endpoint address to the location where you publish you WCF service.