Click here to Skip to main content
13,793,777 members
Rate this:
 
Please Sign up or sign in to vote.
See more: , +
I have WCF Service Running My Local IIS
[^]
When i Access Local every thing is Ok, but when i try to access Over Internet Using Public IP that Mapping to my Local IP and Post,
after I add Wcf Service in Client and i Call
I Got This Error:
There was no endpoint listening at http://abdirizak-pc:90/HelloService.svc/HelloService that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException,


thanks for U Help...

What I have tried:

My Config File :
<?xml version="1.0"?>
<configuration>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="mexbehavior">
          <serviceMetadata httpGetEnabled="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="mexbehavior" name="HelloService.HelloService">
        <endpoint address="HelloService" binding="basicHttpBinding" contract="HelloService.IHelloService"/>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:90"/>
          </baseAddresses>
        </host>
      </service>
    </services>
  </system.serviceModel>
  <system.web>
    <compilation debug="true" targetFramework="4.5.2" />
    <httpRuntime targetFramework="4.5.2" />
  </system.web>
</configuration>
Posted 28-Nov-16 4:14am
Updated 28-Nov-16 19:35pm
v3
Comments
F-ES Sitecore 28-Nov-16 10:04am
   
You can't have the endpoint binding as localhost, it needs to be the publically accessible hostname, so the public IP or whatever.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

It's because you're using localhost. You have to use the IP address of the machine where the service is hosted.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Because at base address you have give the address of local host you have to give your public i.p address here or url of your server. And if its also not working the you have add multiple endpoints.

<endpoint name="basicHttpEndpoint"

                  address=""

                  binding="basicHttpBinding"

                  bindingConfiguration="basicHttpBindingConfig"

                  contract="IService1" />
        <endpoint name="webHttpEndpoint"

                  address="/support"

                  binding="webHttpBinding"

                  bindingConfiguration="webHttpBindingConfig"

                  contract="IService1"

                  behaviorConfiguration="jsonBehaviour" />
        <endpoint name="mexHttpEndpoint"

                  address="/mex"

                  binding="mexHttpBinding"

                  contract="IMetadataExchange" />
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web03 | 2.8.181207.3 | Last Updated 29 Nov 2016
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100