chuckster1
MIS
Hi There,
I'm trying to create a web interface for some of my WMI scripts.
If I pass the name of the computer that hosts the web page to the sub the wmi script works. If I pass the name of another computer I get the error shown below.
I suspect that it is a permissions thing but I have tried just about every option that I could find. I'm running it with impersonation on and have tried all authenication methods in IIS but still no luck.
ERROR:
Cannot create ActiveX component.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: Cannot create ActiveX component.
Source Error:
Line 38:
Line 39: objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2"
Line 40: IPconfigset = objWMIService.ExecQuery _
Line 41: ("Select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE"
Stack Trace:
[Exception: Cannot create ActiveX component.]
Microsoft.VisualBasic.Interaction.GetObject(String PathName, String Class) +62
Accountable.NetWorkTools.FindNetBIOSIpaddress(String strComputer) in e:\inetpub\ Accountable.NetWorkTools.btnFindIP_Click(Object sender, EventArgs e) in e:\inetpub\ System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1263
I'm trying to create a web interface for some of my WMI scripts.
If I pass the name of the computer that hosts the web page to the sub the wmi script works. If I pass the name of another computer I get the error shown below.
I suspect that it is a permissions thing but I have tried just about every option that I could find. I'm running it with impersonation on and have tried all authenication methods in IIS but still no luck.
ERROR:
Cannot create ActiveX component.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: Cannot create ActiveX component.
Source Error:
Line 38:
Line 39: objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2"
Line 40: IPconfigset = objWMIService.ExecQuery _
Line 41: ("Select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE"
Stack Trace:
[Exception: Cannot create ActiveX component.]
Microsoft.VisualBasic.Interaction.GetObject(String PathName, String Class) +62
Accountable.NetWorkTools.FindNetBIOSIpaddress(String strComputer) in e:\inetpub\ Accountable.NetWorkTools.btnFindIP_Click(Object sender, EventArgs e) in e:\inetpub\ System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1263