Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start WPF application from link in browser?

Tags:

browser

wpf

We have a requirement to start a WPF application with specific parameters from a link in a browser.

We are wondering if this is possible?

As an alternative could we embed the web application in a WPF browser control, and read the values out of the html web page?

like image 928
Shiraz Bhaiji Avatar asked May 30 '11 07:05

Shiraz Bhaiji


People also ask

Can WPF application run in browser?

WPF Browser applications (or XAML Browser applications, or XBAP) are a specific kind of application that are compiled into . xbap extensions and can be run in Internet Explorer.

Can WPF be targeted to Web Browser Yes or no?

WPF only runs on windows. You can make a type of wpf application called xbap which runs in a browser.

How does a WPF application start?

The first Window that is instantiated within a WPF application is automatically set by Application as the main application window. The main window is referenced with the Application. MainWindow property.


1 Answers

Several possibilities :

  • if you control the browser (i.e. if you are in an intranet scenario, and have the opportunity to deploy applications), you can :
    • create an activex or plugin that runs the application
    • register a new uri scheme to interpret the url of kind "yourapplication://yourarguments"
    • (complex): deploy a listening app ran under the user session, and from the webapplication, ask this listening app to run the target application
    • reduce the security of the browser (not recommended)
  • if you don't control the browser:

    • create a clickonce application... this involves a setup, but which does not require admin privilege
  • Moving to Silverlight also might be an option, depending on your needs. SilverLigth V5 (still in beta) notably adds the ability for an admin to control the rights of the application via a GPO

Note: My feelings is the later option (Silverlight) is far more preferable because it's a lot more cleaner and less security hole factor. However, it can only be done if your requirements fits into the SL features

like image 172
Steve B Avatar answered Sep 20 '22 03:09

Steve B