3

I've spend hours and hours on this and simply can't get it to work. Maybe my understanding of hosting WCF service and creating a client for it isn't correct.

My website has a WCF Service added to it, with the following config...

<system.serviceModel>

<bindings>
  <wsHttpBinding>
    <binding name="Binding1">
      <security mode="None">
        <transport clientCredentialType="None" />
        <message establishSecurityContext="false" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>

    <behaviors>
        <serviceBehaviors>
            <behavior name="MyWCFWebApp.Service1Behavior">
                <serviceMetadata httpGetEnabled="true"/>
                <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
        </serviceBehaviors>
    </behaviors>

    <services>
        <service behaviorConfiguration="MyWCFWebApp.Service1Behavior" name="MyWCFWebApp.Service1">
            <endpoint address="" binding="wsHttpBinding" contract="MyWCFWebApp.IService1" bindingConfiguration="Binding1">
            </endpoint>
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
        </service>
    </services>

</system.serviceModel>

When I run the website through Visual Studio using build in web server, I can access the webservice through http://localhost:9988/Service1.svc

but...

When hosting the web site through cassiniDev Server, binding to ip and hostname, I can access the wcf service through http://localhost:9988/Service1.svc, but as soon as I try to access the wcf service using ip or hostname http://10.111.202.73:9988/Service1.svc, it returns the following error:

"No protocol binding matches the given address 'http://10.111.202.73:9988/Service1.svc'. Protocol bindings are configured at the Site level in IIS or WAS configuration."

I have no idea why this is happening. Any ideas?

FaNIX
  • 1,888
  • 6
  • 33
  • 60
  • where is the IP 10.111.202.73:9988 coming from? – Dustin Davis Jun 08 '11 at 03:12
  • A few flaws in my post. I edited it. 10.111.202.73 is the ip address of the local computer trying to access the wcf service through ip address instead of localhost. Its the same pc the wcf service is running of. – FaNIX Jun 08 '11 at 03:44
  • It seems to be a bug with WCF and cassini :( No solution available. http://ultidev.com/Forums/default.aspx?g=posts&t=351 – FaNIX Jun 08 '11 at 05:08
  • It is good practice to define the address in your server config as http://*:9988 rather than http://localhost:9988, but I don't know if that will help in this case – Franchesca Jun 18 '11 at 12:59

2 Answers2

1

So it turns out the issue was related to cassinidev webservice, which doesn't support WCF 3.5.... Took me a while to figure that one out...

FaNIX
  • 1,888
  • 6
  • 33
  • 60
0

maybe you can try to host your service in a console app, just as test to see if it's IIS related.

msjonathan
  • 514
  • 2
  • 11
  • 26