locked
Why Object Reference Issue occurred? RRS feed

  • Question

  • User1081236289 posted

    Hi, 

           

     We had developed web application with webservice, when the user submit the job then window service calling webservice1.asmx and then webservice1.asmx calls the webservice2.asmx, based on the data webservice2 take time to complete the job, every 30 sec window service calling the webservice1.asmx and webservice1.asmx calls the webservice2.asmx. in Web service2.asmx having the dlls for analysis logic. 

               here In the analysis logic we have one function called Analysis() here we have looping 18,000 records and do some calculations. my problem is this loop is not completing, there is some point in time I got "Object reference not set to an instance of an object" but this is different on each run some times i got 65th record of 18,000 some time I got 3500th record of 18000 and sometimes got 7500th row of 18000, I could not predict what is the reason behind it. 

    Can anyone advise me what is the problem and how to solve the issue? 

    Thanks

    Mayil.M 

    Saturday, September 8, 2012 6:27 AM

Answers

  • User700362322 posted

    correct me if i wrong The Exact Error you are getting is : "System.NullReferenceException: Object reference not set to an instance of an object" while iterating through an Dataset.

    in my case i'm getting same error while i insert null in a 'not null' field in database (Upload Excel record) or assign a null value to an object.

    what i've done in my case , just added a filter handel null value parameter and continue the iteration.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 8, 2012 7:35 AM

All replies

  • User700362322 posted

    if possible, create a new record store and add only one record on which you are getting error.

    now again run aplication by binding the record source to the one, which comprises only 1 record (on which you getting exception).

    it will help you to analyze the root cause of exception.

    Saturday, September 8, 2012 6:37 AM
  • User1081236289 posted

    Yes if i run with that one record which one I got the error then that record is processed sucessfully with out issues. 

    Thanks

    Gilli

    Saturday, September 8, 2012 6:40 AM
  • User700362322 posted

    correct me if i wrong The Exact Error you are getting is : "System.NullReferenceException: Object reference not set to an instance of an object" while iterating through an Dataset.

    in my case i'm getting same error while i insert null in a 'not null' field in database (Upload Excel record) or assign a null value to an object.

    what i've done in my case , just added a filter handel null value parameter and continue the iteration.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 8, 2012 7:35 AM