Tags: | Categories: Blog Posted by admin on 3/9/2009 5:54 PM | Comments (0)

Well, so you want to load balanced a website but you don't have the hardware as you are hosting the site in a hoster. Well if you don't mind to use www1.domain.com, www2.domain.com etc, this is the solution. You can download the control that does it here:

http://alpascual.com/blog/al/archive/2006/05/26/179.aspx

This is at 20,000 feet how it works:

public class LoadBalancerRun

{

private System.Web.HttpContext m_oContext = null;

public LoadBalancerRun(System.Web.HttpContext oContext)

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

public LoadBalancerRun(System.Web.HttpContext oContext)

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

private System.Web.HttpContext m_oContext = null;

public LoadBalancerRun(System.Web.HttpContext oContext)

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

public LoadBalancerRun(System.Web.HttpContext oContext)

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

class LoadBalancerRun

{

private System.Web.HttpContext m_oContext = null;

public LoadBalancerRun(System.Web.HttpContext oContext)

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

public LoadBalancerRun(System.Web.HttpContext oContext)

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

private System.Web.HttpContext m_oContext = null;

public LoadBalancerRun(System.Web.HttpContext oContext)

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

public LoadBalancerRun(System.Web.HttpContext oContext)

{

m_oContext = oContext;

}

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

public void Run(string sFilename)

{

LoadXmlReader oConfig = null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

null;

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

if (sFilename.Length > 0)

oConfig = new LoadXmlReader(m_oContext,sFilename);

else

else

new LoadXmlReader(m_oContext,sFilename);

else

else

oConfig = new LoadXmlReader(m_oContext);

TestIsServerAlive oAlive = new TestIsServerAlive();

LogFile oLog = new LogFile();

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

LogFile oLog = new LogFile();

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

TestIsServerAlive oAlive = new TestIsServerAlive();

LogFile oLog = new LogFile();

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

LogFile oLog = new LogFile();

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

new LoadXmlReader(m_oContext);

TestIsServerAlive oAlive = new TestIsServerAlive();

LogFile oLog = new LogFile();

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

LogFile oLog = new LogFile();

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

new TestIsServerAlive();

LogFile oLog = new LogFile();

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

new LogFile();

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

bool bAlive = false;

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

string sNext = "";

 

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

{

// Get next server to redirect

for(int i=0; i<oConfig.GetAll().Count; i++)

{

// Get next server to redirect

// Get next server to redirect

sNext = oConfig.GetNext();

 

// Test server to redirect

// Test server to redirect

bAlive = oAlive.IsAlive(sNext);

if ( bAlive == true )

break;

}

oLog.Add(m_oContext.Request.UserHostAddress, m_oContext.Session.SessionID, sNext, bAlive);

if (bAlive == false)

m_oContext.Response.Write("All servers down!");

else

else

m_oContext.Response.Write("All servers down!");

else

else

}

oLog.Add(m_oContext.Request.UserHostAddress, m_oContext.Session.SessionID, sNext, bAlive);

if (bAlive == false)

m_oContext.Response.Write("All servers down!");

else

else

m_oContext.Response.Write("All servers down!");

else

else

break;

}

oLog.Add(m_oContext.Request.UserHostAddress, m_oContext.Session.SessionID, sNext, bAlive);

if (bAlive == false)

m_oContext.Response.Write("All servers down!");

else

else

m_oContext.Response.Write("All servers down!");

else

else

}

oLog.Add(m_oContext.Request.UserHostAddress, m_oContext.Session.SessionID, sNext, bAlive);

if (bAlive == false)

m_oContext.Response.Write("All servers down!");

else

else

m_oContext.Response.Write("All servers down!");

else

else

if ( bAlive == true )

break;

}

oLog.Add(m_oContext.Request.UserHostAddress, m_oContext.Session.SessionID, sNext, bAlive);

if (bAlive == false)

m_oContext.Response.Write("All servers down!");

else

else

m_oContext.Response.Write("All servers down!");

else

else

}

oLog.Add(m_oContext.Request.UserHostAddress, m_oContext.Session.SessionID, sNext, bAlive);

if (bAlive == false)

m_oContext.Response.Write("All servers down!");

else

else

m_oContext.Response.Write("All servers down!");

else

else

break;

}

oLog.Add(m_oContext.Request.UserHostAddress, m_oContext.Session.SessionID, sNext, bAlive);

if (bAlive == false)

m_oContext.Response.Write("All servers down!");

else

else

m_oContext.Response.Write("All servers down!");

else

else

if (bAlive == false)

m_oContext.Response.Write("All servers down!");

else

else

"All servers down!");

else

else

m_oContext.Response.Redirect(sNext);

 

}

}

The steps are the following, you read the XML file, test the server and redirect them to the next domain. Make sure you DNS the domains per alias. Any problem using the control I'll be happy to help or modify.

Cheers

Al

blog comments powered by Disqus