How to Invoke IExplorer from aspx page

  • Thread starter Thread starter kapila Wijethilaka
  • Start date Start date
K

kapila Wijethilaka

Hello,

I want to invoke clients iExplorer from my axpx page.
I did a some cod eto dot this.but it gave me below error.

can anybody help me with this

thanks

Access is denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access is denied.

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or
Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in Explorer,
choose "Properties" and select the Security tab. Click "Add" to add the
appropriate user or group. Highlight the ASP.NET account, and check the
boxes for the desired access.

This my code segment

Browser = new InternetExplorer(); //the error gave at this point

Browser.Visible = true;

Browser.GoHome();

procs = Process.GetProcessesByName("IEXPLORE");
 
You are not invoking IE on the client - the code behind runs on the server,
and you are trying to launch an IE process on the server. You can set up
permissions to allow this, but you will won't get what you want. Rather, you
need to run client-side code. Since your JavaScript code runs in a sandbox,
it isn't going to be able to launch processes. However, since you already
are running in a browser, just use a JavaScript window.open to launch a
second browser window.
 
If you want to launch a new instance of "Internet Explorer" on the
client side, you will need to use javascript, or a component that is
downloaded on the client's machine.

The code you provided attempts to launch "Internet Explorer" on the
web server, and that's why you are getting access denied error. Even
if you have enough permission to launch IE on the web server, it is
certainly not what you're looking for.

With javascript, you can use the "ActiveXObject" method to launch an
executable.

It'll be helpful if you can explain why you want to launch a new
instance of "Internet Explorer" on the client side.

Tommy,
 
Back
Top