Using RunAs with ClickOnce deployed App - Not Availiable

Unanswered Using RunAs with ClickOnce deployed App - Not Availiable

  • Saturday, February 11, 2006 11:45 PM
     
     

    I have a simple Desktop App that uses the current Windows Prinicpl to authenticate to Active Directory.

     

    To change the Context of the app,  I have been using RunAs from the context menu when starting the app.

     

    If I publish this with ClickOnce,  the user who installs the app loses the ability to right click on the app in the Start Menu to choose RunAs.

    They right click (with or without holding shift), and the RunAs command is never on the context menu.

    I can build user changing into the App, but I'd rather not since the need to change the user context is occasional.

    What about CO is disabling this feature?  How can I re-enable it?  I can't find anything the leads me to what maybe causing it.

     

    Thanks,

     

    Jef

All Replies

  • Friday, February 17, 2006 3:52 PM
     
     

    ClickOnce shortcuts don't support right-click run-as. This is by-design in the .Net 2.0 runtime.

    The shortcuts ClickOnce generates are not standard Windows shortcuts (.lnk) which typically reference the exe directly. They are specific to ClickOnce and contain a serialized textual form of the application identity which is passed to the ClickOnce runtime at activation time. The runtime performs varous operations at shortcut activation time and may sync with the deployment server to install or update the application before launching it. All of these operations run in the current user's context.

    The concept of run-as in this model introduces some design complexity. For example, should the app be installed/updated for that user. Should the trust decision for the original user be reused or should a reprompt occur. Should partial trust apps be allowed to run in an elevated context, etc.

    Since ClickOnce design targets isolated non-impactful per-user applications that can be installed and run under limited user accounts it wasn't an immediate priority to support run-as functionality for the first version, especially given the additional model complexity it introduces. It is possible that this will be revisited in future releases