Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 8961

Is there a way to fix an empty IIS Manager without reformatting?

$
0
0

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_CRASHIIS 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:InetMgrThe 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 apppoolAPPPOOL "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 apppoolAPPPOOL "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 sitesSITE "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 sitesSITE "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:apphostApplied 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


Viewing all articles
Browse latest Browse all 8961

Trending Articles