Troubleshooting Multiple Endpoints Problem in WCF

Posted by omatase on Stack Overflow See other posts from Stack Overflow or by omatase
Published on 2010-05-02T15:52:43Z Indexed on 2010/05/02 15:57 UTC
Read the original article Hit count: 292

Filed under:
|

I have been using WCF for a few years now and am fairly comfortable with it, however there is one simple WCF concept that I have yet to employ and am having difficulties with it.

Following this article about WCF addressing as it specifically relates to multiple endpoints in IIS I see these two excerpts:

"Suppose you have a file named calc.svc and you place it in a virtual directory that corresponds to (http://localhost:8080/calcservice). The base address for this service will be (http://localhost:8080/calcservice/calc.svc)."

and

"Now, consider the endpoint configuration found in the virtual directory’s web.config file (in Figure 3). In this case, the address of the first endpoint becomes the same as the base address (http://localhost:8080/calcservice/calc.svc) since I left the endpoint address empty. The address of the second endpoint becomes the combination of the base address appended with "secure", like this: (http://localhost:8080/calcservice/calc.svc/secure)."

Now in my application I'm trying to create two endpoints for the same service (shown below). The service name is MainService.svc. For endpoint one I have address="" and endpoint two has address="Soap11". Bringing the site up in IIS I can successfully hit this URL: (https://localhost:444/MainService.svc). This is the base address for the service according to all the documentation I can find. According to this article and others I have seen that confirm its information I should have the second endpoint at (https://localhost:444/MainService.svc/Soap11) but if I navigate to that URL I get a .Net exception indicating the resource is not found.

Is there a tool I can use to see where my different endpoints will be available? Maybe some IIS or aspnet_isapi.dll logging I can turn on? My web.config section defining my endpoints follows.

Thanks in advance for your help

<service behaviorConfiguration="MyService.MainServiceBehavior" name="MyService.MainService">
  <endpoint address="" binding="wsHttpBinding" bindingConfiguration="WSBindingConfig" contract="MyService.IMainService">
    <identity>
      <dns value="localhost" />
    </identity>
  </endpoint>
  <endpoint address="Soap11" binding="basicHttpBinding" bindingConfiguration="BasicBindingWithCredentials"
            contract="MyService.IMainService">
    <identity>
      <dns value="localhost" />
    </identity>
  </endpoint>
  <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>

© Stack Overflow or respective owner

Related posts about .NET

Related posts about wcf