Recommendation for distributing an application which contains a UWP app and a WCF service - wcf

Our application does the following operations. When a user registers on a portal, the application does the following
Installs certificates to Local Machine store. Installation of the certificates is done by a Windows Communication Service (WCF)
Creates a VPN profile (using Windows.Networking.Vpn APIs)
We need to ship this app to end user which consists of an UWP App, and a Windows Communication Service. We would like the user to install this app with as few clicks as possible and the result should be that user should have UWP app installed as well as the WCF Service installed and running on his/her system. We are looking for guidance relating to the best option to distribute this app to end-users? We are open to distributing this app through Windows store or by sideloading.
Please provide your guidance after taking into consideration all the below scenarios
Update/Upgrade of UWP-Application or WCF-Service.
Uninstall scenario.
How can we distribute this application for Windows 7. (Note: We use XAML Islands to make UWP App running inside WPF)
Thank you
Sujay

Related

Bundle WCF service along with Universal Windows App

I realize that we cannot directly access SQL Server database from a UWP app, and have to use a WCF service as a mediator for this. (Which is totally stupid, since even competitors like MySQL provides API for Microsoft's runtime, while Microsoft's own RDBMS does not!)
I don't have any experience with WCF, but after going through some tutorials, I believe I can make a WCF service to communicate with my SQL Server (although I do not like making my simple application use a 3-tier architecture, which shouldn't be imposed on me). Anyways, I do not want to host this WCF service on my website, since I'm making this only for this UWP app. Is there a way I can bundle/pack this WCF service along with UWP app itself, such that service runs on client machine only when thhe start my app, and stops later when app is closed/suspended/minized.
The UWP app I'm developing, also have a WPF version and a web version (in ASP.NET), all of which were connected to MySQL database till now, and it worked flawless. Recently I decided to shift to SQL Server since I'm using Microsoft technologies for all my softwares and thought SQL Server will have better integration and support. But now I find it rather opposite, and thinking to switch back to MySQL database.
You can not bundle a WCF service (or REST api) with your Universal Windows app. UWP apps run in a sandbox environment on a different .NET runtime than your WCF service. You could run the WCF service in IIS, or even better create a self-hosted ASP.NET WebAPI project (so no need for IIS) to access your database. But this service will have to be installed separately from the app.
Note that because UWP apps run in a sandbox, some in-app databases like SQLite are inside this sandbox and can not be accessed by your other apps (WPF, website) by default (there are some hacks to bypass this).
So I think your best bet is to stick with MySQL and use the MySQL connector.

Windows Store Application unable to access localhost WCF service and throws EndpoingNotFoundException

I have a solution which basically contains three components:
• WCF Service that is hosted locally having a back-end SQL Server Express DB and this WCF service is hosted from a Windows Service
• A console application
• A Windows Store Application
This is what they are meant to do:
• WCF service his hosted locally and is used by the console app and the store app for communicating with the database
• The console app adds an image for processing to the database by contacting the WCF service
• The store app will at regular time look for unprocessed images in database via the WCF service and will process them
Now, the difficulty is:
• The WCF service is hosted successfully and is working absolutely fine and I can check that by hitting its URL http://localhost:8081/XYZ
• The console app is also able to submit images to the WCF service and add their local paths to the database
• The store app however always throws the EndpointNotFoundException when accessing the service at that same localhost path
What have I tried:
• I have tried almost everything from searching through stackoverflow to googling and haven't found a solution yet
• I was thinking that it might be a port issue and so I turned off the firewall to check this, but it did not work, and the store app kept throwing the EndpointNotFoundException
What have worked:
• The complete set-up has, however, worked perfectly on my machine. It is strange that its not working on my client's Windows 8 machine.
Point to be noted:
• The complete solution has been developed in Visual Studio 2013 and the App is for Windows 8.1
• I am not sure, but it seems my client has a Windows 8 machine and we are installing the app on that. (Possibly, that might be a problem. But I'll check)
If there is any help someone could provide me, I'll be really greatful. Thanks in advance!
This is expected. Windows Store apps cannot connect back to the local system in production. This loopback prohibition is disabled for debugging.
See How to enable loopback and troubleshoot network isolation
If your app is to be side-loaded rather than deployed through the store then see Using network loopback in side-loaded Windows Store apps

Win8 Store App - Automating Sideloading Deployment

I am in a development team which have just about finished developing a system for a client which involves a MVC4 Web, a WCF service platform and a Windows Store App which communicates with the web that the service.
We are running Continuous Integration practices for the Web & Service solutions which include automated deployment to dev, test, acctest and production environments. Building, testing, configuring and deploying to production is one click and five minutes away.
The one huge pitfall that we've had in this project was the fact that we chose to develop the app as a Windows Store App without investigating deployment possibilities which do not involve publishing the application to Windows Store. This is a process called sideloading, and i will not go deep into the technical requirements which Microsoft impends to enable this.
Our client will be using the application on 20~ Surface Pro tablets, and we are investigating into an automated release/deploy process for the application. As of this moment, we are using OneDrive to manage build artifacts and let the customer IT admin download the artifact from there to manually install the app on all clients. In the future, however, it is very possible that the organization who ordered the system will deploy this worldwide and there will be a requirement to deploy the application to hundreds, if not thousands of clients.
We spent entire weeks investigating whether Windows Intune can be a good platform for automated deployment of the application. If an organization installs the Intune platform, it's clients get the Company Portal which is like a private Store, where we could upload the app and updates to it in the future. There was, however, one big minus with the Company Portal - it has NO update management for Store Apps. That is, releasing a new version of our application to the Company Portal does not work like releasing a patch or update of your app to the Windows Store - there's no notification that there is a new version, and the application does not update itself. It's basically a new application that needs to be downloaded and installed after the previous version has been uninstalled.
Has anyone developed Windows Store Line-Of-Business applications which you had to sideload to multiple clients, and if so - which solution did you choose for update/patch management?
I am experiencing the exact same problem. Intune is indeed limited and too complex for many scenarios at the same time. Another option to "deploy" LOB Windows Store apps is described here: http://msdn.microsoft.com/en-us/library/windows/apps/jj657971.aspx. This covers the well known powershell deployment which is not very practical.
However, I have found an early stage, unofficial POC project on codeplex which I am currently investigating. You might want to take look at this: https://bootybay.codeplex.com/

web application with local webserver on client machine

I have simple web application built on html5 and RoR. It is simple application where user records his voice(html5 web audio) and then it is saved locally. Application won't be hosted on server instead it would be hosted on individual user machine. I need to develop some portable package like exe which will be run on Windows and Mac.
Is this possible? If yes, then what are the ways to achieve it?
You might find some useful info here
Here are some more recent tools

establish communication between metro and desktop

I'm trying to make my store app communication with desktop app through websockets.
I know we can make metro app as a client and do WinRT way of communicating over.
For the desktop server part, i'm planning to write a dll that will contain server code and receive metro texts being sent over.
Can someone please tell if this is possible and how to write server code in a dll and if so should we be using winhttp for wbesockets in server side ?
Windows Store (WInRT) apps are executing in a sandbox which isolates them from network communication with other applications on the local machine (localhost). That being said, this protection can be disabled using CheckNetIsolation.exe. Visual Studio automatically does the same for debugging purposes, allowing you to call e.g. a web service on your local machine during development.
As for the desktop side; to communicate with web sockets client, you can make advantage of WinHTTP. There's a working example on MSDN.
Keep in mind, though, that any application communicating with localhost will not be certified for Windows Store and will require several additional steps to install it:
The Windows Store application package will need to be sideloaded since it won't be published in Windows Store.
Any desktop component it communicates with will need to be installed separately the same way as any other desktop application.
Using CheckNetIsolation.exe loopback exemption will need to be added for the Windows Store app.
If you can avoid it, I definitely suggest you don't try communicating directly with a desktop application from you Windows Store app.