2

On a fresh machine, after trying to install IIS, the IIS Manager window has no connection to my local server listed and there seems to be no way to add one.

enter image description here

I've uninstalled, deleted intetpub/inetserv folders, reinstalled, used DISM to repair (DISM.exe /Online /Cleanup-image /Restorehealth), sfc to scan (sfc /scannow), and everything I can think to try (including command line variations of uninstalling, reinstalling). I've rebooted between steps, installed windows updates, no matter what I try I get an empty manager window. Sometimes the "Home" button isn't disabled (as it is in the screenshot) but attempting to click it provides the following exception in my Application event log:

The description for Event ID 13 from source Microsoft-Windows-IIS-IISManager cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

IISMANAGER_CRASH

IIS Manager terminated unexpectedly.

Exception:System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Web.Management.Host.UserInterface.ManagementFrame.NavigateToHomepage(Boolean connectionReactivating)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at Microsoft.Web.Management.Host.Shell.ShellApplication.Execute(Boolean localDevelopmentMode, Boolean resetPreferences, Boolean resetPreferencesNoLaunch)

Process:InetMgr

The system cannot find the file specified

After searching rather extensively for other people experiencing this issue, I've found a variety of similar but different scenarios and very little about this, though there was this one question that looked identical, in their case corrupt files were identified, whereas in mine I don't see that when scanning.

Attempting to access the site in a browser (e.g. http://localhost) results in a 404.

I am able to inspect and configure the state of the server from the command line (using appcmd.exe) and it appears the Default Web Site exists, but does not have all of the expected default configuration.

In a previous install I saw all 3 default app pools I would expect:

>appcmd.exe list apppool
APPPOOL "DefaultAppPool" (MgdVersion:v4.0,MgdMode:Integrated,state:Started)
APPPOOL ".NET v4.5 Classic" (MgdVersion:v4.0,MgdMode:Classic,state:Started)
APPPOOL ".NET v4.5" (MgdVersion:v4.0,MgdMode:Integrated,state:Started)

Though after a few uninstalls and re-installs, currently I only see:

>appcmd.exe list apppool
APPPOOL "DefaultAppPool" (MgdVersion:v4.0,MgdMode:Integrated,state:Started)

In both cases, the default site appears to exist, but is not properly configured

>appcmd.exe list sites
SITE "Default Web Site" (id:1,bindings:,state:Unknown)

It can't be started in this state

>appcmd.exe start site "Default Web Site"
ERROR ( hresult:800710d8, message:Command execution failed.
The object identifier does not represent a valid object.
 )

Adding a binding allows it to start, but the above-mentioned 404 just changes to a blank page and a 401 response code

>appcmd.exe set site "Default Web Site" /bindings:"http://localhost:80"
>appcmd.exe list sites
SITE "Default Web Site" (id:1,bindings:http/*:80:localhost,state:Started)

I thought maybe it wasn't pointing to the wwwroot properly, so I tried updating that, but I still get the blank 401

>appcmd.exe set vdir "Default Web Site/" -physicalPath:"%SystemDrive%\inetpub\wwwroot"
VDIR object "Default Web Site/" changed

Continuing down this line of investigation, since other default values weren't set I thought maybe it wasn't using the app pool

>appcmd.exe set app "Default Web Site/" /applicationPool:"DefaultAppPool"
APP object "Default Web Site/" changed

I also tried enabling Anonymous auth, just to be sure

>appcmd.exe set config "Default Web Site" -section:system.webServer/security/authentication/anonymousAuthentication /enabled:"True" /commit:apphost
Applied configuration changes to section "system.webServer/security/authentication/anonymousAuthentication" for "MACHINE/WEBROOT/APPHOST/Default Web Site" at configuration commit path "MACHINE/WEBROOT/APPHOST"

No change in behavior. Ultimately, these last steps were just experiments to see if getting the default web site closer to default configuration might let the IIS Manager window load properly, though I suspect the issue is elsewhere I did find it strange that multiple attempts at uninstalling and reinstalling produced the same broken default site (even with deleting the directories).

Services start and stop fine, iisreset and the like work as expected, and so on. I'm at a loss for what to do next so I thought I'd ask if anyone had seen/fixed this before and, if so, how? Otherwise, are there more logs I can inspect to see what went wrong? Is there some type of repair I haven't tried? Anything to identify the root cause or fix the behavior without reformatting would be greatly appreciated (though I suspect soon the reformat option will become more appealing).

EDIT 20221213: I managed, with some uninstall/reinstall attempts, to get the IIS Remote Management Tools installed and connected that to the localhost, but all of my other installed features are missing (even with uninstall/reinstall). It seems even anonymous authentication is missing which isn't even its own option in the optional features list which might have something to do with the persistent 401s even after trying to set it via appcmd.

Remote Tools with no features listed

10
  • 1
    This smells a bit like .net problems. Is your .net framework (2/3/3.5) setup correct? Also, when InetMgr is dying because of a requested file, you can trace that file with procmon. The file name and path should point in the right direction.
    – bjoster
    Dec 10, 2022 at 18:02
  • @bjoster I didn't see any meaningful missing files in ProcMon from the IIS Manager; I think that the "The system cannot find the file specified" might be from the event message library not being properly registered. The exception happening is a NullReferenceException which I believe is implying that there's no home page to navigate to, which it doesn't expect. Dec 11, 2022 at 20:32
  • That's strange. Does adding a new site and removon the defualt site work? appcmd add site /name:site.example.com /bindings:http://*:80 /physicalpath:"C:\example"?
    – bjoster
    Dec 13, 2022 at 16:46
  • @bjoster the new site (with new app pool and everything) still gets the same blank page 401 I get on the default web. I've added some extra info to the question found using the remote management tools Dec 13, 2022 at 16:53
  • Does copying (and overwriting) an intact and working metabase from a working server help? That's almost everything in %WinDir%\System32\Inetsrv\Config.
    – bjoster
    Dec 13, 2022 at 16:56

2 Answers 2

0

Enabling the default administrator on a fresh build and then logging on as the default administrator allows IIS Management to come up ok after installing IIS in the Programs and Features. The 401 error when bringing up the local host is not dependent on the IIS Management being blank or not for non default administrator users.

To eliminate the 401 error: For user administrators: They need the folder with the html or asp files etc. shared with read/write privileges for the administrator but also need access for IUSR and IIS_IUSRS.

0

I was just going through notifications and saw this was still out here so I just wanted to follow up and note that, while it was unclear why this impacted some machines and not others despite having the same policies, the issue turned out to be cause by some enterprise antivirus software and the solution was to remove all the IIS components, reboot, temporarily disable the antivirus, install the IIS components, re-enable the antivirus.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .