**** before this; add "System.ServiceProcess.dll" to your project
internal static bool Fn_VeritabaniServerCanlimi( )
{
ServiceController sc = new ServiceController("MSSQLSERVER", "192.168.61.71");
try
{
if (sc.Status == ServiceControllerStatus.Running)
{
return true ;
}
else
{
return false;
}
}
catch (Exception ex)
{
return false ;
}
}
Yorumlar
Yorum Gönder