-1

I'm very new to Windows server-side development.

I just registered a Microsoft Azure free Trial account.

I would like to do a very basic exercice:

  1. I want to create a very basic windows application (eg, in C#) such that it takes a file as input and returns its size (in the first place, it is not necessary to store the file on the server, but that may be useful in the future).

  2. Then, I want to connect this application to my existing website, hosted by DigitalOcean & Nginx &Ubuntu to realize a SaaS service, such that users could upload a file to the application hosted by the Windows server, and see the file size shown on the website.

Could anyone tell me which are the steps to follow to create this mechanism?

Edit 1:

1) Why Windows server? Because i am going to install other windows applications over there, eg, Microsoft Excel, though it is not recommended.

SoftTimur
  • 5,630
  • 38
  • 140
  • 292
  • Your Windows app will be just to store files? – Thiago Custodio Sep 06 '16 at 20:46
  • I just want to do a very very basic exercice... in the first place, it is not even necessary to store files... But I want it to be a windows app hosted by a windows server... – SoftTimur Sep 06 '16 at 20:48
  • this is my question. Because if it's just to store files, there'es no need to setup a virtual machine to host your app. – Thiago Custodio Sep 06 '16 at 20:49
  • Let's say, I need a virtual machine... and I will need to store files in the future... – SoftTimur Sep 06 '16 at 20:50
  • could you describe your real scenario? Enable access to a windows server app is not the right way to solve that. – Thiago Custodio Sep 06 '16 at 20:56
  • I just amended the OP... – SoftTimur Sep 06 '16 at 21:00
  • @SoftTimur Not sure, why you need a windows application to upload a file - is the purpose of this application just to upload the file? If you are planning to create a windows application ( I assume it is desktop) how could you possibly connect to a website that is on another server. Need clear info on what is the workflow here? Users upload a file through your website and you would want to store that file in windows server - and possibly retrieve it to display the same - is that what you would like to do? Also may I ask is windows server the only choice and no other resource on azure? – Jaya Sep 06 '16 at 21:41
  • I just amended the OP by adding one element... the workflow is still not clear? – SoftTimur Sep 06 '16 at 22:03

1 Answers1

0

Here's how I would solve your need:

-Create a Storage Account on Azure to host your files. Why?

  • It's the right way to store objects on Azure;
  • It's replicated (inside Azure datacenter / or in the same region / or georeplicated)
  • You can configure access to blob / container level.

Azure Storage also provides a rest api, which allow your DigitalOcean web app to access them directly.

Why not create a virtual machine and allow the webapp to connect on it?

Unless you setup a ftp server on it and allow your webapp to send files to it, code a windows app to handle this would add complexity to your scenario, because you'll need to open ports on the firewall, use sockets or something like this to allow your webapp to connect directly to it.

The easy way using Azure storage:

https://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-blobs/

Rest api doc: https://msdn.microsoft.com/library/azure/dd179355

With that, you could enable your DigitalOcean webapp to send/consume files directly using .NET SDK or REST API (it's up to you).

Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90