Bug in EpiServer manager: An entry with the name ROOT already exists but is not a virtual directory (schema class IISWebVirtualDir).
Vote:
Hi!
I just try today install new EpiServer installation in new website. I created new web site and run EpiServer Manager 1.0 and I got this error:
"An entry with the name ROOT already exists but is not a virtual directory (schema class IISWebVirtualDir)."
And here is message from JIT:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ApplicationException: An entry with the name ROOT already exists but is not a virtual directory (schema class IISWebVirtualDir)
at ElektroPost.Win32.Metabase.IIsWebVirtualDir..ctor(DirectoryEntry virtualDir)
at ElektroPost.Win32.Metabase.IIsWebServer.CreateRoot()
at EPiServerManager.Components.WebSite..ctor(IManagerEntity parent, IIsWebServer site)
at EPiServerManager.Components.WebServer.LoadWebSites()
at EPiServerManager.Controls.ManagerTreeView.Load()
at EPiServerManager.Forms.MainForm.SetupForm()
at EPiServerManager.Forms.MainForm.MainForm_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
EPiServerManager
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/EPiServer%20Manager/EPiServerManager.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
ElektroPost.Win32
Assembly Version: 1.0.0.5
Win32 Version: 1.0.0.5
CodeBase: file:///c:/windows/assembly/gac/elektropost.win32/1.0.0.5__49582048716da0a9/elektropost.win32.dll
----------------------------------------
System.DirectoryServices
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.directoryservices/1.0.5000.0__b03f5f7f11d50a3a/system.directoryservices.dll
----------------------------------------
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
Regards
Mateusz Kierepka
Version 1.1 have this same problem:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ApplicationException: An entry with the name ROOT already exists but is not a virtual directory (schema class IISWebVirtualDir)
at ElektroPost.Win32.Metabase.IIsWebVirtualDir..ctor(DirectoryEntry virtualDir)
at ElektroPost.Win32.Metabase.IIsWebServer.CreateRoot()
at EPiServerManager.Components.WebSite..ctor(IManagerEntity parent, IIsWebServer site)
at EPiServerManager.Components.WebServer.LoadWebSites()
at EPiServerManager.Controls.ManagerTreeView.Load()
at EPiServerManager.Forms.MainForm.SetupForm()
at EPiServerManager.Forms.MainForm.MainForm_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
EPiServerManager
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Program%20Files/EPiServer%20Manager/EPiServerManager.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.ServiceProcess
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.serviceprocess/1.0.5000.0__b03f5f7f11d50a3a/system.serviceprocess.dll
----------------------------------------
ElektroPost.Win32
Assembly Version: 1.0.0.6
Win32 Version: 1.0.0.6
CodeBase: file:///C:/Program%20Files/EPiServer%20Manager/ElektroPost.Win32.DLL
----------------------------------------
System.DirectoryServices
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.directoryservices/1.0.5000.0__b03f5f7f11d50a3a/system.directoryservices.dll
----------------------------------------
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
I think we got it now. I have not seen this particular problem before, but it looks like the IIS metabase is somewhat corrupt. Do you know if somebody has perhaps modified the metabase manually?
Normally the schema class name of a virtual directory is the exact string "IIsWebVirtualDir", but in the IIS with the problem it was "IISWebVirtualDir", according to the trace dump above (notice the prefix "IIs" vs "IIS"). Since the string should be exact, a case-sensitive string comparison was made, which failed and an exception was thrown.
A workaround is to edit the metabase manually and change the schema name of virtual directories to "IIsWebVirtualDir", where needed.
This issue should be gone in the next version of EPiServer Manager (v1.2), where we have modified the schema name comparison and made it case-insensitive, just in case. ;-)