views:

32

answers:

2

Hello,

I have two projects, one is a WCF service, the other is an ASP.NET MVC site. The service is to be exposed to multiple consumers, including my MVC site. Both the site and the service require access over SSL. I only have one SSL certificate I can use.

Any ideas how I can set these two projects up in IIS?

Thanks in advance.

A: 

One idea is to get a wildcard SSL certificate, something like *.mysite.com, and then set up 2 sites with URLs like services.mysite.com and www.mysite.com. You will be able to assign the same SSL cert to both sites. Only catch is that you'll need to use different a different IP or port on one of the sites, otherwise IIS won't know which site is being routed

JonoW
Thanks for your reply. I had already considered that, but unfortunately the wildcard SSL certificate is not an option for me, as the certificate has already been purchased. Cheers.
Mike
Ah i see. How about this (never tried this myself though); set up 2 sites with the same domain, both using the same SSL cert but with one of the sites set up to use a non-standard SSL port. I *think* that could work...
JonoW
A: 

I think I have solved it. Thanks for your input JonoW.

  1. I created the MVC site and bound the SSL certificate as normal.
  2. I then created a subdirectory in the site and copied all my WCF files there.
  3. In IIS I browsed to the new subdirectory, right-clicked 'Convert to Application'
  4. I had to copy some assemblies used by my site to the the bin folder of my WCF directory to avoid some 'assembly not found errors'
  5. I also had to remove/rename some configuration settings in the WCF web.config that had the same keys as configuration settings in my site web.config.

Finally I updated my endpoint binding configurations and it all seemed to work.

Relatively straight-forward in the end. :)

Mike