views:

50

answers:

1

I have an ASP.Net web site deployed in IIS 7.5 with a file Cart.svc (used for Javascript access from the browser).

The javascript renders fine under non SSL but SSL causes it to halt. However, if you take the /js suffix off, it works, even under SSL. So it looks like there IS a process listening on SSL, it just does not like the /js suffix.

The server side error is;

WebHost failed to process a request.
Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/66851296
Exception: System.Web.HttpException (0x80004005): There was no channel actively listening at 'https://xxxx/ws/Cart.svc/js'. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service

Update 2: Working config below

  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    <services>
      <service name="MySite.Website.Cart" >
        <endpoint address="" behaviorConfiguration="MySite.Website.CartAspNetAjaxBehavior" binding="webHttpBinding" bindingConfiguration="webHttpBinding" contract="MySite.Website.Cart" />
      </service>
    </services>
    <bindings>
      <webHttpBinding>
        <binding name="webHttpBinding">
          <security mode="Transport" />
        </binding>  
      </webHttpBinding>    
    </bindings>
    <behaviors>
      <endpointBehaviors>
        <behavior name="MySite.Website.CartAspNetAjaxBehavior">
          <enableWebScript />
        </behavior>
      </endpointBehaviors>
    </behaviors>
  </system.serviceModel>

Update: Original config below

  <system.serviceModel>
    <behaviors>
      <endpointBehaviors>
        <behavior name="MySite.Website.CartAspNetAjaxBehavior">
          <enableWebScript />
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    <services>
      <service name="MySite.Website.Cart">
        <endpoint address="" behaviorConfiguration="MySite.Website.CartAspNetAjaxBehavior"
          binding="webHttpBinding" name="CartHttp" bindingName="SslOptionalBinding" contract="MySite.Website.Cart" />
      </service>
    </services>
    <bindings>
      <webHttpBinding>
        <binding name="SslOptionalBinding">
          <security mode="Transport" />
        </binding>
      </webHttpBinding>
    </bindings>
  </system.serviceModel>

Thanks in advance

Ryan

+1  A: 

Have you set your binding's settings to use Transport level security?

<binding name="xxx">
    <security mode="Transport"></security>
</binding>

If you can post your section, that would help.

David Hoerster
Thanks, I tried that but it's still not going, getting a 404 error now. Why is WCF so arcane?
Ryan ONeill
Yeah, it can be a black box at times. How is your site configured in IIS? Is your site at the root of your site, or do you have it in an application under the site? Also, is your project an ASP.NET web site or an ASP.NET web project? If it's a web site project, then I think you have to make sure the web site is marked as non-updatable.
David Hoerster
Web application project, at root of IIS in Vista. Will update when I get there.
Ryan ONeill
Found it, it needed binding, bindingConfiguration and behaviorConfiguration setting on the endpoint element.
Ryan ONeill