Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kevin 7 posts 106 karma points
    Mar 14, 2019 @ 16:29
    Kevin
    0

    Deploying an Umbraco 8 from VS 2017

    Has anyone been successful in deploying an Umbarco 8 from VS 2017?

    If yes, having a proven step-by-step set of instructions would be very useful.

    All my attempts result in the following error when viewing either site or the back office:

    **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.Runtime.WebRuntime.Boot(IRegister register) +197
    [HttpException (0x80004005): Object reference not set to an instance of an object.]
       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +517
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +185
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +168
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +277
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369
    [HttpException (0x80004005): Object reference not set to an instance of an object.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +714
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3282.0**
    
  • Mov3nforward 47 posts 179 karma points
    Mar 14, 2019 @ 17:22
    Mov3nforward
    0

    I am getting this error. I have tried to install several times from Nuget.

    enter image description here

  • Bhawna Jain 17 posts 148 karma points
    May 22, 2019 @ 04:51
    Bhawna Jain
    0

    @Mov3nforward, I also got this error and I solved it by changing version of target framework of my VS project.

    Here is the related question: https://our.umbraco.com/forum/umbraco-8/97257-could-not-load-type-umbracowebumbracoapplication

  • Kevin 7 posts 106 karma points
    Mar 14, 2019 @ 18:54
    Kevin
    0

    These are the Visual Studio 2017 steps that worked for me:

    File > New > Project Visual C# > Web ASP.NET Web Application Empty Template

    Right click on your newly created empty project from Solution Explorer and select Manage NuGet Packages.

    Search NuGet for UmbracoCms (I selected v.8) and select Install.

    After the installation has finished, Ctrl F5 to run without debugging and follow steps displayed in your browser.

    After that, visit your new local site via a URL similar to http://localhost:#####/umbraco (##### your port) to open Umbraco Back Office.

  • Kevin 7 posts 106 karma points
    Mar 14, 2019 @ 20:56
    Kevin
    100

    I was finally able to get my site deployed and running to IIS on Microsoft Server 2012.

    Below are the steps that worked for me using Visual Studio 2017:

    File > New > Project Visual C# > Web ASP.NET Web Application Empty Template

    Right click on your newly created empty project from Solution Explorer and select Manage NuGet Packages.

    Search NuGet for UmbracoCms (I selected v.8) and select Install.

    After the installation has finished, Ctrl F5 to run without debugging and follow steps displayed in your browser.

    After that, visit your new local site via a URL similar to http://localhost:#####/umbraco (##### your port) to open Umbraco Back Office.

    Build out your site using Umbraco Back Office (Document Types, Content, etc.).

    Deployment/Publishing Steps:

    From Visual Studio Solution Explorer, manually "exclude" and subsequently "include" the following folders: App_Plugins, config, css, Media, scripts, Views.

    From Visual Studio, select your project and select Publish.

    Once Publish has finished, I manually published the MS SQL SE database, expand App_Data from the Solution Explorer and select the Umbraco.sdf file, then right-click and select Publish.

    On the web server, grant "modify" permissions to the root folder of the newly deployed website, to the app pool user. My app pool identity is set to "ApplicationPoolIdentity". In my case, it needed User account was the following: "IIS AppPool\AppPoolName", where "AppPoolName" is the name of the App Pool set for you the website.

    I'm not sure if the above steps are "best practices", but they seem to have worked for me. Hopefully, others facing similar frustrations can find success with these steps. You may need to adjust these steps for a production environment, so that some folders are not replaced.

    :)

Please Sign in or register to post replies

Write your reply to:

Draft