You must Sign In to post a response.
  • Category: ASP.NET

    Server Error in '/' Application. Object reference not set to an instance of an object.

    I have moved my site from local server to godday and after transfer my site is down and getiing following error. Any help would be appreciated.

    Error Details:

    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.]
    usercontrols_S4W_course_finder.bind_course_type() +82
    usercontrols_S4W_course_finder.Page_Load(Object sender, EventArgs e) +75
    System.Web.UI.Control.OnLoad(EventArgs e) +92
    System.Web.UI.Control.LoadRecursive() +54
    System.Web.UI.Control.LoadRecursive() +145
    System.Web.UI.Control.LoadRecursive() +145
    System.Web.UI.Control.LoadRecursive() +145
    System.Web.UI.Control.LoadRecursive() +145
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoin

  • #762640
    hi Murad, i thing you are passing a value from one page to another page. but it say object you are given but instance is not set. it may be session or anything else.

    if you using session please check it.and first put a breakpoint check step by step your source code you can find the error and reason for that error.

    hope this information will help you.

    Regards with,

  • #762646
    The root cause problem of this type of error is, you are trying to access null reference in that case you may face this type of error. Before access the value check the condition whether object contains value or not. If not then skip the assignment else assign value.


    //assign value

    To analyse the issue in your code blocks better to debug the program then only you can get where it's get strucked or refer stack trace for more details.

    Hope this will helpful to you...

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #762684
    Hai SK AL MURAD,
    This is the very common problem when you move your application to the server for hosting.
    The structure of the application should be same as it is in your system and then only it will take it correctly.
    The config file should be at the root level and then other folder structures should be according to the config file.
    If you create a new folder at the serve and place all your published code into that folder, you will get such error as this type of structure is not in your current system where the application is working.
    So make sure that application structure including the cong if file is same as it is in the server.
    Hope it will be helpful to you to fix the issue.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • Sign In to post your comments