How to check programmatically if a website is running

Recently, I got a request from one of my partners to check if a particular website is running or not and this has to be done from a windows service; which should be checking automatically at a given interval once started. Well, you can use WebRequest and WebResponse Classes (under namespace System.Net) to first create…

2

Resources on ASP.NET

The useful list of documentation and guidelines on ASP.NET 2.0 and SQL Server 2005 (this is updated list as the old lists addresses have been changed) Reference: patterns & practices Security How Tos Index ASP.NET 2.0 How To: Configure the Machine Key in ASP.NET 2.0 How To: Connect to SQL Server Using SQL Authentication in…

1

Virtual Earth – Printing mapping directions to paper

There are several different ways to print the mapping directions to the paper. I have attached a simple sample program that should be able to get started. What this program does is display the directions in a TextArea; using JavaScript create a Post method and have the routing information posted onto another page.   <%@ Page Language=”C#” AutoEventWireup=”true”…

1

Displaying the byte[] image in the runtime (without storing it on machine)

Continue from the last blog post: In the last blog I had shown how to convert the byte [] to image and vice-versa. But sometimes there can be a need to display the image without storing it in the machine (server). One way to achieve this to use an <iframe> control and assign a page…

1

How to convert image into byte[] and byte[] to image using C# in ASP.NET

Recently I worked on a code sample for converting the image to the byte array and convert it back to the image type in ASP.NET 2.0 application.   Here is the code sample:  using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.IO;…

34