How to run XBAP (WPF Web) applications on newer versions of chrome - wpf

I have a few thousand applications written in C # WPF Web (.xbap). I need these applications to run on Google Chrome on newer versions as well.
I saw in some posts in 2014 ways to do this by copying some Firefox dlls to the Chrome application folder (C:\Users[USER]\AppData\Local\Google\Chrome\Application) but in the new versions this directory no longer exists ....
Any way to do that in the middle of 2020? ahahah :(

You cannot run xbap application directly with Google Chrome, but you can run it with chrome extension called IE Tab may this will help you.

Related

Run WPF application in browser

I have my application wrote in WPF. Now, i want it to run in browser so I've read about it and I know that XBAP is my solution.
What is my problem? It won't run on my PC. I checked every popular browser (chrome, FF, IE, opera) and nothing. Browsers can't handle .xbap files and just downloads it.
I try and try and nothing but above happened. Can anyone guess why it don't work? Is it deprecated technology, i have too-new browsers or what? Every entries I found about it are 2-4 years old.
Firstly for Internet Explorer (IE9 onwards) you need to ensure that you have enabled XBAP/XAML support:
For Firefox and Chrome you have to do something a bit different:
How can I get my XBAP to run in my browser instead of downloading it on Windows 7?
But in addition to the above you need to be aware that when you run an XBAP application it runs in the Internet Zone....so your biggest problem is that normally you don't have full-trust...therefore your application can't call privileged code...if it tries to then you get security exceptions.
http://www.tarkia.com/blog/tag/difference-between-wpf-application-and-xbap-application/
http://www.tarkia.com/blog/2009/11/26/understanding-xbap-full-trust-partial-trust-certificates-and-more%E2%80%A6/
One way to get your XBAP to be "trusted" is to get it signed with a certificate (you should purchase a proper one from Verisign rather than use a test certificate) and deployed with ClickOnce.
http://blogs.microsoft.co.il/blogs/maxim/archive/2008/03/05/wpf-xbap-as-full-trust-application.aspx
http://blogs.microsoft.co.il/blogs/maxim/archive/2008/03/31/how-to-run-wpf-xbap-application-in-full-trust-mode-post-2-certificate-extraction.aspx
http://scorbs.com/2007/01/10/xbap-trust-levels/
Or you can keep your application as a regular WPF .EXE and use ClickOnce to deploy it from a website but run it locally with full trust.
not straight forward way, you can find you answer Microsoft MSDN Forum

CoreClr hosting within different browsers

As I understand, When you run a silverlight application (atleast for case of IE), there is a mini-CLR that build within IE that run as part of the silverlight application.
What happen if I am using some other browser like FireFox, Chrome or Safari. Does these browsers also have CoreCLR embedded within? May be I am just no clear about the architecture as how CoreCLR engine is hosted within different browswers and any info/links will be helpful to understand it.
Silverlight is run in browsers using a browser plug-in, in much the same way as with Flash. To quote the Wikipedia page for Silverlight:
The run-time environment for Silverlight is available as a plug-in for most web browsers.
Once you've installed the plug-in, you can use Silverlight in IE, Firefox and Chrome. The Wikipedia page I linked to above suggests Safari might not support Silverlight, but I haven't tested that.

debug an xbap on firefox?

I am starting to write an xbap (wpf web app).
I create a new project and run it and Firefox fails (it just keeps trying to open it with "Windows Presentation Foundation Host).
I know that Firefox and Microsoft don't really see eye to eye, but surely there is a way to do this now days?
Saw this post that shows a hack of copying out a DLL from a Windows XP machine. But my users will not do that (I don't even want to do that!)
Does this mean I have to abandon Firefox as my default browser until I am done developing my xbap?
NOTE: I am using Windows 7 and Visual Studio 2010 Ultimate and Firefox 3.6.12
I don't know what exactly your problem is, but here is a Scott Hanselman blog post detailing a WPF application deployed as an XBAP (not XBAB) using VS 2008 with .NET 3.5. It doesn't say anything about WPF 4 (and the .NET 4 runtime, the post is from 2008) or what version of Firefox he was playing with but I hope this demonstrates it is possible and gives you a starting point for more detailed investigations.
Edit - Well, I should have dug a little deeper. It appears that Windows 7 won't support XBAPs in FireFox. There is a Firefox Add-on to Support XBAPs and Loose XAML that is installed with the .NET 3.5 runtime but it is not included in Windows 7 and this link suggests it can't be installed on Windows 7.
You could run IE Tab Plus (Firefox plug-in) and get it to default to IE when you open something from the localhost.

Is there any version problem in Silverlight 3 beta?

I have deployed website using silverlight 3.0.40307.0. It is working perfectly in Local IIS. But when client will installs the newer version of silverlight like 3.0.40626 or higher, It wan't be able to view website.
How to get silverlight 3.0.40307 (old version of 3.0 beta)?
What is the possible solution to deploy silverlight website on IIS?
What silverlight component should be installed on server to view silverlight application on browser?
Can we install silverlight TOOL without VS2008+SP1? if yes, then how?
You need to upgrade your version of Silverlight to the released version. You can't expect users to run beta software because you would be forcing them to use software that is known to contain defects.
You need to download the latest version of the SDK and templates from here.
Clients need only the Silverlight runtime plugin for their browser. There's no way you can enforce the client to install the SL 3 Beta version of the plugin you want; and even if you do, there's no (easy) way to prevent it from self-updating to the RTM version. Not only that, but asking clients to install a Beta version of a released product is a security threat for them.
There's no official way to get the SL 3 Beta runtime installer.
An SL app is a client-side code; on the server side you only need standard IIS that serves HTML with an tag and the .xap file for the SL application.
There are no SL components required to be installed on the server for the client to run the SL app.
You can't install the Silverlight Visual Studio Tools without VS2008 SP1 - as their name suggests, the tools are intended to integrate with VS. However, you can install the SL SDK and build SL applications without having VS2008 SP1. (Alternatively, you could use MonoDevelop/Mono/Moonlight to develop SL applications)
If you have deployed your silverlight app that is compiled with Silverlight version 3.0.4.0307.0(i.e. Silverlight Beta), your app may work perfectly for the users with Silverlight 3(RTM).
However, if those visitors come across your silverlight app who doesn't have Silverlight installed at all(or maybe lower than Silverlight 3 Beta), they will be prompted to download Silverlight to view your app.
Once they wish to download Silverlight runtime by clicking on the "Get Silverlight" button, visitors will be redirected to Silverlight download location, and the most important part is
**They will get a message explaining that this app is made with Beta version of the Silverlight.
So this may hamper thier experience and impression about your silverlight app and because of this very few people can get to your app correctly **
It is my suggestion that you try to compile your project with Silverlight 3 as early as possible .
Regarding 2nd question What is the possible solution to deploy silverlight website on IIS?
Here is the Answer : You'll need to register the MIME types for xap on your server.

How to debug Silverlight against Google Chrome

Does anyone know how to debug a Silverlight 2 app running in Google Chrome from Visual Studio? Even after making sure that Chrome is the debugging browser, breakpoints are still not being hit.
Have you tried attaching to Chrome manually? Tools > Attach to process?
Chrome isn't officially supported but there are hacks.
Here for example. Halo's comment may give you some help too.
You can have more than one browser running on your localhost.
1) Hit F5 to run debug. Probably opens IE or whatever your default is. F5 your way through the breakpoints until it's loaded. Leave this IE open.
2) Open your other browser, coping the localhost Url into the new browser and run it. New browser should hit the breakpoints.
This works with all browsers, and even emulators like BlackBerry emulators.
Attach to the process manually (Tools > Attach to process), but make sure to attach to the chrome process that lists its type as "Silverlight, ...". Its title should be blank.
If you see your application name in the title, it's because chrome has a separate process for the HTML form that your Silverlight app is in, and the html's title probably matches. Attaching to this process does not load the Silverlight assemblies.
I usually will start debugging the app in IE to make sure that the most recent changes are compiled and running, then launch chrome, clear its cache ('cause it likes to hang onto Silverlight data), paste in the url from IE, and then stop IE and attach to chrome. Extra steps, but worth not spending 3 hours to figure out you are looking at cached assemblies.
This is an issue with Visual Studio interacting with Chrome: http://code.google.com/p/chromium/issues/detail?id=45560. My guess is you need to wait for a Visual Studio patch, but I honestly wouldn't hold your breath. The majority of Silverlight developers just use IE or FF for debugging. (Apparently even FF has some issues now that they've sandboxed their plugins: http://timheuer.com/blog/archive/2010/08/16/enable-silverlight-debugging-in-firefox-visual-studio.aspx#20476). As much as I hate IE, it's really your best bet for debugging Silverlight apps.
Simply set SL app as startup prtoject instead of asp.net and press F5

Resources