Launching IE from ASPX page, Can it be done?

naeem_s

Newcomer
Joined
Mar 13, 2004
Messages
10
Help, why won't the following code work (taken from an ASPX page).

Code:
//begin code 
private void btnCapture_Click(object sender, System.EventArgs e) 
{ 
   SHDocVw.InternetExplorer ie = new SHDocVw.InternetExplorerClass(); 
   ie.Visible = true; 

   //some more operations 
} 
//end code

Can I not launch IE in this way? why not?
 
Last edited:
Thank god it doesn't work from a web page image the caos some sites would inflict.

You can use window.open in JavaScript
 
I'm trying to open IE on the server so that I can take a screen shot of the browser and save as an image.
 
Well if you're trying to do it on the server then it'll work, I'm not sure how but you can probably do this as a service.
 
The browser just won't appear, the instance of IE is created but doesn't appear when the Visible property is set to true.

I've got some unit tests (NUnit) set up and they seem to work fine, why won't it work when I call it through the ASP.NET page?
 
PlausiblyDamp said:
The browser will be running under the ASPNET account - not the account of the logged on user, therefore you will not see it on the desktop.

I'm assuming the ASPNET will not have the same rights as the logged on user, hence I won't be able to launch IE due to security restrictions.

What do I need to do to the ASPNET account to give it sufficient rights?
 
It really is not a good idea to change the permissions of ASPNET, then the code itself will have full control over the server.
 
Back
Top