Web services randomly working

Discussion in 'ASP.NET WebServices' started by Bruce, Apr 2, 2004.

  1. Bruce

    Bruce DiscountASP.NET Staff

    Can't really tell what's happening until we see the error. Try block out your error trapping and see what error did you get.

    quote:Originally posted by sleonard

    I have created two web services on DASP, and neither one of them are working correctly. They are randomly going up and down. I am using C#, ADODB and MySQL. The web service simply executes a select statement on a value passed into the function and returns an array of resultant strings. No one else is hitting these, the databases currently have less than 10 records, and the resultant string arrays are 2 to 5 in length. I am setting the recordset to null and closing the connection after every call. If I run the service locally on my IIS box hitting the same DASP MySQL db, it works all the time, even when the DASP deployed service doesn't. Yesterday, when one of my services was down, it would return an array of two null strings on a hit record, which tells me it was executing the query and finding a record. A no hit query would return an zero length array. The only possible point of failure is here:

     
  2. Very lengthy update...
    I had a bug in my exception handling/logging code... so I didn't see them.
    Now I get this:

    Source : mscorlib
    Method : get_Keys
    Date : 6:09:12 PM
    Time : 4/2/2004
    Computer : web999
    Error : Object reference not set to an instance of an object.
    Stack Trace : at System.Runtime.Remoting.Messaging.MessageDictionary.get_Keys()
    at TestVersionService.mxVersion.sArGetVersion(String sAppName) in Z:\YYY\testversionservice.root\testversionservice\mxversion.asmx.cs:line 100
    ^^-------------------------------------------------------------------^^

    Here is line 100:
     
  3. I have created two web services on DASP, and neither one of them are working correctly. They are randomly going up and down. I am using C#, ADODB and MySQL. The web service simply executes a select statement on a value passed into the function and returns an array of resultant strings. No one else is hitting these, the databases currently have less than 10 records, and the resultant string arrays are 2 to 5 in length. I am setting the recordset to null and closing the connection after every call. If I run the service locally on my IIS box hitting the same DASP MySQL db, it works all the time, even when the DASP deployed service doesn't. Yesterday, when one of my services was down, it would return an array of two null strings on a hit record, which tells me it was executing the query and finding a record. A no hit query would return an zero length array. The only possible point of failure is here:

     
  4. Bruce

    Bruce DiscountASP.NET Staff

    This means rs.Fields[0].Value is Null. Try check for DBNull before you reference a field.


    quote:Originally posted by sleonard

    Very lengthy update...
    I had a bug in my exception handling/logging code... so I didn't see them.
    Now I get this:

    Source : mscorlib
    Method : get_Keys
    Date : 6:09:12 PM
    Time : 4/2/2004
    Computer : web999
    Error : Object reference not set to an instance of an object.
    Stack Trace : at System.Runtime.Remoting.Messaging.MessageDictionary.get_Keys()
    at TestVersionService.mxVersion.sArGetVersion(String sAppName) in Z:\YYY\testversionservice.root\testversionservice\mxversion.asmx.cs:line 100
    ^^-------------------------------------------------------------------^^

    Here is line 100:
     
  5. I gathered that it was null, the problem is it shouldn't be. I am passing in data that returns a hit in the recordset, otherwise the code wouldn't get to the point where it fails. Currently the data in the tables themselves is static. Those fields have data in them. The problem is that depending on whether it wants to or not, for no apparent reason, the data provider has no data in the fields.

    sbl
     
  6. At my last post I was in the process of switching over
    to the ByteFX MySQL driver. Both web services have been
    returning hits now for almost two days with no failures
    (using the same queries as before). Unless someone has
    another explanation (which I would appreciate), I'll just
    chalk it up to "M[Y]*S((QL)|(FT))+ SUX</font id="red">".

    Thanks,
    sbl
     
  7. Bruce

    Bruce DiscountASP.NET Staff

    didn't realize you were using mysql.

    the mysql ODBC driver is kinda unstable.


    quote:Originally posted by sleonard

    At my last post I was in the process of switching over
    to the ByteFX MySQL driver. Both web services have been
    returning hits now for almost two days with no failures
    (using the same queries as before). Unless someone has
    another explanation (which I would appreciate), I'll just
    chalk it up to "M[Y]*S((QL)|(FT))+ SUX</font id="red">".

    Thanks,
    sbl
    </blockquote id="quote"></font id="quote">
     

Share This Page