PDA

View Full Version : Multiple Host Headers and WCF Rest Service over HTTPS


hartleys
07-01-2010, 04:12 PM
Hi there

I found another post that relates to exactly the problem I'm having to do with the below (taken from this thread: http://community.discountasp.net/showthread.php?t=4162&highlight=https)

I had my webservice working fine over HTTP without doing any extra coding for the ServiceHostFactory and so on. I had to add the following in my web.config for it to work

<serviceHostingEnvironment>
[b]
<add prefix="http://www.mydomain.com"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>

Now I needed to use it over HTTPS. I got it to a point where https://www.mydomain.com/services/myservice.svc?wdsl worked great but within it all the URLs were https://web107.dotnetplaground.com so it wasn't that great since when I try to consume it I got cannot resolve https://web107.dotnetplaground.com. At this point I asked discountasp.net support and they told referred me to this post as I needed to programmatically change the base address they said. I just did it programmatically but now I get the error Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are [http]. I've been trying to get my service working over https for at least 3 weeks with no luck can anyone pleeeeeeeezzzzze help me.


I tried adding the base address prefix as above, but SSL still does not work. Please can antone advise further?

Thanks
Simon