check_iis icon indicating copy to clipboard operation
check_iis copied to clipboard

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

Open Tontonitch opened this issue 4 years ago • 5 comments

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

Tontonitch avatar Jul 19 '21 13:07 Tontonitch

What if you try to do inventory instead of check?

Any AppPools without name? Special characters?

man. 19. jul. 2021 kl. 16:00 skrev Yannick Charton @.***

:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/TheFlyingCorpse/check_iis/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC26RXBDJTHGRXVNUD4Q2DTYQVWLANCNFSM5ATYNU4A .

TheFlyingCorpse avatar Jul 20 '21 05:07 TheFlyingCorpse

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.

Tontonitch avatar Jul 22 '21 08:07 Tontonitch

Can you try using the debug switch with the others?

If you cant share openly, can you share directly?

tor. 22. jul. 2021 kl. 10:22 skrev Yannick Charton @.***

:

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.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/TheFlyingCorpse/check_iis/issues/3#issuecomment-884737621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC26RTT36H4DR6QGLZOXG3TY7IL5ANCNFSM5ATYNU4A .

TheFlyingCorpse avatar Jul 22 '21 21:07 TheFlyingCorpse

The error itself might be because a website is not assigned to a valid AppPool. Did someone recreate an AppPool without reassigning the website?

tor. 22. jul. 2021 kl. 10:22 skrev Yannick Charton @.***

:

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.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/TheFlyingCorpse/check_iis/issues/3#issuecomment-884737621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC26RTT36H4DR6QGLZOXG3TY7IL5ANCNFSM5ATYNU4A .

TheFlyingCorpse avatar Jul 22 '21 21:07 TheFlyingCorpse

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 avatar Aug 08 '21 10:08 TheFlyingCorpse