<p>I have a WCF service that gets called from client side JavaScript. The call fails with a Service is null JavaScript error. WebDevelopment helper trace shows that the calls to load the jsdebug support file results in a 404 (file not found) error. </p>

<p>Restarting IIS or clearing out the Temp ASP.Net files or setting batch="false" on the compilation tag in web.config does not resolve the problem</p>

<p>From the browser </p>

<p><a href="https://Myserver/MyApp/Services/MyService.svc" rel="nofollow noreferrer">https://Myserver/MyApp/Services/MyService.svc</a> displays the service metadata</p>

<p>however </p>

<p><a href="https://Myserver/MyApp/Services/MyService.svc/jsdebug" rel="nofollow noreferrer">https://Myserver/MyApp/Services/MyService.svc/jsdebug</a> results in a 404.</p>

<p>The issue seems to be with the https protocol. With http /jsdebug downloads the supporting JS file.</p>

<p>Any ideas?</p>

<p>TIA</p>

Figured it out!
Here is the services configuration section from web.config
Look at the bindingConfiguration attribute on the endpoint. The value "webBinding" points to the binding name="webBinding" tag in the bindings and that is what tells the service to use Transport level security it HTTPS. In my case the attribute value was empty causing the webservice request to the /js or /jsdebug file over HTTPS to fail and throw a 404 error.
```
```
<services>
      <service name="MyService">
        <endpoint address="" behaviorConfiguration="MyServiceAspNetAjaxBehavior" binding="webHttpBinding" bindingConfiguration="webBinding" contract="Services.MyService" />
      </service>
    </services>
    <bindings>
      <webHttpBinding>
        <binding name="webBinding">
          <security mode="Transport">
          </security>
        </binding>
      </webHttpBinding>
    </bindings>
```
```
Note that the bindingConfiguration attribute should be empty ("") if the service is accessed via http instead of https (when testing on local machine with no certs)
Hope this helps someone.