Razor-based view templates are a much cleaner way to construct MVC views in ASP.NET. However, they were only released fairly recently with MVC3.
If you still have some ASPX-based templates that you'd like to upgrade, Telerik has released a free tool to do just that.
In my recent posts on scalability, I've mentioned the Web Farm Framework (WFF) as a solution for managing a farm of IIS servers. It adds a nice management Server Farm management UI into the IIS Manager.
It is a nice tool, but is only accessible via the windows interface. To make the farm more accessible, I've created a basic farm monitor MVC web site using the WFF .NET API.
Here are a couple of screen shots of it in action:
It uses a few cool features of the API:
- Getting a list of nodes in the farm & their status
Microsoft.Web.Farm.WebFarmManager manager = new Microsoft.Web.Farm.WebFarmManager();
foreach (var farm in manager.WebFarms)
foreach (var node in farm.Servers)
- CPU/Memory monitoring. See my sparkline post to learn how to create these kinds of infographics.
PercentageCPU = node.Counters.ProcessorTime/100;
MemoryAvailableKBytes = node.Counters.MemoryAvailableKBytes;
PercentageMemoryAvailable = 1.0f - node.Counters.PercentageMemoryAvailable
- Getting a list of running processes
private static ServerProcess GetNodeProcesses(string farmName, string nodeName)
var manager = new Microsoft.Web.Farm.WebFarmManager();
var farm = manager.WebFarms[farmName];
var server = farm.Servers[nodeName];
var processes = server.RunOperation(farm.CreateRunOperationOptions("GetProcesses")) as ServerProcess;
Download the source for the project
if you'd like to take it for a spin. Make sure the web site's application pool has enough permissions to access the web farm.