I am running IIS 7 and I host multiple website under one IP address. Each website is configured using host names, so that a visitor ends up at the correct website.

One of the websites uses SSL (for example https://example.mywebsite.com/).

I created a new website, say http://subdomain.contoso.com/ and when I enter that address in my browser, it automatically redirects to https://subdomain.contoso.com and returns an error that the certificate is invalid. Of course it is invalid! The certificate is for a totally different website.

To make things worse, I have another website - http://another.mywebsite.com/ and that website is running correctly.

Now my question is: What makes IIS decide to redirect to HTTPS, even when I have it turned off for subdomain.contoso.com. And how do I fix this buggy behaviour?

link|improve this question

feedback

2 Answers

up vote 1 down vote accepted

Where have you pointed this subdomain http://subdomain.contoso.com/ ? Is it at a directory on the server? Don't assume that its happening in IIS, it might be hitting the index.html/php and then redirecting from here. Use liveHeaders (or similar) to work out what it is doing.

link|improve this answer
Thank you. Your answer guided me in the right direction. – jao Feb 13 '11 at 12:38
feedback

Nevermind. I was just stupid. there was a redirection to HTTPS in the global.asax of the web project.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.