Locally perfect working project seems to fail at remote machine


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Locally perfect working project seems to fail at remote machine

  1. #1
    Join Date
    Jan 2007
    Posts
    2

    Locally perfect working project seems to fail at remote machine

    Hi all,

    I have a project developed under Microsoft Visual Studio 2005 (with full updates), ASP.NET. The software uses a remote database to retrieve data. At the development process everything went fine. The project was working perfectly. But after installing publishing the project and adding the files to the web server the project seem to fail randomly. Even if I try to perform the same error on my machine to debug it just sems OK and no error occurs. My director advised me to close the connections after SQL queris and told me that it might cause the error so I have done it as:

    commandSQLCommand.Connection.Close();

    commandSQLCommand.Dispose();

    dataadapterSQLDataAdapter.Dispose();



    Now when I try the same project again at the web server everythinh works fine for a moment and then fails for another moment. I have tried to figure out the reason or kind of error. But at a point when the project falls to error it simply might not on the next try. There are just a few clues to figure out what the problem is. First when a first kind of error happens I get the following message:

    Server Error in '/bookings' Application.
    --------------------------------------------------------------------------------
    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.]
    frmBrandOwner.Page_Load(Object sender, EventArgs e) +403
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
    System.Web.UI.Control.OnLoad(EventArgs e) +99
    System.Web.UI.Control.LoadRecursive() +47
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061



    Another thing is that the program redirecs itself to the error page I made. But when I check the pages there only one point that it might be redirected to the error page. At the Loads event of every page I check the user login status and administration rights. To do so;

    1. Check the user login:

    a. Check if the session exists

    b. Check if the session[username] exists

    OR

    a. Check if the cookie exists



    should be verified. At the administration rights section I am simply checking if the user level that is held in the session is smaller than a certain value in a DataHolder class which only holds private static data and updates itself while running at the first run of the program. So, it seems that the program might only fail if it does not read from the calss DataHolder, but since the project is on the remote machine when it causes the error, I can not debug it and it does not cause any problems while running locally.

    Can anybody help me on solving the issue?

    Regards.

    Utku Ozan ÇANKAYA

  2. #2
    Join Date
    Jan 2007
    Posts
    145
    Most probably you have hardcoded ipaddress or using localhost than using actual ip addreeses in your code.

Similar Threads

  1. Replies: 1
    Last Post: 04-06-2007, 01:47 PM
  2. Custom error not working on remote site
    By naijacoder in forum ASP.NET
    Replies: 0
    Last Post: 08-21-2006, 03:39 AM
  3. Access remote machine in the network
    By Newbie in forum .NET
    Replies: 3
    Last Post: 06-03-2003, 09:33 AM
  4. Software Engineering opportunity with RSW Software
    By Glenn McKee in forum Careers
    Replies: 1
    Last Post: 08-24-2000, 10:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center