RunningPackage.Stop Method
hi in package if any error is getting then automaticallly stop the package. that why in onerror event i took one script task,wrote this code. staticvoid Main(string[] args) { Application app = new Application(); RunningPackages pkgs = app.GetRunningPackages("yourserver"); int pkgsRunning = pkgs.Count; Console.WriteLine("Packages before s foreach (RunningPackage p in pkgs) { Console.WriteLine("InstanceID: " + p.InstanceID); Console.WriteLine("PackageDescription: " + p.PackageDescription); Console.WriteLine("PackageID: " + p.PackageID); Console.WriteLine("PackageName: " + p.PackageName); Console.WriteLine("UserName: " + p.UserName); } pkgs = app.GetRunningPackages("yourserver"); foreach (RunningPackage package in pkgs) { package.Stop(); } pkgsRunning = app.GetRunningPackages("yourserver").Count; Console.WriteLine("Packages after stop " + pkgsRunning); } but my package not stoppedwaht can i do?anybody please give me solution.. indu
May 18th, 2012 5:42am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics