Determine if the Current Request Is from a Crawler in ASP.NET

The System.Web.HttpBroswerCapabilities?has an important property called “Crawler” that enables us to handle requests from crawlers. Please check out the example below: Var isCrawler = ((System.Web.Configuration.HttpCapabilitiesBase)Request.Browser).Crawler;

Ensuring Application_Start Event Fires with the Next Request After a Failure

ASP.NET websites need some static data to be initialized, so that subsequent requests can utilize the loaded data and load much faster. It is a common practice to write such code in the Application_Start Event in Global.asax.cs file. protected override void Application_Start(object sender, EventArgs e) However, the Application_Start event could

Count the Number of Active ASP.NET Sessions in State Server Session Mode

During testing or monitoring, there is a constant need to monitor the number of sessions created, so as to better correlate the performance metrics collected. The Performance Monitor tool is typically used to collect performance metrics. In performance monitor, follow these steps to monitor the number of sessions. In the

Quick Way to Navigate in the HTML Editor in Visual Studio IDE

A lot of time is spent on navigating in the HTML View of ASP.NET Pages that have too much HTML to find some little details. Visual Studio 2005 IDE provides new features that allow you to navigate very quickly around the HTML Page. To learn how, find a page with

Building a Custom Designer for Web Controls

The default designer that comes with the Web Controls is great but there are times when you might need to customize it. It’s pretty easy to do. You need to extend the web control and explicitly set the Designer Attribute for the extended web control. For example, in the following