0
votes

I have an Umbraco site developed using SQL CE, I then changed this to SQLEXPRESS and can connect to both locally. I deployed to Azure (initially using CE) and all worked OK, I then created a SQL Azure database and copied the SQLEXPRESS to there, again this seems to have worked and I can connect to the SQL Azure database using SQL Management Studio.

The problem occurs when I try to connect to the Azure db from my application, I have updated the web.config using the Azure connection string but both locally and in Azure I get -

Value cannot be null.
Parameter name: sqlSyntax 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: sqlSyntax

Source Error: 


 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 



[ArgumentNullException: Value cannot be null.
Parameter name: sqlSyntax]
   Umbraco.Core.Persistence.Repositories.PetaPocoRepositoryBase`2..ctor(IDatabaseUnitOfWork work, CacheHelper cache, ILogger logger, ISqlSyntaxProvider sqlSyntax) +120
   Umbraco.Core.Persistence.Repositories.DomainRepository..ctor(IDatabaseUnitOfWork work, CacheHelper cache, ILogger logger, ISqlSyntaxProvider sqlSyntax) +23
   Umbraco.Core.Services.DomainService.GetAll(Boolean includeWildcards) +75
   Umbraco.Web.Routing.PublishedContentRequestEngine.FindDomain() +286
   Umbraco.Web.Routing.PublishedContentRequestEngine.PrepareRequest() +15
   Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext) +361
   Umbraco.Web.UmbracoModule.<Init>b__8(Object sender, EventArgs e) +80
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +141
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

Any ideas what is going wrong?

2

2 Answers

2
votes

This error occurs when the web.config contains an empty umbracoDbDSN key but the umbracoConfigurationStatus key is filled in. I.e.:

<appSettings>
  <add key="umbracoConfigurationStatus" value="7.3.4" />
  ...
</appSettings>
<connectionStrings>
  <add name="umbracoDbDSN" connectionString="" providerName="" />
  ...
</connectionStrings>

Doublecheck the umbracoDbDSN connectionString and providerName. You could try to reinstall Umbraco in the SQL Azure database by emptying the value of umbracoConfigurationStatus in your web.config.

Replace

<add key="umbracoConfigurationStatus" value="7.3.4" />

with

<add key="umbracoConfigurationStatus" value="" />
0
votes

I'm not familiar with Umbraco but did you follow the migration guide to Azure SQL they have on their site?

This post on MSDN also references the Azure Umbraco Acceletator.

As a side note, they also have a Umbraco-as-a-Service offering that runs on Azure.