private static void FillWmiObjectFromVirtualDirectoryRest(ManagementBaseObject obj, WebVirtualDirectoryItem virtDir) { obj.Properties["Path"].Value = virtDir.ContentPath; obj.Properties["HttpRedirect"].Value = (virtDir.HttpRedirect == null || virtDir.HttpRedirect == "") ? null : virtDir.HttpRedirect; }
private static void FillVirtualDirectoryRestFromWmiObject(WebVirtualDirectoryItem virtDir, ManagementBaseObject obj) { virtDir.ContentPath = (string)obj.Properties["Path"].Value; virtDir.HttpRedirect = (string)obj.Properties["HttpRedirect"].Value; }
private static void FillWmiObjectFromVirtualDirectory(ManagementBaseObject obj, WebVirtualDirectoryItem virtDir) { obj.Properties["AppFriendlyName"].Value = virtDir.Name; obj.Properties["AccessRead"].Value = virtDir.AllowReadAccess; obj.Properties["AccessScript"].Value = virtDir.AllowScriptAccess; obj.Properties["AccessSource"].Value = virtDir.AllowSourceAccess; obj.Properties["AccessWrite"].Value = virtDir.AllowWriteAccess; obj.Properties["AccessExecute"].Value = virtDir.AllowExecuteAccess; obj.Properties["EnableDirBrowsing"].Value = virtDir.AllowDirectoryBrowsingAccess; obj.Properties["AuthNTLM"].Value = virtDir.AuthWindows; obj.Properties["AuthAnonymous"].Value = virtDir.AuthAnonymous; obj.Properties["AuthBasic"].Value = virtDir.AuthBasic; if(virtDir.DefaultDocs != null && virtDir.DefaultDocs != string.Empty) obj.Properties["DefaultDoc"].Value = virtDir.DefaultDocs; if(virtDir.AnonymousUsername != null && virtDir.AnonymousUsername != string.Empty) { obj.Properties["AnonymousUserName"].Value = virtDir.AnonymousUsername; obj.Properties["AnonymousUserPass"].Value = virtDir.AnonymousUserPassword; } obj.Properties["AppPoolId"].Value = virtDir.ApplicationPool; }
private static void FillVirtualDirectoryFromWmiObject(WebVirtualDirectoryItem virtDir, ManagementBaseObject obj) { virtDir.AllowReadAccess = (bool)obj.Properties["AccessRead"].Value; virtDir.AllowScriptAccess = (bool)obj.Properties["AccessScript"].Value; virtDir.AllowSourceAccess = (bool)obj.Properties["AccessSource"].Value; virtDir.AllowWriteAccess = (bool)obj.Properties["AccessWrite"].Value; virtDir.AllowExecuteAccess = (bool)obj.Properties["AccessExecute"].Value; virtDir.AllowDirectoryBrowsingAccess = (bool)obj.Properties["EnableDirBrowsing"].Value; virtDir.AnonymousUsername = (string)obj.Properties["AnonymousUserName"].Value; virtDir.AnonymousUserPassword = (string)obj.Properties["AnonymousUserPass"].Value; virtDir.AuthWindows = (bool)obj.Properties["AuthNTLM"].Value; virtDir.AuthAnonymous = (bool)obj.Properties["AuthAnonymous"].Value; virtDir.AuthBasic = (bool)obj.Properties["AuthBasic"].Value; virtDir.DefaultDocs = (string)obj.Properties["DefaultDoc"].Value; }