This is a migrated thread and some comments may be shown as answers.

Exception:'The 'IObjectScope' is already closed'

1 Answer 221 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sunita
Top achievements
Rank 1
Sunita asked on 19 May 2009, 08:09 PM
RptScope = ReportScopeProvider.GetNewObjectScope();   
using (RptScope)    
{  
InspectionReport result = (from ir in RptScope.Extent<InspectionReport>() select ir).First();   
this.DataSource = result;   
  }  
 
 
I am new to telerik reporting. I am using Business Object Datasource.. 
Here is the code...

 

But I get an Exception:'The 'IObjectScope' is already closed' when I preview the report design or when I run it.
But if I debug thru it , I do see the data being returned. ie. If I step through each line of code posted above , then the report shows the data else I get the exception.

Am I missing something ?

 

 

 

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 20 May 2009, 10:36 AM
Hello Sunita,

The generic .NET exception you've hit is usually encountered when you close the scope too early before the request has actually ended. You can check out google for more info and take a look at this blog post as well.

Regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
Sunita
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or