Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP.NET and WMI

Status
Not open for further replies.
Nov 14, 2000
31
0
0
AU
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top