I'm tryign to use 51Degrees in a .NET project that I deploy to Azure. August 2011, they released v1.2.1.3 marked as "Azure Compatible":
Foundation can now be deployed on to the Windows Azure Cloud service. See the release note for full details on requirements and how to setup. Azure related changes include: Instead of a log file, log entries are written to a log table Instead of a devices file, previous device requests are written to a device table A new conditional compilation symbol - 'AZURE'. AZURE enabled builds will not work in traditional ASP.NET.
Since then there have been a dozen releases and they are up to v2.1.4.9. However, their documentaiton is super light on how to use it with Azure. In fact, there was a bug originally because v1.2.1.3 stated
To make use of the changes you must create a storage account called ‘fiftyonedegrees’. The foundation will then create two tables, one for previous devices, and another for logs.
This isn't possible because Azure storage accounts need to be unique across all instances so everyone can't create ones named fifityonedegrees
.
Their response was:
After rereading the blog it seems I've made an oversight in this regard, and will update shortly.
The storage account that the Foundation looks for can be changed in the Foundation source code. Go to Foundation/Properties/Constants.cs and change the string 'AZURE_STORAGE_NAME' to the name of your storage account.
However, I'm still at a loss at how to utilize it within my project. Here's my issues:
- I'm not clear whether v1.2.1.3 is the only Azure compatible release, or every release after is Azure compatible. Their documentation doesn't say.
- When I install 51Degrees via NuGet, my project doesn't get an
App_Data
folder created which contradicts their documentation. Theweb.config
file even has entries in it that reference theApp_Data
folder such as<log logFile="~/App_Data/Log.txt" logLevel="Info"/>
. - Based on the response to the Azure storage account bug I quoted earlier, they are sayign IN need to edit the file
Foundation/Properties/Constants.cs
. However, since I'm installing via NuGet and it's a DLL, NuGet is presumably the wrong approach? Do I need to download the source and compile it myself and wire it up to my project manually?
I'm generally new to .NET, NuGet, VS, etc so appreciate the help.
All versions are Azure compatible from 1.2.1.3 onwards. I'm assuming this is the blog post you were talking about. After you've created your azure storage account, you'll have to edit the Constants.cs file in the source code and add in your account name. It's my understanding that this means you'll have to get access to the source code and edit it directly. One you have done this you'll need to recompile for the software to work correctly. I'm not sure if there is a way to perform the same task using NuGet, but I'll look into it. Hope this helps.