मैंसीआई का उपयोग कर एएसपीएक्स पेज के भीतर से आईआईएस में वेबसाइटों की सूची कैसे प्राप्त कर सकता हूं?
DirectoryEntry root = new DirectoryEntry("IIS://localhost/W3SVC/1/Root");
foreach (DirectoryEntry de in root.Children)
{
}
उपयोग करने के लिए कोशिश कर रहा हूँ, लेकिन मैं
[COMException (0x80005000): Unknown error (0x80005000)]
System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +557
System.DirectoryServices.DirectoryEntry.Bind() +44
System.DirectoryServices.DirectoryEntry.get_IsContainer() +42
System.DirectoryServices.ChildEnumerator..ctor(DirectoryEntry container) +36
System.DirectoryServices.DirectoryEntries.GetEnumerator() +36
IISVdir.List(String RootWeb) in c:\Development\Testing\App_Code\IISVdir.cs:116
_Default.Page_Load(Object sender, EventArgs e) in c:\Development\Testing\Default.aspx.cs:11
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
System.Web.UI.Control.OnLoad(EventArgs e) +132
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
शायद इस डुप्लिकेट एक और, आम व्याख्या है - http://stackoverflow.com/questions/3782058/using-directoryentry-to-enumerate-iis-configuration- डेटा-हो रही-comexception –