Copied to clipboard

Flag this post as spam?

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


  • Sas Jacobs 2 posts 22 karma points
    Nov 04, 2013 @ 06:31
    Sas Jacobs
    0

    Fails to run on production "Object reference not set to an instance of an object"

    Hello

    I am an experienced developer but this is my first Umbraco web site - v6.1.3. I have created the site locally using VS2010 without problems under ASP.NET 4 with a SQL Server 2008 database. I created content, data types, templates, XSLT etc without a problem.

    But the problems started when I deployed to production.I did this by publishing using FTP from Visual Studio. I have published twice with the same result each time. I get the YSOD and "Exception Details: System.NullReferenceException: Object reference not set to an instance of an object."

    The stacktrace shows the following.

    NullReferenceException: Object reference not set to an instance of an object.]
       Umbraco.Web.UmbracoModule.BeginRequest(HttpContextBase httpContext) +14
       Umbraco.Web.UmbracoModule.<Init>b__5(Object sender, EventArgs e) +262
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +7

    I have checked that database has been deployed correctly and I am able to change the database connection string in the local web.config to connect to the production database from the localhost. It works fine from localhost.

    In fact, I've changed all the settings in the local web.config to match those in production but nothing has changed.

    I'm struggling with how else to tackle this problem.

    Can anyone point me in the right direction or give me a solution?

    Thanks in advance!

  • Dan Lister 416 posts 1974 karma points c-trib
    Nov 04, 2013 @ 09:58
    Dan Lister
    0

    Hi Sas. Have you compared your published bin folder to your development one to make sure all required assemblies are present?

  • Sas Jacobs 2 posts 22 karma points
    Nov 04, 2013 @ 10:22
    Sas Jacobs
    0

    Thanks for the suggestion Dan. Yes, I have compared them and they are identical.

    Is it even possible to publish the site using the publish command in VS? I have included the folders that are excluded by default according to something I read - umbraco, umbraco_client etc.

    I guess I'm a bit confused by the process and can't find any good web references to read.

  • Mark Bennett 199 posts 375 karma points
    Nov 06, 2013 @ 14:05
    Mark Bennett
    0

    Sas,

    I don't believe doing a publish from VS works - I've never published an Umbraco system like that and I do use the publish function for other development work.

    To set up your prod system -

    First download and setup the version of umbraco on the server and make sure it all works. (use the same version as your dev box obviously).

    Then copy across the dev database - change the config to point to the new database or change the dev database name to be the production DB name.

    Copy across any required files - templates / css / scripts / macros etc.

    Copy across any dll's that you may have created on top of the core 

    I'm sure if you have a bit of a search for 'deploying umbraco to production' or something like that then there will be some more information on what exactly you need to do.

    Hope that helps,

    Mark.

Please Sign in or register to post replies

Write your reply to:

Draft