0

This is a very strange situation. We have a number of sites hosted on a IIS 7 webserver. We put in a redirect for one subdomain to go to another site.

Because we only have one web.config file, it was trying to apply that change to all sites. Since this is not what was intended we rolled back the change by clearing out the redirect from the form and unchecking the box.

We reset the website We reset IIS

The page is still redirecting. Does anyone know if there is anything else needed to be done to make this change. Is a reboot required?

2

Check that the redirect hasn't been registered in the "Machine.config" file.

IIS as we all know, puts entries in the local web.config for the application in question, however occasionally it put's entries in the machine wide "machine.config"

Furthermore many .NET devs don't even realize there is a "machine.config" file

As the name implies, any settings in here apply to EVERY site and server configuration on the IIS Install in question.

You can find more about the IIS Config system here:

http://www.iis.net/learn/get-started/planning-your-iis-architecture/the-configuration-system-in-iis-7

and this Stack Overflow post will help you locate your "machine.config" file on the server your trouble shooting:

https://stackoverflow.com/questions/2325473/where-is-machine-config

  • "IIS as we all know, puts entries in the local web.config for the application in question, however occasionally it put's entries in the machine wide "machine.config" .... actually I had no idea. This was the underlying issue., Its now resolved! – logixologist Oct 8 '15 at 18:31
  • Glad you got it sorted :-) it's caught me out loads of times. – shawty Oct 9 '15 at 8:25
1

Some redirects are cached by the browser (permanent redirect). You may need to clear the browser cache on the client side.

  • Good thought, but I tried it on a browser that has never been to the site, cleared its cache completely. Is their some IIS cache's that need to be cleared. – logixologist Oct 8 '15 at 13:37
  • @logixologist, I don't think anything is cached through an IIS Restart. – James Oct 8 '15 at 16:24
0

I officially accepted an answer because it provided the information that solved the issue. I wanted to post the official answer on what happened in case someone else has this experience:

When we did an IIS redirect it added an entry to the web.config file for the application. Un-selecting and clearing out this redirect never cleared out the web.config file. Even rebooting the server (obviously) doesn't clear it out.

So if you set up a re-direct and need it removed, you have to check to see if IIS added a redirect rule to your various configuration files, either web.config or machine.config

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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