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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi all, I need a server side IE

Status
Not open for further replies.

robbiedwards6

Technical User
Jan 31, 2012
6
IL
Hi all,

I need a server side IE automation in ASP
So when a client calls an asp page, this page will
open a local (server-side) IE window.

I tried the next ASP code:

<head runat="server">

</HEAD>
<%
dim IE
IE = CreateObject("InternetExplorer.Application")
IE.navigate("google.com")
IE.visible = true

%>

I did not get any errors, but from the other hand
no IE window is opened on the server-side.

Can any one help?
 
Even if it does open, you wont see it via ASP.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Do you want the client to cause an IE session to pop up on the server? Imagine if all the clients did that: the server would grind to a halt with loads of IE windows popping up. Is that what you really want?
 
I will explain my problem.

I have an automation that
Can work only in a browser.
It is depended much on the
Ui inside the web page.

I cannot invoke this from
A cURL or MSXLS object.

This automation is supposed
To be triggered from a different
Server which is the client.
The problem is that the client
Server can only send cURL calls.

I need those calls to create
A local browser instant that
Will invoke my automation.

I am preaty much stuck with this
Automation and with the cURL posts

Any ideas?

Best regards
Robbie
 
Not going to happen using ASP, it simply does not work like that.

ASP code does NOT 'interact' with a browser, not even one running on the local machine, ASP code (VBScript or JScript) can only respond to requests for a URL on the 'website' it is playing host to, and once the response is sent to the user agent the ASP scripts stop.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Chris: ASP can do anything you program it to do in vbscript or javascript, including (i think) using wscript.shell to run commands or other vbs files on the server. But doing this in ASP would probably involve a lot of tweaking, lowering of security, and creating enormous security holes.

Another idea is to let ASP write the options the user selected to a database or a file, and have a scheduled task running on the server that "watches" for requests made and acts on them.
 
Hi chris,
The idea of scheduled tasks sounds great
But still i will have to open a browser
Programaticaly localy on the server.

And i am still trying to figure out
A good way to do so...

Any ideas?
 
ASP can do anything you program it to do in vbscript or javascript, including (i think) using wscript.shell to run commands or other vbs files on the server.

Sure but the script cannot directly pass data back to the server, in the same session context as the original request.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
There is no session contex...

The request is actually an order
Its details come as url parameters.

But as i said, to generate the
Order in my system i have to go
Through a hard coded automation
That can only be generated in
A web browser...

Any ideas how to open an IE
Instant programaticaly on the
Server side.

Best regards
 
There is no session contex...

Yes there is, every connection to the server creates a session on the server that is unique to that request and to that one user agent, in this session the allocated memory and running process values and variables are isolated from all other processes and operations. This always occurs and is non-negotiable. YOU may not be creating session variables and values, but the server IS.


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
I meant that i dont need
To take in consideration the
Session contex, it has no
Relevance for creating an order.

If i save the data of that order
In a data base file,
Any ideas on how to open
A browser programaticaly localy
on the server?
 
it has no
Relevance for creating an order.

Absolutely nothing at all to do with creating "an order", server "sessions" are there to isolate any particular process from ALL OTHER processes. This is why process 'A' running in the IIS web server context CANNOT be accessed by other processes running in either the IIS context OR a separate process running OUTSIDE of the web server context such as desktop applications (browsers etc)

To accomplish what you hope to achieve would require a process running as an ISAPI filter (Internet Server Application Programming Interface) operation that could 'bridge' between the IIS process and the external (desktop) process.


A browser programaticaly localy
on the server?

To put this plainly ... ... YOU CAN'T.

The two processes are completely incompatible!

A browser CANNOT save anything to the local machine other than cookies and temporary Internet cache items, without having a real user in control to provide 'permission'.

IIS (the web server) CANNOT access anything other than the location than the IIS user context has access to, (usually %SYSTEM_DRV%\inetpub\
Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
a hard coded automation that can only be generated in a web browser...

I am pretty sure that's not the way it is. If your entire automation wre programmed in JavaScript, then mmmmaaaaaayyybeeeee but ummmm no, probably not even then.
However I very much doubt that is how you do it. Why? because:
Its details come as url parameters

So you pass the details in a querystring. That needs to be processed server-side, yes. But not in a browser as the browser is always client-side, even if executed on a server...
You need to process it in IIS, yes. But that's not a browser. ;-)

All your ASP code is always process server-side, so you already have what you need.
Why don't you show how you receive the URL parameters and how you would like to invoke the "browser" (and with what page)?

"Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family." (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.
 
Well guys,

Concluding this debate,

I did it anyway...

I built an ASP page (with is called by the client-side via cURL call)

This page creates an IE object (server side), and
navigates it to the correct URL (the one sent by the cURL call).
Apparently, IE objects do run javascript, so the automation
worked just fine.

When finished the ASP closes the server side IE object
and returns a response to the client that order has been created.

To put it in simple words,

The client calls a server
who becomes a client of another server

Best Regards
and many thanks for your thoughts


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top