NullReferenceException on Azure Website (Umbraco 7)
Hi, I'm trying out Umbraco 7 and Azure websites for a pet project, but I have run into a rather annoying problem.
I have used Visual Studio/NuGet to install Umbraco on my local machine, and then pushed the files to a Git repository, and configured the website to automatically pull from that repository. Also I'm using an Azure SQL database. My site works fine when running it locally, but when trying to access it on Azure, I get the following error:
Object reference not set to an instance of an object.
[NullReferenceException: Object reference not set to an instance of an object.]
Umbraco.Web.UmbracoModule.BeginRequest(HttpContextBase httpContext) +16
Umbraco.Web.UmbracoModule.
I'm not sure whether this is related to Umbraco 7, since I have had the same problem with Umbraco 6 in an Azure VM. This could however be solved by installing MVC 4 on the server, but I'm not sure how to do this for a website, and if it will solve my problem.
Actually yes - I had forgotten all about this thread. When deploying from a Git repository, Azure will only include files that are in the Visual Studio project. So if you add Global.asax to your .csproj, and commit the changes, it should work. That was at least what worked for me.
The problem occurs because the NuGet package won't add all files to the .csproj since not all of them are needed in Visual Studio. You might also have to add some other files, the Global.asax is the one causing the error.
NullReferenceException on Azure Website (Umbraco 7)
Hi, I'm trying out Umbraco 7 and Azure websites for a pet project, but I have run into a rather annoying problem.
I have used Visual Studio/NuGet to install Umbraco on my local machine, and then pushed the files to a Git repository, and configured the website to automatically pull from that repository. Also I'm using an Azure SQL database. My site works fine when running it locally, but when trying to access it on Azure, I get the following error:
Object reference not set to an instance of an object.
[NullReferenceException: Object reference not set to an instance of an object.] Umbraco.Web.UmbracoModule.BeginRequest(HttpContextBase httpContext) +16 Umbraco.Web.UmbracoModule.
I'm not sure whether this is related to Umbraco 7, since I have had the same problem with Umbraco 6 in an Azure VM. This could however be solved by installing MVC 4 on the server, but I'm not sure how to do this for a website, and if it will solve my problem.
Thanks, Anders
Hi Anders
I am getting the same error when trying to deploy Umbraco 7.0.1 on to Azure with SQL Azure databse, is there any luck on this issue?
Thanks,
Sahan
Actually yes - I had forgotten all about this thread. When deploying from a Git repository, Azure will only include files that are in the Visual Studio project. So if you add Global.asax to your .csproj, and commit the changes, it should work. That was at least what worked for me.
The problem occurs because the NuGet package won't add all files to the .csproj since not all of them are needed in Visual Studio. You might also have to add some other files, the Global.asax is the one causing the error.
is working on a reply...