Security Exception Request Failed When Launching An EXE From Web

Posted on 2006-04-26
Last Modified: 2012-08-13
Hi, I have an ActiveX control written in C# that will have a button. I have this ActiveX control loaded in a HTML. When user clicked on the button, it is supposed to launch his calculator.exe from his computer.

This is part of the code in my ActiveX Control. I have this compiled into a DDL.

      private void button1_Click(object sender, System.EventArgs e)
                  System.Diagnostics.Process proc = new System.Diagnostics.Process();

I hosted this code on my PC(My own IIS), it gave me the security exception error first. Then I went to configure my .NET Framework 1.1 Configuration and set the Local Intranet Zone to FULL TRUST. I am finally able to open the calculator.exe by just clicking on the button. However, my colleague, on a same LAN, couldn't launch the calculator when i gave him my URL as he keeps getting the SeucrityExeption Request Failed when the button is pressed. He already set the  .NET Framework Configuration to have the Local Intranet Zone set to FULL TRUST. He still couldn't open the Calculator.exe. Please help!
Question by:sherly
    LVL 13

    Accepted Solution

    by: runs under a network service account which doesnt have permission to do that.

    you need to use impersonation, which kind depends on your architecture.  if your using windows authentication then its easy to take the httpcontext identity and have the thread impersonate.  if not then we can still use but you'll just impersonate under some hard coded id.

    take a look at my prior post/solution to this.

    LVL 3

    Expert Comment

    Ask your colleague to add your site to the list of intranet sites in his internet explorer.

    (Tools -> internet options-> security, select "local intranet" and click the "sites" button)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now