How to restore IIS settings and Default Web Site?

14

5

On Windows 8.1 with IIS8. How to restore IIS settings and Default Web Site?

I've a machine that all the application pools and web sites have been deleted from its IIS. I've tried to remove and reinstall the IIS, but even after reinstall the Default Web Site and DefaultAppPool are not restored.

I would like to restore the IIS to the same point like when it is first installed.

MichaelS

Posted 2014-01-21T14:43:00.210

Reputation: 710

Restore from a backup? Remove and reinstall IIS? What 'settings' are you looking to restore? What have you tried already? – Ƭᴇcʜιᴇ007 – 2014-01-21T16:11:11.137

@techie007: I've added more info to the question – MichaelS – 2014-01-21T16:53:51.723

I don't have IIS8 handy to test with, but here's a couple things to check/try: http://girdharbisht.com/girdhar/?cat=47, and http://mscodingblog.blogspot.ca/2012/11/create-default-iis-website-using.html maybe someone will come along with a specific answer., or if you figure it out, please post it as an answer. :)

– Ƭᴇcʜιᴇ007 – 2014-01-21T16:59:44.603

Answers

17

In short: Reinstall both IIS and WAS.

In details -

Step 1

  1. Go to "Add remove programs"
  2. "Turn windows features on or off"
  3. Remove both IIS and WAS (Windows Process Activation Service)
  4. Restart the PC

Step 2

  1. Go to "Add remove programs"
  2. "Turn windows features on or off"
  3. Turn on both IIS and WAS (Windows Process Activation Service)

Note: Reinstalling IIS alone won't help. You have to reinstall both IIS and WAS

MichaelS

Posted 2014-01-21T14:43:00.210

Reputation: 710

2Worked great! I found that removing IIS did not fully delete the contents of the inetpub folder which might have been due to permission issues. I deleted that as well in addition to your steps. – Adam – 2014-11-17T20:31:28.190

A similar process is posted as the accepted answer in this IIS.NET forum thread

– icc97 – 2017-10-10T13:39:57.507

2

You don't need to reinstall the whole IIS or WAS!

If it's just about creating the Default Web Site, reinstalling the whole IIS and WAS is little bit too much "aggressive" solution and absolutely the last thing to do if everything else fails. I was able to recreate it manually using IIS Manager.

Check my answer on StackOverflow where it's explained in detail.

I have deleted Default Web Site accidentally at some point of time most probably. When I was trying to open a project configured to run under IIS in Visual Studio, it failed to load with an error message:

"The Web Application Project is configured to use IIS. The Web server 'http://localhost:8080/' could not be found."

After I have recreated Default Web Site in IIS Manager as described in my answer, I was able to reload and open that specific project.

This was the complete process to restore the Default Web Site in my case (IIS 7 on Windows 7 64bit):

  1. open IIS Manager
  2. right click Sites node under your machine in the Connections tree on the left side and click Add Website
  3. enter "Default Web Site" as a Site name
  4. set Application pool back to DefaultAppPool!
  5. set Physical path to %SystemDrive%\inetpub\wwwroot
  6. leave Binding and everything else as is

Check my answer on StackOverflow for more details.

Dawid Ferenczy Rogožan

Posted 2014-01-21T14:43:00.210

Reputation: 346

0

If you getting errors starting up IIS and you running a shared iis configuration. Make sure that your redirection.config in C:\Windows\System32\inetsrv\config has the correct username and password for the network share....

Saved me a complete IIS reinstall.

DoComputing

Posted 2014-01-21T14:43:00.210

Reputation: 31