Lessons learnt from Azure setup

PLACE FOR BLOG

Lessons learnt from Azure setup

Lessons learnt from Azure setup

marija

Let's start with a couple of quick&easy ones:

  • connectionStrings for blobs and DB have to be manually added to Azure as well and you have to TRIPLE-CHECK it - the error is very difficult to see once the site goes cloud. You only get the default Episerver error page, nothing in the log and finding the right configuration that would give me additional info for this error is a waste of time. So, make sure you don't get into this trouble (C/P the connectionstrings and make sure to press SAVE in Azure!)
  • connectionStrings.config can't be a separate file referenced from web.config (at least by default, this might be a workaround, but I haven't given it a try), they have to be directly in web.config when used with VS publishing profiles.
  • Letters in the container name for Azure blob provider have to be LOWERCASE only (misleading error says, but my favourite friend dotPeek knows better: letters, numbers and up to two consecutive hyphens). "Container names can contain only letters, numbers, and hyphens. The name must start with a letter or a number. The name can't contain two consecutive hyphens." is the error you will get. 
  • If you are having any dll-s built for specific version of application, you will have to select the version in Azure portal as well. When first deploying the site, I got BadImageFormatException, due to some SAP connector dlls being complied for 64bit. According to this post, I switched the WebApp to 64bit in Azure portal and that did the trick.

Tips when moving the whole solution from classic server to Azure:

  • If someone else is creating the DB for you, make sure to tell them to select Finnish_Swedish_CI_AS as collation (it's not default and it's not that easily changable after the DB is created)! Otherwise, if you are moving the DB from a standard server to Azure, using SQLAzureMW, you will get loads of errors.
  • If you are using Owin, you will get some warnings about unsupported stored procedures. See more on this topic here.
  • If you want to move blobs from a classic server to Azure, these are the steps: Install EPiCode.BlobConverter and deploy. Copy paste blob folder from a classic server to App_Data\blobs directly to FTP (no need to include in project or deploy). Run Convert File Blobs on the site (where blobs are deployed). Delete blobs folder from App_Data from FTP.
  • When in need to move blobs from one Azure environment to another, use AZCopy.

LEAVE A COMMENT