Hi! all,
SqlServer server = SqlServer.CurrentServer;
try
{
server.Connect();
}
catch (System.Exception ex)
{
//Response.Redirect("Error.aspx?errorPassCode=" + 2002);
Response.Redirect(String.Format("error.aspx?errormsg={0}&stacktrace={1}",
Server.UrlEncode(ex.Message), Server.UrlEncode(ex.StackTrace)));
}
SqlDatabaseCollection databases = server.Databases;
server.Disconnect();
I am getting the exception at: server.Connect();
Exception is:
Retrieving the COM class factory for component with CLSID {10020200-E260-11CF-AE68-00AA004A34D5} failed due to the following error: 80040154.
Please help me out...