Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Exception when checking websites: Exception: System.Runtime.InteropServices.COMException: The object identifier does not represent a valid object. #3

Open
Tontonitch opened this issue Jul 19, 2021 · 5 comments

Comments

@Tontonitch
Copy link

Hello,
I'm facing an issue with the plugin. Works fine with app pools but not with app websites.
windows 2012 R2, IIS 8

C:\Users\xxx\Downloads\check_iis\Release>check_iis.exe -B -T
CRITICAL: AppPool 'DefaultAppPool' with an incorrect state: 'Stopped'.  |  'Numb
erOfAppPools'=14 'NumberOfStartedAppPools'=13;;;0;14 'NumberOfStoppedAppPools'=1
;;;0;14 'NumberOfStoppingAppPools'=0;;;0;14 'NumberOfStartingAppPools'=0;;;0;14
'NumberOfUnknownAppPools'=0;;;0;14 'NumberOfCorrectAppPools'=13;;;0;14 'NumberOf
WrongAppPools'=1;;;0;14
C:\Users\xxx\Downloads\check_iis\Release>
C:\Users\xxx\Downloads\check_iis\Release>check_iis.exe -b -t

Unhandled Exception: System.Runtime.InteropServices.COMException: The object ide
ntifier does not represent a valid object. (Exception from HRESULT: 0x800710D8)
   at Microsoft.Web.Administration.Interop.IAppHostProperty.get_Value()
   at Microsoft.Web.Administration.ConfigurationElement.GetPropertyValue(IAppHos
tProperty property)
   at Microsoft.Web.Administration.Site.get_State()
   at MonitoringPluginsForWindows.check_iis.InventorySites(ServerManager iisMana
ger, Boolean bVerboseInventory, Boolean do_running_only, Boolean do_inventory) i
n C:\Users\yannick\Downloads\check_iis-master\Solution\check_iis\Program.cs:line
 807
   at MonitoringPluginsForWindows.check_iis.CheckAllSites(Int32 returncode, Bool
ean do_perfcounter_sites, Boolean do_singluar_check, Boolean do_only_autostart_s
ites, String expected_state) in C:\Users\yannick\Downloads\check_iis-master\Solu
tion\check_iis\Program.cs:line 1039
   at MonitoringPluginsForWindows.check_iis.Main(String[] args) in C:\Users\yann
ick\Downloads\check_iis-master\Solution\check_iis\Program.cs:line 255

C:\Users\xxx\Downloads\check_iis\Release>

Tested using an admin account / admin console.

Any clue of what could be the reason?

BR

@TheFlyingCorpse
Copy link
Owner

TheFlyingCorpse commented Jul 20, 2021 via email

@Tontonitch
Copy link
Author

That's the website part (lowercase potions) which is not working, apparently the apppool part seems fine.

Inventory try:
C:\Users\xxx\Downloads\check_iis\Release>check_iis.exe -a

Unhandled Exception: System.Runtime.InteropServices.COMException: The object identifier does not represent a valid object. (Exception from HRESULT: 0x800710D8)
at Microsoft.Web.Administration.Interop.IAppHostProperty.get_Value()
at Microsoft.Web.Administration.ConfigurationElement.GetPropertyValue(IAppHostProperty property)
at Microsoft.Web.Administration.Site.get_State()
at MonitoringPluginsForWindows.check_iis.InventorySites(ServerManager iisManager, Boolean bVerboseInventory, Boolean do_running_only, Boolean do_inventory) i
n C:\Users\yyy\Downloads\check_iis-master\Solution\check_iis\Program.cs:line 791
at MonitoringPluginsForWindows.check_iis.IisInventory(Boolean do_sites, Boolean do_apppools, Boolean do_inventory_sites, Boolean do_inventory_apppools, Strin
g inventory_format, String inventory_level, Boolean do_running_only, Boolean do_skip_empty_vars, Boolean do_skip_empty_apppools) in C:\Users\yyy\Downloads\c
heck_iis-master\Solution\check_iis\Program.cs:line 589
at MonitoringPluginsForWindows.check_iis.Main(String[] args) in C:\Users\yyy\Downloads\check_iis-master\Solution\check_iis\Program.cs:line 260

C:\Users\xxx\Downloads\check_iis\Release>

I've checked the site names, one includes some dots. Appart from that, no special characters.
For the apppool names, no special characters.

@TheFlyingCorpse
Copy link
Owner

TheFlyingCorpse commented Jul 22, 2021 via email

@TheFlyingCorpse
Copy link
Owner

TheFlyingCorpse commented Jul 22, 2021 via email

@TheFlyingCorpse
Copy link
Owner

I have an idea for a fix to this btw, it can throw an "UNKNOWN" and report back the AppPool that has the assumed configuration error.

TheFlyingCorpse added a commit that referenced this issue Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants