Hi,
Our application runs on 2 websites. The 1 website is a Project Management tool (called PAD) and the other is a website used for Reporting (called REP). Both use the same database but a different Class Model.
Now PAD runs flawless without any problems. But as soon as we use the REP website, PAD gets an ObjectDisposedException (message = "Cannot access a disposed object.\r\nObject name: 'Session is already disposed.'") but not always.
Reporting works like this:
- A client calls a controller on the PAD website and the controller writes report parameters in the DB.
- On return to the client the Id of the parameter row is returned.
- The client then calls the REP website which reads the Reporting parameters and produces a Report that is displayed on the website.
The Reporting tool uses multiple threads to generate the report and that is the reason why we added the 'AllowSwitching' to the configuration. Could that cause our problems?
Here's the configuration used for DataObjects.Net.
<Xtensive.Orm>
<domains>
<!-- The PerformSafely attribute below can be overwritten in the DataContext.OpenSession() -->
<domain name="Default" defaultSchema="DataObjects" provider="sqlserver" connectionString="Data Source=localhost;Initial Catalog=Controlit_Facturatie;Persist Security Info=True;Integrated Security=True;MultipleActiveResultSets=True" upgradeMode="PerformSafely">
<mappingRules>
<rule namespace="Projecten.Model.Entities" schema="Projecten" />
<rule namespace="Fortrus.Reporting.Model.Entities" schema="Reporting" />
</mappingRules>
<types>
<add assembly="Fortrus.Reporting.Model" />
<add assembly="Projecten.Model" />
<!--<add assembly="Xtensive.Orm.Security"/>-->
</types>
<sessions>
<!-- AllowSwitching is nodig voor Telerik Reporting om Session switching toe te staan
Telerik werkt nl. met worker threads en dat veroorzaakt een exception wanneer deze
optie niet aan staat -->
<session name="default" options="ServerProfile,AllowSwitching" />
</sessions>
</domain>
</domains>
</xtensive.orm>
Regards
Paul Sinnema
asked
May 02 '13 at 07:07
Paul Sinnema
261●88●88●96