0

I am trying to configure IIS 8.5 to redirect to SSL, without redirecting web services that come in on other ports. I have been reading about this for days on various sites, and found excellent instructions and tutorials for setting up the cert and the redirect, like this link.

config SSL in IIS 8.5

But I have not been able to find anything about exceptions to avoid redirecting web service traffic.

If anyone knows of a good source or tutorial, or could point to some settings to consider?

I have the URL Rewrite rule written for {https} but I am little sketchy as to whether or not there is some way to add exceptions so the Web Service ports are not also redirected.

1 Answer 1

1

If the web services are all on separate ports from the traffic you want to redirect(e.g. webservice1 is always called using port 81) then you can add a condition for your URL Rewrite rule to check that {SERVER_PORT} matches the port you are interested in rewriting.

If the web services are expected to respond on port 80 as well then you can exclude each by creating a condition on {URL} to check that it does not match the pattern for each web service.

E.g. WebService1 has an address of /WebService1/service.svc. The condition is configured so that the {URL} does not match the pattern of ^/WebService1/.* with Ignore case turned on. This should prevent it from matching the web service. WebService2 has an address of /WebService2/service2.svc. The pattern for this ones condition rule will be ^/WebService2/.* again with Ignore case turned on.

1
  • I wrote the rule like this.... <add input="{SERVER_PORT}" pattern="1010" negate="true"\> and it worked.
    – htm11h
    Apr 11, 2016 at 12:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .