shell.application error "activex cant create object"

  • Thread starter Thread starter rami4tis
  • Start date Start date
R

rami4tis

hi

Ive a little code that run without errors on .vbs file
when i try to run this code on asp file ive got error :

Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object

wht is the problem ?
any ideas ?

this is the code :

Dim objApp
Dim objWindows, objWindow
Dim objIE

Set objApp = CreateObject("shell.application")
Set objWindows = objApp.Windows()
For i=0 to objWindows.Count - 1
Set objIEWnd = objWindows.Item(i)
If objIEWnd.LocationURL = "http://www.url.com Then
Set objIE = objIEWnd
objIE.Navigate(otherurl)
End If
Next

Set objIE = Nothing
Set objWindow = Nothing
set objWindows = Nothing
Set objApp = Nothing

thanks in advance ,
poli
 
You do know ASP (this NG is for ASP.NET, which is different from old ASP
technology) runs at web server end, don't you?

So, someone somehow gets brwoser running on the web server and you want to
force the brower navigate away to other address. If the "someone" logs in to
use the web server as his computer, he might be able to do this with your
VBS script, but from ASP, no, it is server side service app, which cannot
interract with desktop, where the browser window lives, not to mention the
account used to run ASP with IIS is not allowed to create such risky object
as Shell.
 
Back
Top