Click here to Skip to main content
15,119,639 members
Please Sign up or sign in to vote.
4.33/5 (2 votes)
I've got a few problems configuring an ASP.NET Webapplication which hosts a WCF Service. And I've been searching quite a while now. There are quite a lot of results to be honest, and I'm not an expert with WCF. Mostly the solutions are either for the wsHttpBinding (which i don't use) or showing ErrorMessages not associated with the one I get.

This is what I want to accomplish:
Access the WCF Service only through https binding on specific port (eg. "")

This is my current problem:
I can successfully access the service at ""
I have to configure a http binding in IIS7.5 (it's sufficient if it points to the localhost and a nonsense port as long as it's configured...)

The error Message when making a get request on MyService.svc (with CustomErrors="Off")
Service 'CustomNamespace.MyService' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.

I do understand from that, that there might be some configuration missing. However why should it work if http and https binding in IIS are present, but not if only https binding is present?

My Question:
What are the steps necessary to be able to remove the http binding?

Any help will be truly appreciated :)

Additional Info:
- The service works fine on IIS 7.5. if a https binding (e.g. ip "All Unassigned" and port 5555) AND http binding (e.g. ip "::1"(localhost) and port 55555) are configured for the site.
- As soon as I do either of the following steps in IIS. The application stops working:
- Remove the http binding
- Set "Require SSL" in IIS -> "SSL Settings" to true.

Contents of ConfigFile:
<?xml version="1.0"?>
               <security mode="Transport">
                  <transport clientCredentialType="None" />
               <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
               <serviceDebug includeExceptionDetailInFaults="false" />
      <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

Content of MyService.svc (simplified):

<%@ ServiceHost Service="CustomNamespace.MyServiceImpl" %>

Content of "MyServiceImpl.cs" (simplified)
namespace CustomNamespace {   

   public interface IMyService {

      [OperationContract(Name = "doSomething", Action = "", ReplyAction = "*")]
      CustomReplyType DoSomething(CustomType request)


   public class MyServiceImpl : IMyService {

      public CustomReplyType DoSomething(CustomType request) {
         // Do Stuff
         return new CustomReplyType();



1 solution

You said you've tried a few things, have you read this article and tried its approach?

Seven simple steps to enable HTTPS on WCF WsHttp bindings[^]
Nicholas Marty 7-May-13 14:06pm
Hm. I'm not looking for enabling https (which is working) but disabling http (with that meaning the unsecured connection) ;). Also this article seems more to address iis6 on a local machine than wcf and ssl in general. Will still take a look at it. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900