<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>

[{'answer_id': 59764, 'author': 'rams', 'author_id': 3635, 'author_profile': 'https://Stackoverflow.com/users/3635', 'pm_score': 5, 'selected': True, 'text': '<p>Figured it out!</p>\n\n<p>Here is the services configuration section from web.config</p>\n\n<p>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.</p>\n\n<pre><code>&lt;services&gt;\n      &lt;service name="MyService"&gt;\n        &lt;endpoint address="" behaviorConfiguration="MyServiceAspNetAjaxBehavior" binding="webHttpBinding" bindingConfiguration="webBinding" contract="Services.MyService" /&gt;\n      &lt;/service&gt;\n    &lt;/services&gt;\n    &lt;bindings&gt;\n      &lt;webHttpBinding&gt;\n        &lt;binding name="webBinding"&gt;\n          &lt;security mode="Transport"&gt;\n          &lt;/security&gt;\n        &lt;/binding&gt;\n      &lt;/webHttpBinding&gt;\n    &lt;/bindings&gt;\n</code></pre>\n\n<p>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)</p>\n\n<p>Hope this helps someone.</p>\n'}, {'answer_id': 18653154, 'author': 'Aatif Shabbir', 'author_id': 2677615, 'author_profile': 'https://Stackoverflow.com/users/2677615', 'pm_score': 0, 'selected': False, 'text': '<p>If you still get the same error after all your possible work done. Just add a "AJAX Enabled WCF-Service".</p>\n'}, {'answer_id': 30665983, 'author': 'garryp', 'author_id': 3395015, 'author_profile': 'https://Stackoverflow.com/users/3395015', 'pm_score': 0, 'selected': False, 'text': '<p>For me the issue was the following; we added MVC to a solution with routing. Our WCF services were not being ignored. I resolved this by adding the following rule (where "WCF" is the folder we keep our services in).</p>\n\n<pre><code>routes.IgnoreRoute("WCF/{*pathInfo}");\n</code></pre>\n\n<p>Hope that saves somebody a few hours.</p>\n'}]
['https://Stackoverflow.com/questions/59181', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3635/']