I'm tasked with a need to migrate an application I previously created as a Windows service in .NET to an application which can be added to the windows store. (Which I understand must use the UWP format, but please correct me if that's wrong.)
My service collected data about CPU, Memory, Network data and uptime and then could ship it off via a call to my external RESTful API.
Moving to the UWP format, all of my previous code becomes invalid. (I don't have access to System.Diagnostics.Performance counter, for instance.)
I've been looking at all options, including using C++ to get at Native Calls, but that doesn't seem to help.
It dawned on me that the performance tab in task manager is gathering exactly the data I need. So my root question is, how can I get at this type of data using an application which can be built for the windows store?
Sample of the Performance Tab in W10 Task Manager
TIA,
Jeremy
I think that you can not collect the diagnostics you need with uwp apis
Related
I am looking a viable approach to record the usage / performance of various parts of a C# desktop application. I see strong parallels with the web focused Real User Monitoring technique and have access to Datadog to process my data.
Is RUM outside the web a viable approach? I believe I will have to implement the equivalent of the JS Datadog SDK if I want to go down this road, is there a way to do this out of the box?
I want to be able to track user usage for certain function calls and capturing exceptions seem sensible.
There are some event model disconnects between the desktop and web but RUM can be used with Android and iPhone apps as well. I implemented this using the json-schema files in the Android SDK and a bit of trial and error on how I wanted to map function calls into the RUM event model.
I thought up an idea for a website that would involve some video editing happening on the web server. Microsoft UWP has a library that does the video editing functions I'm looking to perform... Amazing!!
My problem is I don't know if it's possible to get my website to run UWP code on Azure. Web Jobs seem like what I'd prefer to use to kick off this code, but web jobs don't appear to be able to run UWP code and without UWP code I don't see a library that can perform the video editing I'd like to do. Does anybody know if it's possible to run UWP code on Azure? If so, how?
I don't think WebJobs are especially suited for this scenario. They are part of the WebApp platform as a service offering that abstracts the underlying operating system for you to be able to focus on building the code itself and deploy as easily as possible.
UWP on the other hand is a Windows-specific app platform which has many requirements including running on Windows 10. Because you don't know which concrete operating system the web app will run on, it is not easy to say if the APIs would work.
That said, you could theoretically use UWP APIs in a web app as well, because there is a UwpDesktop NuGet package that allows it mainly targeted for desktop apps. It is a long shot but you can certainly try it.
As a preferable solution, I would still look to find another library that suits your needs, as the choice on NuGet is pretty broad and one of those should be sufficient.
I would suggest taking a look at azure functions
These have about the same working as webjobs, however expand beyond the limitations of webjobs. These are also more versatile in what they can do and how they can be created.
webjobs vs functions
Does anybody of you guys have experiences with including a C#-based Console Application in a C#-based Universal Windows App?
The reason why I'm asking: I've an already exsisting Console Application developed by another developer. This Application includes a database with all the queries which I need for my App.
The problem: When I try to include the CA in my UWA project many commands like
private global::System.Runtime.InteropServices.HandleRef
throw new global::System.ApplicationException
don't get identified by VS2015.
Is there a way to let the UWA project identify CA commands? For example with adding an external CA-library or something like that.
Thank you!
You can't combine full .NET (console, winforms, WPF) assemblies with an UWP app, as they're different .NET frameworks. For more details, please read this reply. Part of the code is shareable in a Portable Class Library (PCL), but most likely not all of the code you've written.
Possible solutions:
Create an API (yourself or with the other developer) to expose the functionality needed over a (preferably) REST api.
Find a way to cheat the system. Example: launch a file (associated to the console application) with the Launcher api and output the results to a text file on disk, which you then read from your UWP app.
The first one is guaranteed to work. You might find a way to cheat the system for the second 'solution', but there's no guarantee that it won't break in the future when Windows 10 gets updated (experienced that myself for another 'hack' on the upgrade between Windows 8 and 8.1).
I have created a windows form application that is a face recogniser using EMGU CV. I also have a website which is locally hosted on my laptop, made using ASP.NET MVC4. I want a link on my website which ,upon clicking, opens the facial recognition software. Is it possible to do it? Do I have to create a setup of application and install it to do this or is there any other way?
The effort involved to do what you are asking for is almost certainly much higher than you are willing to take on. I'm only aware of two possible approaches. The first is to use the Microsoft Click-Once technology, which streams binaries through to the client. However, the binaries arrive at the client very untrusted, so you need to do quite a bit of work on the client to set up the appropriate permissions. The other approach is to associate your image recognition form with one of the safe MIME types, and then stream out a file of that MIME type. If your application is the default application for that type, it will be called to handle that file.
I'm looking for a suitable client side architecture that will meet some or all of the following requirements.
I'm thinking primarily about Silverlight (but I would also consider MVC or WPF depending on your suggestions - I can possibly trade some of these requirements off, or find work arounds).
I'm looking for an assessment of Silverlight being able to fully, partially or not able to support, each of the following, with detail around each if possible:
Must be able to reliably upload large (~100MB) binary files via WCF and MTOM
Must be able to support file downloads, preferably in the background (i.e. through 'synching'), though this could simply be supported through a manual URL if necessary
Should have access to some form of local storage - this could be binary or XML for config purposes, but ideally some kind of database (not fussed which, as long as it is part of the install/app)
Should be able to dynamically configure itself depending on user profile. In other words, where a user logs in, the UI and services available are dynamically determined.
Should support some form of client notification (sound and or tray bubble). Ideally this would be supported via WCF duplex, but could be accomplished through polling.
Ideally, should run on multiple platforms (Win / OSX)
Should be easily deployable - if I need to run Silverlight in full-trust mode / OOB - how do users get new versions?
Should be minimisable to the system tray
Any detail or thoughts you can give me on the above would be much appreciated.
Edit - additional questions
Are there any limitations on local storage/access in Silverlight 5 OOB? Or does it behave like a standard WinForms app?
Is it possible to bundle SQL express with a Silverlight OOB .msi?
What is the best option for dynamically configuring a Silverlight app? I've seen MEF mentioned - is this the preferred approach or are there others?
Must be able to reliably upload large (~100MB) binary files via WCF
and MTOM
Should work.
Must be able to support file downloads, preferably in the background
(i.e. through 'synching'), though this could simply be supported
through a manual URL if necessary
Unless you are running OOB with elevated trust (or SL5 in browser elevated) and thus have limited access to the local file system, you would need to ensure sufficient space in Isolated Storage for the downloads.
Should have access to some form of local storage - this could be
binary or XML for config purposes, but ideally some kind of database
(not fussed which, as long as it is part of the install/app)
See above. Regarding local database support there is an SQLite port for Windows Phone 7 which also works in Silverlight (I've recently tested it).
Should support some form of client notification (sound and or tray
bubble). Ideally this would be supported via WCF duplex, but could be
accomplished through polling.
The notification can be done through Silverlight's Notification Window (supported from SL4 and up). The actual server side notification could be done through duplex channels or Kaazing WebSockets Gateway etc.
Should be easily deployable - if I need to run Silverlight in
full-trust mode / OOB - how do users get new versions?
You can install an OOB Client along with the runtime with an MSI installer and still have the Silverlight standard update mechanism work for you (required Authenticode signed XAP). I've done just that a couple weeks ago.
Should be minimisable to the system tray
AFAIK not possible in SL4. Not sure about SL5.
All the points I have not quoted should work.
Having done some Silverlight development I often feel a bit restricted by the possibilities it offers. In my opinion it is meant to be run within a browser, with a web-like interface. From what you describes it is more of a full app you want so I would recommend WPF and click-once deploy that handles updates automatically.
From your requirements I would suggest WPF, full application support, but when it comes to OS X support, then you have a problem, WPF won't work on OS X, only Silverlight will, so I am afraid you have a few requirements that have conflicts with one another.