1

I got into a situaltion where I have three VMs in azure which are part of same workgroup. I got a requirement whrere I need to copy files in a shared folder in one of the VMs and from the other two VMs via an ASP.NET application. These two VMs are webservers and accessed via load balancer. The problem here is that they are not in a domain.

I referred How to set shared files permission across a network? and accordingly created user on all three servers with same credentials and impersonated the asp.net application with same user but that is not behaving as expected in all scenarios. Although it does work in some situation for small files.

Fundamentally I find the provided solution is wrong because if we create local users with same credentials on multiple machines (even in a workgroup) then also that user should not be able to access the folder on different machine.

Please help in following two points

1- I have a local user with same credential on all three VMs which I used to login. I gave the full rights to the user on shared folder. I am able to browse the folder and do all operations(Create\Edit\Delete) from any of the VMs. So I think it should work as discussed above. Suggestion please.

2- Any other approach for to handle this scenario.

  • Can you please tell me whether my understanding is correct or not.? You've 3 vms, not in a domain and 1 unique user in each vm with same creds. You want to copy the files from one vm to another 2 using a centralised .net application. Am I right? – serverstackqns Mar 31 '15 at 05:34
  • almost correct. 2 VMs are working as webserver and behind a loadbalancer. User uploads a file via sp.net application so reuest can go to any of the webserver and from there I am trying to copy at 3rd VM with shared folder – user3350203 Mar 31 '15 at 06:48
  • I dont think you can handle such scenario without a domain user, since computer A dont know the users of computer B and so can't process any request. – serverstackqns Mar 31 '15 at 07:17
  • I also think so but as I shared in the link, I followed and it works in some scenarios of few users – user3350203 Mar 31 '15 at 07:20
  • what are such scenarios?? What way it works? what way it doesnt?? – serverstackqns Mar 31 '15 at 07:42
  • thats not easily predictable but what I found that if a file size is very less say around 1mb then sometime it works – user3350203 Mar 31 '15 at 10:01
  • "then sometime it works", it's strange!!! Should either work continously or not at all... Sorry, no other option pops up in my head for now.. – serverstackqns Mar 31 '15 at 10:16

1 Answers1

0

My recommendation is NOT to create a shared folder inside a VM, it will cause you headache in the long run, from your description also, it seems that you might even get the ability to get rid of a VM since you sound like you're only using it to host the shared folder.

Azure got you covered on this area with a service called "Azure File storage", it is basically shared folders created on top the Azure Storage, that will allow shared access to its content. you may use it just like any other shared folder on a network.

  • Authentication in this case is done using encrypted keys, so you don't have to create local users in order to connect the VMs.
  • Since the Azure File Storage is hosted on top of an Azure Storage, you actually get the SLA of the storage it self, unlike hosting the files in the VM.

You may read all about it here along with step by step documentation on how to create and configure the service: http://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-files/

Noor Khaldi
  • 3,869
  • 3
  • 19
  • 28
  • I agree with your recommendation. But getting azure file storage would take long and approvals. Also this would be kind of transient storage. File will get removed after certain time. Also there is no plan for getting rid of the VM as we are using that for some other application – user3350203 Mar 31 '15 at 07:21