Can silverlight queue a list of files and post, when connection available, to a web service / url? - silverlight

I need to provide a way of users uploading multiple files (can be 10MB each) over Mac, PC and a mobile device (something with an SD slot).
The connection from the mobile device can be poor so I need to enable queuing of the files so they can be delivered when connection becomes available.
I am looking at Silverlight as a potential option using something like this example uses and sending over the files when a connection is available.
http://www.microsoft.com/silverlight/out-of-browser/demo/
I have tried searching for silverlight articles but not found anything appropriate. What I am trying to avoid is writing multiple versions of the software for Mac+PC (browser) and mobile device.
Can silverlight provide this kind of functionality or is something I would have to approach differently?

Silverlight can be used to do that.
You don't need to use the out-of-browser functionality, silverlight gives you low-level control over sockets and threads.
For devices it's a different scenario, as AnthonyWJones points out.
There is a silverlight version for the nokia, but I've know idea if it is actively developed. The is also a c++ version for linux/meego, there is a mono version.
But all those are different versions.

Related

Azure Kinect: how to find the windows device id

I have been developing a Win application that uses 3 Azure Kinects. Since there is no C# wrapper available yet, I made a C++ app that does what I need and the C# app just grabs its output files.
I now need to figure out which camera is which. In the C# app I can get the windows device id in a form similar to
\\.\USB#VID_045E&PID_097C#001007692912#{A5DCBF10-6530-11D2-901F-00C04FB951ED}
However the C API for the Kinect only provides ways to get the serial number of the device.
I tried to dig into the API, since I'm sure it must be somewhere in the code but, due to my limited C skills, I got lost pretty quickly.
Anybody with the same issue or can help?
Thanks,
Guido
The SDK is designed to use serial number specifically to determine which device or devices you are connected to. If you are just trying to use 2 Kinects with 2 instances of your C# then you will need to open devices until you find the serial number you are looking for. If you are trying to use multiple devices in a master/subordinate configuration then you can query for jack state to determine if you have connected to one or the other.
Also please be aware that we just released our own C# wrapper for the SDK. Checkout https://github.com/microsoft/Azure-Kinect-Sensor-SDK/issues/608 and https://microsoft.github.io/Azure-Kinect-Sensor-SDK/master/namespace_microsoft_1_1_azure_1_1_kinect_1_1_sensor.html for more details.

Proprietary USB device access via browser... possible? Silverlight maybe? (Java is excluded for now)

Probably there are a lot of similar questions around, but since I know only few solutions to this which I am not sure will work for us, I am looking for something else, maybe new technologies...
What we have is this USB device which is not so fancy (of course, it requires a driver to be loaded), and it has couple of C++ dlls to help getting certain output from it. On top, we made a C# desktop application which makes use of the device in a more attractive way (plenty of interop inside).
So far so good, but to have the application lifted up to the web in order to gain more flexibility... What options are there?
Known solutions are:
1) ActiveX - kinda old technology and not cross-browser;
2) .Net 'applet' - not so common (is this even a solution?)
3) Java applet - well known, but JVM needed (since we went for C++ C#
maybe is out of scope);
4) Web service on the usb device itself - our device is very
light, we cannot have it there.
Are there other ways? Is Silverlight 4, 5 (maybe "out of browser") a feasable solution? What about these new technologies nowadays? Html 5 or something?
EDIT1: In particular I am interested in Silverlight. Is there a way using Silverlight?
EDIT2: I found this question: Can Silverlight access a .Net library that accesses a USB port? . What shall I understand from that? Is really Silverlight not a feasable solution for my scenario?
EDIT 3: VERY IMPORTANT!
These devices need to be used on customer side! People browsing must use them locally on their PCs!
Thanks in advance.
to have the application lifted up to the web [...]
Simple solution: Let the webserver (http server) run on the PC connected to the USB device, and use one of the webserver's interfaces like CGI to talk to your USB device. This way you need to code only a USB-to-CGI wrapper program, which can be C++ or C#.
Another way is to write a browser plugin.
The issue that you're going to face is that content in a browser is often run in a sandbox, in such a way that the web app does not have access to the computer. There are good reasons for this - security, primarily. One way to have some code running in the context of the computer is to have a browser plugin that can access the computer's hardware resources, but that can interact with browser content. Unfortunately, you may end up writing a different plugin for different browsers.
There do exist frameworks out there that make writing browser plugins more manageable. A simple search should turn up some of those candidates.
You can use Silverlight 5, it can give you access to your file system and USB storage device. If you want to get control for other USB device (printer, scanner, etc), you should give a device type. I know, Silverlight 5 works fine with a file system and web-cams...)

Out of browser feature of Silverlight 3.0

Why and when somebody would take out the Silverlight application out of browser and run? As this is feature provided in Silverlight 3.
When the application is useful enough that you want to use it often and you don't want to depend on a browser or an internet connection, for example.
In Silverlight 4, out of browser applications will make even more sense since they can run with elevated permissions and do things such as accessing the local filesystem or running applications on the client machine: http://silverlight.net/getstarted/silverlight-4-beta/#whatsnew (search For Trusted applications)

Stream Audio from Linux Server with Silverlight

I have a large catalog of audio on a Linux (CentOS 5) server that I would like to expose to an existing .NET web site. Is there any way to stream the media from the Linux server through my web site using Silverlight? If so, how would a person go about setting it up?
Thanks in advance!
If you don't care about adaptive streaming, this is really easy - just share the audio out over HTTP, then add a MediaElement (or something like http://smf.codeplex.com if you want it to be fancy, see my caveat at http://blog.paulbetts.org/index.php/2009/11/22/patching-silverlight-media-framework-to-work-with-mp4wmv-files/) and point it towards your Linux server running Lighttpd or Apache.
The critical bit though, is that Silverlight will only be allowed to access the hosting site by default, so you'll need to create a clientaccesspolicy.xml file ( http://www.silverlighthack.com/post/2008/11/08/Silverlight-clientaccesspolicyxml-files-for-the-Enterprise-(Part-1-of-2).aspx ) to allow SL access to your Linux server

Database query representation impersonating file on Windows share?

Is there any way to have something that looks just like a file on a Windows file share, but is really a resource served up over HTTP?
For context, I'm working with an old app that can only deal with files on a Windows file share, I want to create a simple HTTP-based service to serve the content of the files dynamically to pick up real time changes to the underlying data on request.
WebDAV (basically) takes an existing directory, and shares it over HTTP - which sounds like the opposite of what you want.
You need something that speaks SMB/CIFS on one end, and your own code on the other. The easiest way to do that is with a userspace file system.
To that end, here's a couple of links:
WinFUSE, which is kind of a barebones CIFS/SMB server that can host your own filesystem. I've done a couple of small samples with it - and the docs are terrible, but it more or less worked.
Dokan, a userspace file driver with .NET bindings. I haven't used this one, but it looks promising. It has both .NET and Ruby bindings, so you should be able to get a POC up pretty quickly.
Callback File System - yet another userspace file system. Again, I have no experience with this one.
A Linux box with SAMBA and FUSE that shares the drive out to the Windows box.
This won't answer your question in any meaningful way, but maybe it will get you pointed in the right direction. Look into serving the "file(s)" via WebDAV--SharePoint uses this and its files can be accessed exactly as you want, as a file share where the transport mechanism is HTTP. Unfortunately I can't give any more detailed info, as I've only worked on the client end of WebDAV and not the server side of things.
I think serving up files from WebDAV might be what you're looking for.

Resources