Tag Archives: IIS

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.

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!

Basic IIS Performance Statistics

There are some neat counters available in Windows Performance Monitor for showing some IIS (Internet Information Server) statistics. My three favorites are:

  1. Current Anonymous Users: This counter shows the number of current anonymous HTTP connections. Since most web sites serve content to anonymous users, it’s the one that seems to make the most sense to me when trying to gauge current traffic / activity on the site.
  2. Anonymous Users / Second: This counter shows the data above, but how many connections per second those site visitors are generating.
  3. Maximum Anonymous Users: This counter just show the peak number of anonymous users that were connected at a single time. Sometimes it’s neat to see where the site activity peaked.

How do you see these? Here are the steps and screenshots:

First find the Performance Monitor by clicking the Start Menu then Administrative Tools then Performance Monitor:

Find PerfMon

 

Then click on Performance Monitor in the left-hand pane under Monitoring Tools. After that you are presented with the graph window and you can click the green plus icon to add counters to this window (play around and different counters – there is a LOT of really neat information available).

PerfMonIISCounters2

After clicking the green plus icon, you are presented with a huge list of counter groups. Within each of those groups are individual counters. There are a ton – you really do need to just play around and check out the options.

For web (IIS) counters though, look for the group named Web Service and click the plus sign next to it to expand and show the individual counters.

PerfMonIISCounters3

After you add the counters you’ll see them listed at the bottom of the graph window, along with the color of each counter so you can match them easily.

PerfMonIISCounters4

There you go. Play around and have some fun checking out what type of traffic is hitting your site and how well the server is performing.

Happy hosting!

Does anyone manually install IIS anymore?

Microsoft has made installing – and doing the initial base configuration of – Internet Information Services (IIS) ridiculously easy by using the Web Platform Installer (WebPI).

Open WebPI, select Products in the top menu bar, then select Server in the left menu bar, then choose the IIS Recommended Configuration. What’s installed/configured with the IIS Recommended Configuration install?

  • ASP.NET
  • Static Content
  • Default Document
  • Directory Browsing
  • HTTP Errors
  • HTTP Logging
  • Logging Tools
  • Request Monitor
  • .NET Extensibility
  • Request Filtering
  • Static Content Compression
  • ISAPI Extensions
  • ISAPI Filters
  • WAS Process Model
  • Management Console
  • WAS Configuration API
  • WAS .NET Environment
  • .NET 4.5 Extended with ASP.NET for Windows 8
  • .NET 3.5 for Windows 8

Let WebPI install all these things for you and you’re pretty much ready to roll. A few other things you might want to install on your web server afterward (also through WebPI) are:

  • Web Deploy
  • URL Rewrite
  • FTP Publishing

Happy hosting!

Brad on Google+