Https with WCF error: "Could not find base address matching https scheme"

I go to https: //mywebsite/MyApp/Myservice.svc and get the following error:

(the link works if I use http: //)

"Service" /MyApp/MyService.svc "cannot be activated due to an exception during compilation. Exception message: Could not find a base address that matches the https scheme for the endpoint with the binding BasicHttpBinding. [Http] .."

EDIT: So, if I change address="" to address="https:// ..." , then I get this error:

"Error: https protocol is not supported ..... ChannelDispatcher in ' https: //.../Annotation.svc ' with contract (s)" Annotations "cannot open its IChannelListener.

Here is what my Web.Config looks like:

 <services> <service behaviorConfiguration="AnnotationWCF.AnnotationBehavior" name="AnnotationWCF.Annotation"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_Annotation" contract="AnnotationWCF.Annotation" /> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="SecureTransport" contract="AnnotationWCF.Annotation" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> 

 <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_Annotation" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> </binding> <binding name="SecureTransport" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <security mode="Transport"> <transport clientCredentialType="None"/> </security> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> </binding> </basicHttpBinding> 
+41
wcf
Dec 12 '08 at 16:32
source share
7 answers

It turned out that my problem was that I used a load balancer to handle SSL, which then sent it via http to the actual server, which then complained.

The fix description is here: http://blog.hackedbrain.com/2006/09/26/how-to-ssl-passthrough-with-wcf-or-transportwithmessagecredential-over-plain-http/

Edit: I fixed my problem, which was slightly different, after talking with Microsoft support.

My silverlight application had its own endpoint address in the code that transmits https to the load balancer. Then the load balancer changed the endpoint address to http and pointed to the actual server it was going to. So in each web server configuration, I added listenUri for the endpoint, which was http, not https

 <endpoint address="" listenUri="http://[LOAD_BALANCER_ADDRESS]" ... /> 
+20
Jan 19 '09 at 19:11
source

I had the same problem. In addition to my decision, add "s" to the binding value.

Old: binding = "mexHttpBinding"

New: binding = "mexHttpsBinding"

web.config fragment:

 <services> <service behaviorConfiguration="ServiceBehavior" name="LIMS.UI.Web.WCFServices.Accessioning.QuickDataEntryService"> <endpoint behaviorConfiguration="AspNetAjaxBehavior" binding="webHttpBinding" bindingConfiguration="webBinding" contract="LIMS.UI.Web.WCFServices.Accessioning.QuickDataEntryService" /> <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" /> </service> 
+25
May 26 '11 at 3:20
source

Make sure SSL is enabled for your server.

I got this error when trying to use an HTTPS configuration file in my local field that does not have this certificate. I tried to do local testing - by converting some bindings from HTTPS to HTTP. I thought it would be easier to do this than to try installing a self-signed certificate for local testing.

It turned out that I was getting this error because I did not have SSL support on my local IIS, although I was not going to use it.

There is something in the HTTPS configuration. Creating a self-signed certificate in IIS7 allowed HTTP to then work :-)

+8
Sep 17 '10 at 1:20
source

I think you are trying to configure your service similarly to the following configuration. There is additional information here: Specify a service with two endpoints using different binding values . Also, besides development, it would probably be nice to have both HTTP endpoints and HTTPS for the same service. This is a kind of target defeat for HTTPS. Hope this helps!

 <service type="HelloWorld, IndigoConfig, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"> <endpoint address="http://computer:8080/Hello" contract="HelloWorld, IndigoConfig, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" binding="basicHttpBinding" bindingConfiguration="shortTimeout" </endpoint> <endpoint address="http://computer:8080/Hello" contract="HelloWorld, IndigoConfig, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" binding="basicHttpBinding" bindingConfiguration="Secure" </endpoint> </service> <bindings> <basicHttpBinding name="shortTimeout" timeout="00:00:00:01" /> <basicHttpBinding name="Secure"> <Security mode="Transport" /> </basicHttpBinding> </bindings> 
+3
Dec 12 '08 at 10:00
source

In my case, I set the security mode to "TransportCredentialOnly" instead of "Transport" in the binding. Changing this setting resolved the issue.

 <bindings> <webHttpBinding> <binding name="webHttpSecure"> <security mode="Transport"> <transport clientCredentialType="Windows" ></transport> </security> </binding> </webHttpBinding> </bindings> 
+1
Apr 05 2018-12-12T00:
source

Look at your base address and endpoint address (you cannot see it in your code example). most likely you missed a column or other typo, for example. https // instead of https: //

0
Jul 28 '11 at 16:39
source

I used webHttpBinding and forgot to write the "Transport" security mode in the binding configuration that caused the error:

  <webHttpBinding> <binding name="MyWCFServiceEndpoint"> <security mode="Transport" /> </binding> </webHttpBinding> 

Adding this to the configuration fixes the problem.

0
Feb 01 '12 at 20:37
source



All Articles