SL app throwing exception when retrieving data through WCF

Discussion in 'Databases' started by alan25, Sep 9, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hello--

    I have a silverlight app that retrieves data from a SQL 2008 database. The request is made through WCF, and ADO.NET table adapters are responsible for running the sql statements.

    I'm confident there's no DB connectivity issue because I tested the connection string several times in both VS 2008 and management studio. I can view data sitting on the server.

    The problem is when the SL requests data, either WCF or the table adapters are throwing the following exception, logged from IE:

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
    Timestamp: Wed, 9 Sep 2009 05:16:18 UTC


    Message: Sys.InvalidOperationException: ManagedRuntimeError error #4004 in control 'ctl00_cpMainContent__findMedicineSLControl': System.NullReferenceException: Object reference not set to an instance of an object.
    at SurveyApp.App.Application_UnhandledException(Object sender, ApplicationUnhandledExceptionEventArgs e)
    at MS.Internal.Error.CallApplicationUEHandler(Exception e)
    at MS.Internal.Error.GetXresultForUserException(Exception ex)
    Line: 453
    Char: 17
    Code: 0
    URI: http://localhost/ScriptResource.axd...HSZ8C91hf16esI20-j0FRquG7mGMmCxyoA2&t=1f1ca10


    Does anyone know what the problem might be? My server account is configured with IIS 7 on a windows 2008 machine. The DB is sql server 2008. I'm developing from XP and the visual studio debug version of the site works fine (even using my production database connection string).


    Since the development environment is working I'm not sure how to even begin debugging the problem. The WCF service is a IService contract in \App_Code & I'm not sure how to output logs from there.



    Thanks
    Alan
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    this is one of the very generic error. it usually occurs when the application tries to access an object that has not been instantiated.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page