Friday, August 18, 2006

Accessing Request or Session objects from class modules

When we need to use a request object from another class modules we have to use the
HttpContext.Current object. This contains all the state informations like request, session, Server, Respose etc.
Eg:
string r = HttpContext.Current.Request["MyParam"].ToString();
string s = HttpContext.Current.Session["MySessionVar"].ToString();

Note: Add "using System.Web" to the header.

Wraping Session to Gobal Session Class


using System;
using System.Web;

namespace MyApp
{
public class SessionGlobal
{

private const string _AccountNo = "_AccountNo";

// Set to default Values
public static void Clear()
{

HttpContext.Current.Session[_AccountNo]="";

}

private static string getSessionVar(string key)
{
if(HttpContext.Current.Session[key]!=null)
return HttpContext.Current.
Session[key].ToString();
else
return "";

}

public static string AccountNo
{
get
{
return getSessionVar(_AccountNo);
}
set
{
HttpContext.Current.Session[_AccountNo]=value;
}
}

public static string UserID
{
get
{
return HttpContext.Current.
Request.ServerVariables["AUTH_USER"];
}

}

}
}

Software requirements for a complete installation of BizTalk Server 2006

The minimum software requirements for a complete installation of BizTalk Server 2006 on a single computer:

  • Windows Server 2003 with Service Pack 1
  • Microsoft Office Excel 2003 and InfoPath 2003 with Service Pack 2
  • Microsoft Visual Studio 2005 with Microsoft Visual C# .NET
  • Microsoft SQL Server 2005 or Microsoft SQL Server 2000 with Service Pack 4
  • Microsoft SQL Server 2005 Analysis Services or Microsoft SQL Server 2000 Analysis Services with Service Pack 4
  • Microsoft SQL Server 2005 Notification Services or Microsoft SQL Server 2000
  • Notification Services 2.0 with Service Pack 1
  • Microsoft Windows SharePoint Services 2.0 with Service Pack 2