ActiveXPosh IIS6 crash

This forum can be browsed by the general public. Posting is no longer allowed as the product has been discontinued.
User avatar
heapmaster
Posts: 7
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Mon Mar 30, 2009 8:29 am

ActiveXPosh IIS6 crash

Post by heapmaster »

I have an issue that seems to happen a lot. The latest download of ActiveXPosh in IIS6 crashes, im calling it from classic ASP. The error -2147024894 comes up and I restart IIS and it works again for a while, then crashes again after an unknown period. Why would this be? Please help...thanks.

User avatar
Alexander Riedel
Posts: 7260
Joined: Tue May 29, 2007 4:43 pm

ActiveXPosh IIS6 crash

Post by Alexander Riedel »

The error number translates to "The system cannot find the file specified. " Sooo, not really sure what happens there. Do you have more details, like how exactly you use it, any crash data from the event logs etc?
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
heapmaster
Posts: 7
Joined: Mon Mar 30, 2009 8:29 am

ActiveXPosh IIS6 crash

Post by heapmaster »

Thanks for the reply, your a life saver if i can figure this out. The control must know im talking to you as it appears it hasnt crashed yet since I posted last, what luck. But this is the ASP code I use. Next time it crashes I will give you the full ASP error details and the windows event log.on error goto 0Dim ActiveXPosh,success,strDomainNamestrDomainName = "Test_VM"gstrVMwareServerAddress = "x.x.x.x"gstrVMwareUsername = "xxxxxx"gstrVMwarePassword = "xxxxxx"Set ActiveXPosh = Server.CreateObject("SAPIEN.ActiveXPosh") success = ActiveXPosh.Init(vbFalse) 'Do not load profilesIf success <> 0 then response.write "error"End IfActiveXPosh.Execute("Add-PSSnapin VMware.VimAutomation.Core")If ActiveXPosh.Eval("$Server = Connect-VIServer " & gstrVMwareServerAddress & " -user " & gstrVMwareUsername & " -password " & gstrVMwarePassword) = vbTrue Then Call ActiveXPosh.Eval("Stop-VM -VM (Get-VM -Name " & Chr(34) & strDomainName & Chr(34) & ") -Confirm:$false") Call ActiveXPosh.Eval("Start-VM -VM (Get-VM -Name " & Chr(34) & strDomainName & Chr(34) & ") -Confirm:$false") Call ActiveXPosh.Eval("Disconnect-VIServer -Server $Server -Confirm:$false")Else response.write "connect error"End IfSet ActiveXPosh = Nothing

User avatar
Alexander Riedel
Posts: 7260
Joined: Tue May 29, 2007 4:43 pm

ActiveXPosh IIS6 crash

Post by Alexander Riedel »

Well, let us know if it happens again.

One thing that might help is the following. I don't know anything about your site, but since PowerShell is not really a fast startup thing, it is quite inefficient to create the ActiveXPosh object (and thereby PowerShell) every single time you use it.
I would think that creating the object, say, as a session variable would make things smoother.

But like I said, not knowing anything about the site setup and purpose or even how this is used, it might not matter.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
heapmaster
Posts: 7
Joined: Mon Mar 30, 2009 8:29 am

ActiveXPosh IIS6 crash

Post by heapmaster »

sorry for the delay in posting back...I continue to get the errors randomly. If I restart IIS it goes away for a couple of days. Also there is no errors in the event log in any section when this error occurs.The error is -2147024894, it occurs on line 3, this line:Set ActiveXPosh = Server.CreateObject("SAPIEN.ActiveXPosh")
heapmaster2009-08-17 11:01:09

User avatar
Alexander Riedel
Posts: 7260
Joined: Tue May 29, 2007 4:43 pm

ActiveXPosh IIS6 crash

Post by Alexander Riedel »

The error means IIS cannot find the file associated with the COM object. It happens before ActiveXPosh even gets into play. I honestly have no idea since I am not an IIS person. Since it runs for a couple of days, I would ask someone with IIS expertise for help.

Sorry I can't help more with that.

Alex
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
heapmaster
Posts: 7
Joined: Mon Mar 30, 2009 8:29 am

ActiveXPosh IIS6 crash

Post by heapmaster »

Ok thanks, Im going to put the code into a VB6 dll and call ActiveXPosh from the DLL and then call the VB6 dll from ASP and see if that fixes it.

User avatar
heapmaster
Posts: 7
Joined: Mon Mar 30, 2009 8:29 am

ActiveXPosh IIS6 crash

Post by heapmaster »

Ok, so I put the code into a VB6 dll. I referenced the type library you have incldued and I get the same error there as well:Error:-2147024894 - File or assembly name ActiveXPosh, or one of its dependencies, was not found., in VMwareCommDLL.clsVMwareComm.RestartVM at line 100code as follows, line 100 is in bold:Dim ActiveXPosh As ActiveXPosh.IActiveXPoSH, success As BooleanSet ActiveXPosh = CreateObject("SAPIEN.ActiveXPosh")If ActiveXPosh.IsPowerShellInstalled = True Then success = ActiveXPosh.Init(False)....what dependencies does this component have that I could be missing?
heapmaster2009-08-17 13:11:01

User avatar
heapmaster
Posts: 7
Joined: Mon Mar 30, 2009 8:29 am

ActiveXPosh IIS6 crash

Post by heapmaster »

One link here: http://www.smartertools.com/Portal/KB/a ... 6suggested that I change the permissions on the temp folder, I already checked them and they are correct with the KB listed users as well as everyone having full permissions on the folder. So I would assume its something else...

User avatar
Alexander Riedel
Posts: 7260
Joined: Tue May 29, 2007 4:43 pm

ActiveXPosh IIS6 crash

Post by Alexander Riedel »

That sounds like the component isn't even registered.
Did you run regasm on the dll?

If yes, go here:
http://www.dependencywalker.com/

and check the dependencies of the dll on YOUR system.
It will tell you what is missing, if anything.

Alex
Alexander Riedel
SAPIEN Technologies, Inc.

Locked