How to Invoke IExplorer from aspx page

Discussion in 'ASP .Net' started by kapila Wijethilaka, Nov 28, 2003.

  1. 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");
     
    kapila Wijethilaka, Nov 28, 2003
    #1
    1. Advertisements

  2. 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.
     
    Chris Jackson, Nov 28, 2003
    #2
    1. Advertisements

  3. kapila Wijethilaka

    Tommy Guest

    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,
     
    Tommy, Nov 28, 2003
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.