Question

I'm trying to find the best setup for my website on Windows Azure. I have a front-end and a back-end website made in ASP.NET MVC4.

Both websites must use a shared same images. Font-end for displaying, back-end for CRUD actions. The image files are stored in a folder in the front-end web application and the url's to those images are stored in a mysql database.

Currenty i have 2 Windows Azure websites, but i can't access the images from the back-end website because there are stored in a folder on the front-end application?

What's the best setup and cheapest for this type of application?

  • 2 websites with shared BLOB storage ?
  • A cloud service containing 2 webroles (front- and back-end) ?
  • ... ?

Thanks

Was it helpful?

Solution

First you should not use web application's folder beside temporary operations. Since Azure means multi-computer environment, resource (image) won't be available for requester if you use more than one instance (machine)

I would go on 2 blob container. (not 2 blob storage account)

We do not have IP based restriction on blobs yet so as long as you don't share those addresses you will be fine. If you really need to have restriction you can use Shared Access Policy which you can find more details on Use a Stored Access Policy also you should review this one too Restrict Access to Containers and Blobs

OTHER TIPS

I think that using a shared blob storage account is the right direction.

Using a local folder is not a good idea - on web sites and cloud services these are not persistent and you may lose your files. Either way - this is not a scalable solutions - if you'll add additional instances in the future you will not have access to the files.

Using blob storage will give you a location that is accessible from both locations and indeed from the client's browser directly.

You do not specify whether the images need to be accessed securely from the front end or not, if not that blob storage is particularly useful as they can be served from a public container on azure storage directly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top