INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Hi all, I need a server side IE

Hi all, I need a server side IE

(OP)
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?

RE: Hi all, I need a server side IE

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

RE: Hi all, I need a server side IE

Why you would want to do this?

RE: Hi all, I need a server side IE

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?

RE: Hi all, I need a server side IE

(OP)
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

RE: Hi all, I need a server side IE

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

RE: Hi all, I need a server side IE

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.

RE: Hi all, I need a server side IE

(OP)
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?

RE: Hi all, I need a server side IE

Quote:

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

RE: Hi all, I need a server side IE

(OP)
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

RE: Hi all, I need a server side IE

Quote:

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

RE: Hi all, I need a server side IE

(OP)
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?

RE: Hi all, I need a server side IE

Quote:

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.


Quote:

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\wwwroot\hostname\).

Chris.

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

RE: Hi all, I need a server side IE

Quote:

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:

Quote:

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. winky smile

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.

RE: Hi all, I need a server side IE

(OP)
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


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close