Category Archives: .NET

Retrieving CPU Usage in .NET

Here’s some simple and effective code to fetch CPU usage / load percentage in either ASP.NET or a .NET forms application. WIth the forms application, we’ll set it up to auto refresh every half second. You can set it to longer or shorter if you want. Some load balancers can use a simple ASP.NET page […]

Caching in ASP.NET

Without a doubt, caching can greatly improve performance on your website, or any other application. But if it isn’t done correctly, it can work against you. Luckily, ASP.NET has a great built in cache manager in System.Web.Caching. It’s very easy to use, and it seamlessly handles (most of) the pitfalls that can get you into […]

ASP.NET Custom Configuration Settings in web.config

Custom configuration settings for ASP.NET in the Web.config file.

Restart IIS application pool from ASP.NET page

Restarting IIS application pools via ASP.NET page.

ASP.NET HTTP Comression and reducing response size

Compression is important on the Web. Pre-compression, my pages were sometimes 700 KB+! Granted, this was in a development environment, so more than half of the page was dedicated to debug and trace data, but still, under high traffic, a large page can put unnecessary strain on your Web server and bandwidth/throughput, thus slowing your […]