Azure web apps with user uploaded content - azure

I'm building an app involves user uploaded content (images, docs, pdfs) and would like to consider azure web apps for the hosting solution. Of particular interest is the deployment slot feature.
I understand that using the deployment slots prevents me from storing the user content in the filesystem.
I'm not excited about using blob storage for the user uploaded content because that really ties my app to Azure and would make it difficult to move to another host or implement a vendor redundant DR site. Database storage isn't all that exciting to me either.
Ideally the web app would have a virtual directory mapped to that blob storage but I understand that isn't a possibility.
Are there any good solutions to this issue?

You can add web apps to a virtual network that allow you to store content on file shares on other machines in the vnet. Doing so allows the webapp to communicate with other machines on the network where you can configure a file share.
You could point the website to the share via the web.config/application settings section of the portal to point deployment slots to different shares, etc.
Here's an official link: https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-create-vnet-arm-pportal/

Related

Azure - Web Role Virtual Directory to other Web Role

I currently have a few websites that are running in IIS and they all have a virtual directory to another website called "Resources". On the resources website I have images, css, and other static type content that I share across multiple sites.
I want to replicate this using web roles. Yes they all need to be in a separate web role because they belong to different clients. I would like to just create a separate website for resources and have virtual directory from each of the other sites. Please advise if this is possible or if I need to keep these sites on a VM.
Yes such a solution is possible. You can move your static resources css, images etc to azure blob storage and link it from there. Code change required. If you think you need a content delivery network CDN you can use azure CDN. See this blog post explaining it www.hanselman.com/blog/PennyPinchingVideoMovingMyWebsitesImagesToTheAzureCDNAndUsingACustomDomain.aspx
A slightly older stackoverflow question explains it too.
stackoverflow.com/questions/6968011/storing-css-files-on-windows-azure
You cannot attach a shared disk, since disk-attaches have exclusive leases.
The Azure File Storage service provides an SMB share (backed by Azure Storage). By attaching to the share at startup, you'd be able to take advantage of a shared folder. More info on Azure File Storage here.
You may also populate a shared-content directory on each web role instance, at startup, by downloading content from a common source (e.g. Azure blob).
Aside from those built-in mechanisms, there are any number of custom VM-based solutions.

Windows Azure - migration questions

After global overview about Windows Azure platform i still have some questions in my mind i would like you to kindly answer. Hope it will be also usefull for some people besides me.
One of my application uses sql server db for text data and second db which is just simply images db (folder structure own db) where
images are stored and by using ftp my aplication can download/upload
there. The question is: a) If i would go azure does "sql azure" is
place where can i place my sql server db? b) What about my folder
structure database - is there some place on azure storage i could put
my folders containing images and configure ftp to it? I heard about
BLOBS but can i ftp to it?
Is there possibility to place Windows forms application to Azure that it could work as remote application which specific users could
access instead of installing on every client machine?
Regarding Worker role - is there possibility to just simply move Windows service application to azure as worker role or there are some
things which has to be rebuilt to work in azure?
If i would go azure does "sql azure" is place where can i place my sql
server db.
You could definitely use SQL Azure to host your SQL database. Other alternative would be to use a SQL Server inside a Virtual Machine.
What about my folder structure database - is there some place on azure
storage i could put my folders containing images and configure ftp to
it? I heard about BLOBS but can i ftp to it?
Blobs is definitely the place to store files and folders though they don't support FTP. However there are many storage explorers available (both free and paid), using which you can upload files and folders from your local computer into Azure Blob Storage. Another alternative would be Azure File Storage.
Is there possibility to place Windows forms application to Azure that
it could work as remote application which specific users could access
instead of installing on every client machine?
Yes, it is possible. Please look into Azure Remote App Service.
Regarding Worker role - is there possibility to just simply move
Windows service application to azure as worker role or there are some
things which has to be rebuilt to work in azure?
You can't deploy a Windows Service application as is into a Worker role. You have to tweak your code a bit. Other alternatives that you may want to look into is hosting your Windows Service in a Virtual Machine (to the best of my knowledge, it should be without any code changes) or converting your Windows Service into a WebJob.
In addition to everything that Gaurav mentions and as he alludes to, you can also investigate Azure Files. You can mount file shares from any onprem application. Since Azure Files supports the SMB protocol, you can use standard file system API to interact with it.
https://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-files.

Is the file system shared across multiple Azure websites?

Quick question. I'm looking to deploy a website to Azure using websites.
I read a comment that stated that the file system is shared across multiple instances of the website?
Is this true?
Does this mean if I upload an image to the file system
on one instance, all requests on the second instance will have
access to the file?
Are the files synced across the instances or do
they all point to a single drive i.e. in the blob storage somewhere?
We will be deploying an Umbraco 7 site, so I still need to test for any issue this might have on the lucene indexing etc. Does anyone know of any complications with Umbraco 7 and this method of deployment?
Thanks in advance
Gordon
The answer from bedane is incorrect. This question is about Azure Web Sites (not about Azure Web Roles)
1) Yes it is true. Azure Web Sites stores your content using Azure Storage blobs that are mounted and presented to the web site as a common share that is read/writable.
2) By virtue of 1), when you upload the file you are uploading it to the common share and therefore all instances will see the upload immediately.
3) The instances all point to a single drive (just repeating point 1)
This architecture for Azure Web Sites was designed specifically to enable applications like Umbraco, Wordpress, etc. that install plugins and make changes directly to the site content directory. This design point fixes the problem that currently exists in Azure Web Roles.

How to host html application on Azure

I have a single page html application, that uses a lot of jQuery. The app content (data as xml and media audio/video/image) is (and has to be) provided by blobs on azure account. I don't need any application server.
What is the recommended way to host such single page html application on Windows Azure Environment (Azure is a requirement).
As I do not need any application server, all application files are currently uploaded into single container as Blobs with appropriate content types. It all works very good.
Still, I've seen that Azure has some website hosting capabilities I've been wondering if what I did is appropriate?
Thanks
Windows Azure Web Sites would work well and could be free for the duration. If the constraints of the free offering don't work for you, you can scale out easily.
You could also store your home page in Azure blob storage, but that means users would have to have the full path to it as there's no server configuration to specify a default page. Publicizing your site endpoint via a vanity URL from bit.ly or the like could make that a non-issue though.
Do note though, that by having everything in blob storage, you're incurring a transaction cost for every image, every page, every script access (that's not cached on the browser that is). Depending on the nature of your site and traffic, it could be more cost-effective to leverage something like Windows Azure Web Site for some of this.

Tinymce ImageManager Wired Up To Windows Azure Blob Storage

I'm considering moving from a dedicated server hosting environment to Azure. I'm using the ASP.NET Membership provider and every member has their own folder that houses their images (avatar, etc.). I have the Tinymce ImageManager wired up so that a logged-in user will only see their folder when selecting/uploading an image.
Is there a way to wire up the Tinymce ImageManager to Azure's blob storage in a similar way?
This thread on their site indicates that this is not yet supported:
http://www.tinymce.com/forum/viewtopic.php?id=24776
The only way I see this accomplished is for you to rewrite parts of the Image Manager that perform I/O operations on the HDD. Which is no a rocket-science to implement.
Another way to move to Azure is to move your site for Windows Azure WebSites.

Resources