oHTTP.HTTPGet is working with impersonation set to a specific user. I can live with that. The IE code always fails with:
CallServer: Invoke failed with err code 80020009: Exception occurred.
This works:
FUNCTION testCom() oHTTP=CREATEOBJECT("wwHttp") lcHTML = oHTTP.HTTPGet("http://www.west-wind.com/") lcNF='testcom'+ RIGHT(SYS(2015),6)+'.txt' =STRTOFILE(lcHTML,lcNF,1) this.standardpage('ok','ok'+lcNF) ENDFUNC This fails: FUNCTION testComIE() oIE = Createobject("InternetExplorer.Application") oIE.Visible = .f. oIE.Navigate("http://www.west-wind.com/") lcNF='testcomIE'+ RIGHT(SYS(2015),6)+'.txt' Declare Integer Sleep In WIN32API Integer nTimeout Do While oIE.ReadyState # 4 Sleep(100) Enddo lcRetVal = oIE.Document.Body.OuterHtml oIE.Quit() =STRTOFILE(lcRetVal,lcNF,1) this.standardpage('ok','ok'+lcNF) ENDFUNC
Are you sure that IE can't be instantiated outside of the interactive session? Pretty sure that you can use InternetExplorer.Application from a service process that has no console...
+++ Rick ---
Impersonating a specific user has always worked great. However, I need to instantiate IE to fetch external data which apparently can't be done unless someone is logged on.
If I set the impersonation to the Interactive User, I can access IE, but the system seems to log off even though I've got the power option set to Turn off the display:Never. This happens irregularly and always at night.
I get the error message Unable to co create servers. As soon as I remote desktop to the server, everything works fine again for a couple of days.
Anything I can do to keep the system from logging off?
I'm using Web Server 2008.
TIA
Marty
