naeem_s Posted March 21, 2004 Posted March 21, 2004 (edited) Help, why won't the following code work (taken from an ASPX page). //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? Edited March 21, 2004 by naeem_s Quote
Moderators Robby Posted March 21, 2004 Moderators Posted March 21, 2004 Thank god it doesn't work from a web page image the caos some sites would inflict. You can use window.open in JavaScript Quote Visit...Bassic Software
naeem_s Posted March 22, 2004 Author Posted March 22, 2004 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. Quote
Moderators Robby Posted March 22, 2004 Moderators Posted March 22, 2004 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. Quote Visit...Bassic Software
naeem_s Posted March 22, 2004 Author Posted March 22, 2004 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? Quote
Administrators PlausiblyDamp Posted March 23, 2004 Administrators Posted March 23, 2004 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. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
naeem_s Posted March 25, 2004 Author Posted March 25, 2004 The browser will be running under the ASPNET account - not the account of the logged on user' date=' therefore you will not see it on the desktop.[/quote'] 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? Quote
Moderators Robby Posted March 25, 2004 Moderators Posted March 25, 2004 It really is not a good idea to change the permissions of ASPNET, then the code itself will have full control over the server. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.