eXpandFramework/eXpand

Unable to cast object of type 'DevExpress.Xpo.DB.Helpers.MSSql2005SqlDependencyCacheRoot' to type 'DevExpress.Xpo.DB.DataCacheRoot'.

Closed this issue Β· 18 comments

π——π—²π˜€π—°π—Ώπ—Άπ—―π—² π˜π—΅π—² π—―π˜‚π—΄

Hello,

With the last version Im getting the following error:

Unable to cast object of type 'DevExpress.Xpo.DB.Helpers.MSSql2005SqlDependencyCacheRoot' to type 'DevExpress.Xpo.DB.DataCacheRoot'.

at Xpand.Extensions.XAF.Xpo.XpoExtensions.Connection(UnitOfWork unitOfWork)
at Xpand.Extensions.XAF.Xpo.ObjectSpaceExtensions.ObjectSpaceExtensions.Connection(IObjectSpace objectSpace)
at Xpand.XAF.Modules.SequenceGenerator.SequenceGeneratorService.<>c__DisplayClass19_0.b__2(IObjectSpace t)
at System.Reactive.Linq.ObservableImpl.SelectMany`2.ObservableSelector._.OnNext(TSource value)

No issue with 4.241.3.

BR

is this with the lab version?

I is 4.241.3.2

revisions mean lab, I will look at it the tenant support is to blame see #1066

aight thank you!

The pre-release 4.241.3.0 in the Reactive.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: No packages released.

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

The pre-release 4.241.3.0 in the Reactive.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: No packages released.

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

is the fix ok with you? planning to push it public so if you have some time please test

I keep getting the same exception;

I was able to reproduce the case with a blank Xaf solution where I enable Xpo caching, after this patch all works fine on my side. Can you provide a solution that fails?

I assume you are on the latest version 4.241.3.4

yup. Im using the 4.241.3.4 version and custom datastore provider with MSSql2005SqlDependancyCacheRoot to utilize service broker. Will try to repro now

DXApplication2.zip

The win version

The pre-release 4.241.3.0 in the Reactive.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: No packages released.

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

the previous issue is fixed in 4.241.3.5, but now :

An item with the same key has already been added. Key: Password

at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary2.Add(TKey key, TValue value)
at DevExpress.Xpo.DB.Helpers.ConnectionStringParser.AddPart(String partName, String partValue)
at Xpand.Extensions.XAF.Xpo.ObjectSpaceExtensions.ObjectSpaceExtensions.ConnectionString(IObjectSpace objectSpace)
at Xpand.XAF.Modules.SequenceGenerator.SequenceGeneratorService.SequenceGeneratorDataLayer(IObjectSpace space)
at Xpand.Extensions.LinqExtensions.LinqExtensions.GetOrAdd[TKey,TValue](IDictionary2 dictionary, TKey key, Func1 valueCreator, String caller)
at Xpand.XAF.Modules.SequenceGenerator.SequenceGeneratorService.<>c__DisplayClass19_0.b__2(ValueTuple2 t) at System.Reactive.Linq.ObservableImpl.SelectMany2.ObservableSelector._.OnNext(TSource value)

detail me on repro steps please

just try using connection string of type XpoProvider=MSSqlServer;

the one I'm using is like :
XpoProvider=MSSqlServer;Pooling=true;Server=tcp:zzz,1433;Persist Security Info=True;User ID=zzz;Password=zzz;initial catalog=zzz;MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=True;Connection Timeout=60;

The pre-release 4.241.3.0 in the Reactive.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: No packages released.

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

Everything looks great now to me. Thank you for your efforts. EfharistΓ³ para poli!