Enterprise library data service error while running ASP.NET

Topics: Data Access Application Block
Feb 18, 2010 at 10:48 AM

Hi,

I am basically new to this. So i might not understand all the words you use. But I will try to understand the remedies and suggestions you give me. Am in serious trouble now. got this issue for more than a week now and am desperate to get the solution.

After installing Enterprise library, I ran the install services. Then I ran my ASP.NET aaplication. But am getting the following error.

"An error occured in class 'aUserCollection', function 'aPersistenceFacility.GetData': Getting object data for collection."

 

I lookend into the event manager and found out that the error is occuring in Enterprise Library Data Service. Kindly let me know the solution for this issue.

Regards,

Sathiya.

Feb 18, 2010 at 12:39 PM

Have you traced the exact code which is causing the error?  If so, what is it?

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com

Feb 18, 2010 at 1:24 PM

Ya Sarah. I got the error during Dataread.

DataReader = Database.ExecuteReader(theProcedureName, theParameters)

It failed during this hitting the exception.

Catch ex As Exception
            anException.ConvertAndThrow(theDomainObjectCollection.GetType.Name, "aPersistenceFacility.GetData", "Getting object data for collection", ex)
 End Try

Regards,

Sathiya.

 

Feb 18, 2010 at 1:31 PM

So the exception was caused by the ExecuteReader but the message you got from the EventViewer is actually caused by your ConvertAndThrow method.  It's actually misleading.  What is the error message of the caught exception?  Determine also what caused it 

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com

Feb 18, 2010 at 1:50 PM

The error message got from the event viewer is : Data connection failed to open: database=-----;integrated security=false;server=(local);

The message got from the application in the browser is : Getting object data for collection

Feb 18, 2010 at 1:54 PM

Oh, it's not an entlib issue.  It's clear that it's unable to connect to your database.  Are you sure integrated security should be false? 

On the error you're getting in the browser, you need to debug what's causing it.  It's your code in the catch which is causing the error.

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com