0
votes

I have been trying to get Umbraco working in a web role environment (web services) in Azure, but the site errors when you try and access it, saying that config/trees.config is not accessible.

These are the steps i carried out:

  1. Create a new empty MVC4 project in Visual Studio 2013
  2. Install Umbraco v7.1.8 from nuget
  3. Run up and configure using a new azure SQL database.
  4. Added in the umbraco folders to the solution.
  5. Added an azure web services project to the solution.
  6. Added the existing MVC umbraco project to the azure role profiles.
  7. Published to Azure staging area.

The site starts up with the usual 'Looks like there is still work to do' screen in the full Azure emulator in visual studio with multiple role instances. However fails to run up when hosted in Azure.

I am currently assuming that the issue is that the site root does not have write access when hosted in Azure, so the IIS worker process cannot write to the trees.config file.

I found an article where you can add a 'startup.bat' file, with the following:

echo "starting startup task" >> log.txt
%windir%\system32\Icacls.exe .. \* /T /grant "Network Service":(F) > log.txt

But this stops the role instances for starting up at all in both the emulator and when hosting in azure.

Any suggestions would be gratefully appreciated

1

1 Answers

0
votes

I would suggest using a VM instead of a web role for hosting Umbraco in Azure, particularly since Umbraco is needing local write access to persist.

Web roles expect your application to be stateless, meaning no writing or persisting anything to the actual file system. This guarantee allows Azure to make certain assumptions so that it can load balance and scale the application correctly (it basically saves a master copy and then re-deploys it fresh as it scales up or makes updates, etc. This works great for web apps that were created with this in mind, but if not, then a VMs allows you to scale UP without worrying about your app needing to work a certain way to properly scale OUT under a load balancer (which is what web roles are made to help you do).

So, basically I would suggest installing to a Virtual Machine. It's still in the cloud, and you get all the cloud benefits of on-demand scaling of the infrastructure. In addition, I would expect Virtual Machines to be a supported install of Umbraco, where a web role install would not. Hope that helps!