Category Archives: IIS

Starting All Sites in IIS on a Windows Server

So I recently had to do some work on a server that required stopping all sites in IIS but without stopping IIS itself. Here’s the short post on how I did that. Now of course I needed to have all the sites turned back on again. Just restarting IIS wouldn’t do what I needed – it seems to remember what sites were running before the reset. So, here’s a quick little script, which is just the inverse of the previous script, to start all sites.

c:\windows\system32\inetsrv\appcmd.exe list site /xml /state:"$=stopped" | appcmd start site /in

There you go. Simple as could be. This loops through and lists all the sites currently with their running state set to “stopped”, pipes it into the next command, which just starts each of the sites in the list.

By the way this is super fast. Even on a server with hundreds of sites it only took a second or two to run.

Happy IIS hosting! :)

Stopping All Sites on a Windows Server Without Stopping IIS

I had a need recently to stop all the sites running on a Windows server, but I didn’t want to stop IIS. This specific server has hundreds of sites running on it, so stopping each one at a time would have taken an excessive amount of time.

So with a little Google-fu I stumbled across an old post that leverages appcmd

c:\windows\system32\inetsrv\appcmd.exe list site /xml /state:"$=started" | appcmd stop site /in

This single command will pull a list of all the sites that currently have a running state of “started” and then pipe that list into the stop command. This runs super-fast even on a server with hundreds of sites – very impressive and using this saved me tons of time!

Happy IIS hosting! :)

By the way, here’s the inverse of this script to restart all the sites on an IIS server.

WordPress IIS and PNG Not Showing Up Headaches

Okay, this bit me again today, and I didn’t remember the solution from previous research so I had to research it again. That to me means I need to write it up in a blog post. :)

I’m running WordPress for this blog. It is hosted on a Windows 2012 R2 server (using IIS, not Apache) with the latest versions of PHP and MySQL installed.

I uploaded a post earlier that had a PNG file screenshot included. The PNG file uploaded fine and showed up fine in the Media management screen of WordPress but it wouldn’t display in the actual post. The issue winds up being a permissions problem. Read more »

Convert a Folder to an Application on a Remote IIS Host

The topic recently came up of the best way to convert a folder to an application on remote shared hosting server. Some hosts may have this built-in to their control panel. I know many (like Cytanium) have options in the control panel to create Virtual Directories, but sometimes an application specifically needs its folder to be marked as a literal “application” within IIS. Read more »

IIS/ASP.Net Install Error “The referenced assembly is not installed on your system”

Guest post from Rick Barber from OrcsWeb today…


While attempting to install IIS through role services with other than the default options checked or ASP.Net under IIS in role services on Windows Server 2008 and 2008 R2 you may come across errors like the one below; ‘Attempt to install XXX failed with error code 0x800736B3.  The referenced assembly is not installed on your system.’

IISError01

After little success trying a variety of ‘fixes,’ I came across this KB article:

http://support.microsoft.com/kb/947821

Once I downloaded and installed the proper hotfix, I was able to install IIS and ASP.Net on my Windows 2008 R2 server.

IISError02


Happy hosting!