Uploading large file from web and getting it in wpf - asp.net

I have a web interface where the user can upload images and videos. These files are saved directly on the web server. I also have a WPF client (whiteboard-like) that need to download these images and display them. The only contact this WPF client has to the web server is through an webservice (currently WCF). How do i access the images uploaded into another web site (the scf serfvice, .svc is hosted seperately)? Is there a better approach? E.g. Saving the images to a path outside the IIS and then letting the webservice etc. get them from there?

Related

Is it a web service or REST API or a normal website

I'm supporting an existing product. It was developed with ASP.NET. The entire product has two parts
Main Website - The main website where the user perform activities
Subscriber module - It is a separate website. Another windows application can post XML to the website and this website will save the data to the database. So it purpose is to transfer data between windows application and the main website. This website has one URL exposed to post the data. This one has only one ashx file and the functionalities are implemented using HTTP modules of ASP>NET
My question is subscriber module doesn't have any asmx file or WCF implementation. However any one who has the URL can post XML to this website. So is it correct to call it as web service or API(not technically but semantically)? Or is it a simple website with some special functionality?
An ASHX file is a webpage that is part of an ASP.NET web server application.
Ashx files are used for handling Http Requests and modifying Http Responses;
It contains references to other pages hosted on the web server that are sent to the user's web browser. ASHX files are processed by the server's ASP.NET HTTP Handler when a client web browser requests the page.
Main Website - Its a Web Application
Windows Application - Posting data to server
A web service is any piece of software that makes itself available over the internet and uses a standardized XML messaging system. The function of your subscriber module implements is to post XML to website, it is in line with the characteristics of web service applications.

What role does a web sever play in hosting of single page applications

As per my understanding, when user visits a url of a SPA application, the whole application is downloaded including any static html,assets and javascript. Can someone please clarify what role does the host web server play from there on? If after download of all the assets, I turn off the web server the application does not work. But ideally, it should work because now all the code to create any views is with the client already in form of javascript files. Let's assume there are no API calls for data.
Yeah it will work
If the application is fully loaded in browser it will work even after you turned off or disconnect the web server
Web Server No Need after the client has downloaded all the assets

How to upload images from asp.net application to image server?

I have two servers.One for web app and another for images storage .I have no idea how to upload images from web app to image server.
webservice or ftp or others?
if you have sql server instance running on [Image Server], can't you use database running beneath it ? You'll need Public IP Address in order to access Server. Make sure you can connect to this DB from any other sql server management studio.
But for security reasons, i recommend to build web service/api & configure it on Image Server, which serves all requests made from your webapp.

Can I upload a video straight from the user PC to azure?

I have an asp.net form where I ask the user for the location of a video file on his PC. He then clicks the submit button, and at that point I want to upload his video to my Azure storage directly, without first uploading it to my server. (My server is a shared server, and would not allow file uploads in any case).
Is there a way to do this?
Yes, you can do this with the new support for CORS combined with SAS (for security). Guarav wrote a detailed post on his blog: Uploading Large Files in Windows Azure Blob Storage Using Shared
Access Signature, HTML, and JavaScript

Remove temporary files web application

I'm developing a Web application, and there is a page when user must submit files which are saved into temporary folder on the server. If everything goes well, I send ajax request to the server to remove users uploaded file. But, if user closes the browser or shutdown the computer, I can't detect that.
In this case, what is the best way to gurantee that unused files are not stored forever? The site is developed in ASP.NET MVC and will be hosted on II7. Does IIS7 provides some configuration to deal with temporary files? Or I need to implement some service, which will be executed in a background with low priority and periodically check if there are "old" files to be removed?
Any help is very much appreciated.
I would have a windows service in the background to delete old files at some interval.

Resources