I am having a WPF-MVVM desktop application. I want to play a media file in this application.
The media file is stored at some remote server (actually hosted on IIS). It requires credentials to access it. I am using MediaElement to play the audio file.
The problem is how to specify the credentials with mediaElement?
One workaround is using HttpWebRequest & download the file in some temp folder. Onces downloaded then I can play the local file. But I don't want to create any file locally. Is there any way I can specify the Stream as input to MediaElement.
Atul Sureka
It should be possible to use the syntax username:password#host for setting the source.
If not, please provide further information how you are trying to do it and what kind of error you get..
While reflecting my answer, I just found this LINK, saying that my answer might be deprecated.
If you are not successful, you might have a look at the link.
Related
I am trying to make a custom protocol to open my c# windows application through a web application following the first comment's steps here: How do I register a custom URL protocol in Windows?
After setting everything up, I got to the last part where I have to type the link. Internet Explorer knows that I have to open some sort of a file but it requires a different reader.
Here is the protocol I made.
And this is the path, I have copied it, so it should be correct!
This is the folder of the program that I want to open.
Here is what happens when I go to that website. As you can see, I need to allow the browser to open the app.
And here is the problem. Any solutions to that? Of course, I can open normally the .exe file without getting any errors.
I'm making an App where I need to create CSV files with data I need to load in a software in a Windows machine. I want to connect an Android Device via USB to a computer and get the file from there. Is there any way I can create a file that's visible for a computer?
From what I've found you can only create cache files and files only visible to the app (neither my PC or the File Manager on the phone can see them).
I thought about creating a service in the network and send the data to that and create the file in the server but that would add more failing points and of course is more work, besides sometimes the app could be running in parts where the Wifi doesn't get to it and would mean I would have to do a temporal file and somehow upload it when it connects back, so not practical at all.
Of course you can create files and folders on external storage of the android device, which is publicly accessible. Refer to this guide.
Note: You need to get permission WRITE_EXTERNAL_STORAGE to write and READ_EXTERNAL_STORAGE to read from device's external storage.
We are building an application that will only be used within our infrastructure. We have videos on a windows file share which we want to play within the app. The videos are working when they are embeded in the app but as some of them are so big we want to move them out.
I am trying to reference the videos using an smb:// url but that doesn't seem to work.
I am also trying to reference them using a file:// url to no avail. I can see the folder from the dev mac.
Should this work or do I need to do more work to make it happen? Such as streaming?
iOS is not able to access any kind of shared directory (smb:// or file://), you will have to add code to your app to connect and transfer the files yourself if you want to use a shared directory like that.
But iOS can access web servers, so if you can set up a simple http server (Apache or IIS), and serve the files using a http protocol, it should work just fine.
I just have a "short" Question. I did a lot of research the last few hours and found out, that a Wp7 application has access to his own directory and the IsolatedStorage. So if I want to work with a file in my application I either have to load it into the project using the Solutionexplorer in VS, or create a file manually by code, load it into the Isolated Storage and then read out of it.
So i come to the result that it isnt possible to load a specific file, which is in an unknown directory or folder and has an unknown name from my mobile Phone (or WP7 emulator) into the App directly, right? Because there is no browsing feature or something like e.g. in the ASP.NET Webform,the FileUploadControl.
Is my understanding correct or do I miss something?
you cannot access anything that is on the phone (except music and photo lib etc) other than whats included with the app and its isolated storage area.
you can't browse the local device like you can on windows. however you can download files from the net.
Background info:
I have a windows application (in c#) that handles a custom file type which is just a wrapper for .pdf and .doc files. The user has to download and install this program from the website in order to view and edit their custom file types and save them back to the server.
Question:
Is there any way to make sure when a file is downloaded the application starts and opens the file by altering the install files of the application? I have been looking through the MSDN documentation on file types and it is registered but I couldn't find a handler for On Download. Any guidance is useful, I'm new to stackoverflow and c#.
You will need to register a mime type on the computer during your install process. Then you will need to send the corresponding mime type with the download.
Here is some basic info.
http://msdn.microsoft.com/en-us/library/ms775148(v=vs.85).aspx