Has anyone successfully installed Umbraco 7.0.1 via nuget?
Im on windows 8, Visual Studio 2012. Im creating a .NET 4.0 mvc project. Each time i try, i get the same error:
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
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:
[NullReferenceException: Object reference not set to an instance of an object.]
Umbraco.Web.UmbracoModule.BeginRequest(HttpContextBase httpContext) +58
Umbraco.Web.UmbracoModule.<Init>b__8(Object sender, EventArgs e) +320
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
Is there anyone who knows how to do this ? I just what the best and easiest way to install umbraco 7.0.1 and having the project inside visual studio. Any surgestions ?
- Niclas Schumacher
I generally start an empty ASP.Net application, and then pull in Umbraco.Cms from Nuget. Maybe as you've already added MVC and the files that includes, that might be the issue.
I have also seen that error before, and it was because I didn't have a global.asax page deployed. Obviously that was for a deployed site not a local development one, but mentioning in case that gives a clue to your issue.
I had the same issue when I solved another issue of the faliure of the framework to execute Application_Start method of the class configured in my Global.asax file. The solution was to inherit the class contained in Global.asax.cs from Umbraco.Web.UmbracoApplication rather than System.Web.HttpApplication.
Some detail...
The default ASP Global.asax.cs class is not updated automatically and will look something like this:
public class MyUmbracoApplication : System.Web.HttpApplication { etc... }
Similarly, the default Global.asax file is (right click it -> show markup):
The config Inherits= should be the namespace qualified class name contained in the Global.asax.cs class file. The class should inherit from Umbraco.Web.UmbracoApplication and the OnApplicationStarted function should be overriden. The Global.asax.cs class file should look something like :
namespace MyNamespace { public class MyUmbracoApplication : Umbraco.Web.UmbracoApplication { protected override void OnApplicationStarted(object sender, EventArgs e)
{ base.OnApplicationStarted(sender, e); //Put your code here } }
Note that you must inherit from Umbraco.Web.UmbracoApplication.
And the Global.asax config behind should look like this:
Niclas - I think the reason that the fresh install works is that it probably takes care of these adjustments. Googling around a bit, it seems that this detail is overlooked by many ASP packages or the the naming of the project has changed at some point and the link between the Global.asax class name and config has been broken. A fresh install seemed like a drastic way of solving the issue so I hope it helps others to avoid having to resort to that.
Visual studio and umbraco 7
Hello guys.
Has anyone successfully installed Umbraco 7.0.1 via nuget?
Im on windows 8, Visual Studio 2012. Im creating a .NET 4.0 mvc project.
Each time i try, i get the same error:
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
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:
Is there anyone who knows how to do this ? I just what the best and easiest way to install umbraco 7.0.1 and having the project inside visual studio. Any surgestions ? - Niclas Schumacher
Hello,
Instead of nuget I do something similar to the Umbraco Visual Studio Project.
I also use the Hybrid Framework.
Jeroen
Hi Niclas
I generally start an empty ASP.Net application, and then pull in Umbraco.Cms from Nuget. Maybe as you've already added MVC and the files that includes, that might be the issue.
I have also seen that error before, and it was because I didn't have a global.asax page deployed. Obviously that was for a deployed site not a local development one, but mentioning in case that gives a clue to your issue.
Hope that helps.
Andy
Andy - I think you are right.. because i just made a clean umbraco installation yesterday at home, and that went well..
I had the same issue when I solved another issue of the faliure of the framework to execute Application_Start method of the class configured in my Global.asax file. The solution was to inherit the class contained in Global.asax.cs from Umbraco.Web.UmbracoApplication rather than System.Web.HttpApplication.
Some detail...
The default ASP Global.asax.cs class is not updated automatically and will look something like this:
Similarly, the default Global.asax file is (right click it -> show markup):
The config Inherits= should be the namespace qualified class name contained in the Global.asax.cs class file. The class should inherit from Umbraco.Web.UmbracoApplication and the OnApplicationStarted function should be overriden. The Global.asax.cs class file should look something like :
Note that you must inherit from Umbraco.Web.UmbracoApplication.
And the Global.asax config behind should look like this:
This was 'doin' my head in' as they say. So I hope it's of help to others.
Edit: There are good threads here:
http://our.umbraco.org/forum/core/general/41599-How-are-people-developing-MVC-apps-within-Umbraco-v6
http://our.umbraco.org/Documentation/Reference/Events/application-startup ;
Niclas - I think the reason that the fresh install works is that it probably takes care of these adjustments. Googling around a bit, it seems that this detail is overlooked by many ASP packages or the the naming of the project has changed at some point and the link between the Global.asax class name and config has been broken. A fresh install seemed like a drastic way of solving the issue so I hope it helps others to avoid having to resort to that.
I found it installs via nuget perfectly in an empty mvc project targeting 4.5, not 4.0
is working on a reply...