I will be taking over this ticket from Davide as the only one of us who has access to IIS and has used it for development.
The web.config on the site is what ever is generated when I do the restore process via kickstart and the .jpa backup file.
We do not generate a web.config file during the restoration.
It sounds like you have the default web.config.txt file shipped with Joomla. This file would need to be renamed to web.config (remove the .txt extension).
There is a very important and fairly non–obvious reason I am asking this — I am not trying to be a condescending jerk, it's a major caveat in Windows itself. The Windows File Explorer hides by default the file extensions of known file types. The .txt extension (Text File) is a known file type. This means that web.config.txt would be displayed as web.config in Windows Files Explorer. The web.config file does not have a known file type so it will also be displayed as web.config.
Yep. Both files are displayed the same. Only one does anything with IIS. The other one is ignored.
I have been working with Windows since 3.0. I have fallen for this as late as last year. Of course I was aware of the caveat so I stopped, thought about it and found out fairly easily that I was sabotaged by Windows' defaults. That's why I am mentioning this.
The only way to know is to right–click on the file and click on Properties. You can then see the full name of the file.
The web.config from the vanilla Joomla site does not make the restored site I'm trying to get working work unfortunately.
Now, this is what makes me think that you have a web.config.txt file which is not taken into account by IIS. To you it may sound like the exact opposite. Bear with me. There is another non–obvious point, this time about Joomla.
I know you said that a brand new Joomla installation works. However, the brand new Joomla installation does NOT use URL rewriting, it uses index.php SEF URLs (e.g. /index.php/123-some-artile.html). These work without a web.config file on IIS. This is a deliberate choice in Joomla, they are trying to make the first experience of newcomers to Joomla an easy and pleasant one. This also means that the Joomla defaults can mislead you in this particular case.
So, you should try taking Joomla's default web.config.txt file, rename it to web.config and copy it to your site's root.
If this was not the case with your restored site please let me know. I have more tricks up my sleeve.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!