Windows 2012 Hosting - MVC 6 and SQL 2014 BLOG

Tutorial and Articles about Windows Hosting, SQL Hosting, MVC Hosting, and Silverlight Hosting

IIS Hosting :: Tips to Monitor Your IIS Performance

clock December 21, 2018 08:03 by author Jervis

Need help on how to monitor IIS? This guide covers how to cover the basics including HTTP ping checks, IIS Application Pools, and important Windows Performance Counters. We also take a look at how to use an application performance management system to simplify all of this and get more advanced IIS performance monitoring for ASP.NET applications.

From Basics to Advanced IIS Performance Monitoring:

  • Ensuring your IIS Application is running
  • Windows performance counters for IIS & ASP.NET
  • Advanced IIS performance monitoring for ASP.NET

How to Monitor if Your IIS Application is Running

The first thing you want to do is setup monitoring to ensure that your application is running.

Website Monitor via HTTP Testing

One of the best and easiest things you can do is set up a simple HTTP check that runs every minute. This will give you a baseline to know if your site is up or down. It can also help you track how long it takes to respond. You could also monitor for a 200 OK status or if the request returns specific text that you know should be included in the response.

Monitoring IIS via a simple HTTP check is also a good way to establish a basic SLA monitor. No matter how many servers you have, you can use this to know if your web application was online and available.

Here is an example of one of our HTTP checks we use against Elasticsearch to help with monitoring it. We do this via Retrace; you could also you tools like Pingdom. In this example, we receive alerts if the number_of_nodes is not what we are expecting or if it doesn’t find an HTTP status of 200 OK.

Ensure Your IIS Application Pool is Running

If you have been using IIS very long, you have probably witnessed times when your application mysteriously stops working. After some troubleshooting, you may find that your IIS Application Pool is stopped for some reason, causing your site to be offline.

Sometimes an IIS Application Pool will crash and stop due to various fatal application errors, issues with the user the app pool is running under, bad configurations, or other random problems. It is possible to get it into a state where it won’t start at all due to these type of problems.

It is a good best practice always to monitor that your IIS Application Pool is started. It runs as w3wp.exe. Most monitoring tools have a way to monitor IIS Application Pools. Our product, Retrace, monitors them by default.

One weird thing about app pools is they can be set to “Started” but may not actually be running as w3wp.exe if there is no traffic to your application. In these scenarios, w3wp.exe may not be running, but there is no actual problem. This is why you need to monitor it via IIS’s status and not just look for w3wp.exe to be running on your server.

Recommended Performance Counters for IIS Monitoring

One of the advantages of using IIS as a web server is all of the metrics available via Windows Performance Counters. There is a wide array of them available between IIS, ASP.NET and .NET. For this guide on IIS performance monitoring, I am going to review some of the top Performance Counters to monitor.

System/Process Counters

  • CPU %: The overall server and CPU usage for your IIS Worker Process should be monitored.
  • Memory: You should consider tracking the currently used and available memory for your IIS Worker Process.

IIS Performance Counters

  • Web Service – Bytes Received/Sec: Helpful to track to identify potential spikes in traffic.
  • Web Service – Bytes Sent/Sec: Helpful to track to identify potential spikes in traffic.
  • Web Service – Current Connections: Through experience with your app you can identify what is a normal value for this.

ASP.NET Performance Counters

  • ASP.NET Applications – Requests/Sec: You should track how many requests are handled by both IIS and ASP.NET. Some requests, like static files, could only be processed by IIS and never touch ASP.NET.
  • ASP.NET Applications – Requests in Application Queue: If this number is high, your server may not be able to handle requests fast enough.
  • .NET CLR Memory – % Time in GC: If your app spends more than 5% of its time in garbage collection, you may want to review how object allocations are performed.

ASP.NET Error Rate Counters

  • .NET CLR Exceptions – # of Exceps Thrown: This counter allows you track all .NET exceptions that are thrown even if they are handled and thrown away. A very high rate of exceptions can cause hidden performance problems.
  • ASP.NET Applications – Errors Unhandled During Execution/sec: The number of unhandled exceptions that may have impacted your users.
  • ASP.NET Applications – Errors Total/Sec: Number of errors during compilations, pre-processing and execution. This may catch some types of errors that other Exception counts don’t include.

You should be able to monitor these Windows Performance Counters with most server monitoring solutions.

Note: Some Windows Performance Counters are difficult to monitor because of the process name or ID changes constantly. You may find it hard to monitor them in some server monitoring solutions due to this.

Advanced IIS Performance Monitoring for ASP.NET

Some application monitoring tools, like Retrace, are designed to provide holistic monitoring for your ASP.NET applications. All you have to do is install them, and they can auto-detect all of your ASP.NET applications and automatically start monitoring all the basics. Including key Performance Counters and if your IIS Site and Application Pool are running.

Retrace also does lightweight profiling of your ASP.NET code. This gives you code-level visibility to understand how your application is performing and how to improve it.



IIS Hosting - ASPHostPortal.com :: How to Checking and Setting up the Correct Permissions on the IIS Server

clock December 3, 2013 10:56 by author Mike

If you are using an Classic ASP, ASP.NET or PHP application on a Windows Server that requires that you write data or upload to a folder then you will need to check and if necessary change the permissions on the server so that you have write as well as read permissions on the directory and files you wish to write too.


To check or change the permissions on the server go to Windows Explorer and do the following (for NT and Win 2K users only using NTFS file system, Win XP Pro users see note at bottom):
1. Right click on the directory containing the database or text file.
2. Click on 'Properties'.
3. Choose the 'Security' tab form the dialog box window.
4. Uncheck 'Allow inheritable permissions from parent to propagate to this object', from the bottom of the dialog box.
5. Next, click on the 'Add' button at the top left of the window.

Security Properties Dialog Box

6. Next the 'Select Users or Groups' dialog box will open, highlight 'IUSR_MyComputer' account from the list by clicking on it. Where 'MyComputer' is this will be the name of your computer. 'IUSER' is the Internet Guest Account setup by default when IIS is installed on the system.

Select Users or Groups Dialog Box

7. Next click on the 'Add' button in the middle left of the dialog box. You should then see 'MyComputer\IUSER_MyComputer' appear in the box in the bottom half of the dialog box. Again where 'MyComputer' is will be the name of your computer.
9. Now click on the 'OK' button at the bottom right of the 'Select Users or Groups' dialog box.
10. You should now be back at the 'Security Properties' dialog box where the top box should now contain the 'Internet Guest Account (MyComputer\IUSER_MyComputer)'.
11. Highlight the 'Internet Guest Account (MyComputer\IUSER_MyComputer)' by clicking on it in the top box.
12. Select 'Read' and 'Write' permissions for this account by checking the boxes at the bottom of the window (If you are not to worried about security you could check all the boxes to make sure that you have no problems with permissions).

Security Properties Dialog Box

13. Next repeat all the steps above on the database or text file itself, to make sure the database or text file also has the correct permissions.



About ASPHostPortal.com

We’re a company that works differently to most. Value is what we output and help our customers achieve, not how much money we put in the bank. It’s not because we are altruistic. It’s based on an even simpler principle. "Do good things, and good things will come to you".

Success for us is something that is continually experienced, not something that is reached. For us it is all about the experience – more than the journey. Life is a continual experience. We see the Internet as being an incredible amplifier to the experience of life for all of us. It can help humanity come together to explode in knowledge exploration and discussion. It is continual enlightenment of new ideas, experiences, and passions

 photo ahp banner aspnet-01_zps87l92lcl.png

Author Link

Corporate Address (Location)

ASPHostPortal
170 W 56th Street, Suite 121
New York, NY 10019
United States

Sign in