Search code examples
azureazure-web-rolesazure-cloud-servicesvirtual-directoryazure-files

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.


Solution

  • 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