Saturday, May 19, 2012 Articles RegisterLogin
View Article
24

Recently I have encountered the "Why does my website take so long to come up" problem. The problem isn't the website, it's IIS. When IIS determines that a website has been inactive for a while it unloads it to reclaim resources until it is requested again. Now this becomes very aparent if you do any work with DotNetNuke. So what is the solution you ask? Well there are many ways to accomplish this task. A search on the web will reveal several that range from free to subscription based, my ISP even offeres a solution for a scheduled task that keeps the site up (for a fee). A website called Renegade Minds offers a free solution and seems to be the most populare one out there. My only problem with it is that it can only process one website. I already knew how to accomplish this task so I decided to create my own solution with the following requirements:

  1. Allow the configuration of multiple websites
  2. Allows the user to start and stop the process
  3. Allow the ability to configure a downtime for the website so IIS could recover resources

Now I'm not going to go into the step by step process of creating this application but I will discuss the key points of the application in detail. The application is a standard C# windows application created in VS 2008 utilizing a SqlExpress database in the project.  The database contains one table and one stored procedure. The project utilizes two forms and two custom objects.

The Database

WebSite Table Schema
 Field Name  Data Type  Info
 ID  Int  Primary Key, auto incrementing
 Name  varchar(50)  
 URL  varchar(250)  
 Interval  Int  The time in minutes between processing
 Flag_AllowDowntime  Bit  Setting to true will allow the website to enter downtime
 Downtime  DateTime  Even though this is a datetime field we are only concerned with the time portion.
 DowntimeInterval  Int  The time in minutes after the downtime to not process
Flag_Enabled Bit This will enable or disable the website from processing

 

The stored procedure just simply returns all enable records from the table

Pages: 1 of 6 Next Page
Posted in: Tutorial, C#

Post Rating

Comments

Susan
Tuesday, November 29, 2011 4:12 AM
I suggest adding a facebook like button for the blog!

Post Comment

Name (required)

Email (required)

Website

    
Copyright 2008 by Ryan Mick Terms Of UsePrivacy Statement
Downloaded from DNNSkins.com