DCSIMG
Rcycling application pool programmatically - שלמה גולדברג (הרב דוטנט)

שלמה גולדברג (הרב דוטנט)

מרצה בסלע ויועץ בעולם ה - net.

Rcycling application pool programmatically

 

כיצד אפשר להפעיל את פעולת ה - restart על application pool מקוד.

 
מצאתי ב - Code Project את התשובה.
 
כל מה שצריך לעשות זה להוסיף reference ל - System.DirectoryServices ולכתוב את הקוד הבא
 
DirectoryEntry w3svc = new DirectoryEntry(string.Format("IIS://{0}/W3SVC/AppPools/appPool Name", Environment.MachineName));
w3svc.Invoke("Recycle", null); 
 
וזה הכול
פורסם: Dec 15 2010, 09:45 PM by Shlomo | with 1 comment(s)
תגים:,

תוכן התגובה

Rotem Bloom כתב/ה:

תמיד טוב לדעת תודה

# December 18, 2010 8:36 PM
שלח תגובה

(שדה חובה)  

(שדה חובה)  

(אופציונלי)

(שדה חובה) 

Please add 3 and 4 and type the answer here:


Enter the numbers above: