I signed up for an Azure account and deployed a website together with a database which all went very smoothly.
First I had it on the free service, but after experiencing performance issues, upgraded it to the shared model (which has the same performance). The "linked resource" database is a web-edition database. In the portal it looks like this:
The following code is used to enable cache invalidation in the Admin part of my website:
ConnectionStringSettings Config = ConfigurationManager.ConnectionStrings["MyConnectionString"];
System.Web.Caching.SqlCacheDependencyAdmin.EnableNotifications(Config.ConnectionString);
System.Web.Caching.SqlCacheDependencyAdmin.EnableTableForNotifications(Config.ConnectionString, "MyTable");
It works on my local SqlServer Express, as well as on a live database at one of my hosting providers. Only on Azure, I get the following exception:
System.Data.SqlClient.SqlException (0x80131904): Could not find stored procedure 'sp_addrole'.
Cannot find the user 'aspnet_ChangeNotification_ReceiveNotificationsOnlyAccess', because it does not exist or you do not have permission.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Web.Caching.SqlCacheDependencyAdmin.SetupNotifications(Int32 flags, String table, String connectionString)
So it seems like a stored procedure and a 'user' (?) are missing. I'd expect the web edition to have these features by default?
I would have gone for the Express edition if it were available, however I only get to choose between "Web Edition" and "Business Edition" from the Azure control panel.
Any way to get this working?