Can t build DC Based Security Getting Started

StatusIDPriorityTypeTags
Closed22554MinorQuestionXafari
ProfileReply
Tin-KaiClient

Dear support team,

I tried to build a solution for testing DC based security with the help if the step by step under

https://galaktikasoft.com/documentation/xafari/security_dc_start_here.html

However I get an error when I start the solution:

An exception of type 'DevExpress.ExpressApp.Updating.CompatibilityException' occurred in DevExpress.ExpressApp.v14.1.dll but was not handled in user code

Additional information: The "Xafari.Security.Strategy.DC.IDCSecuritySystemRole" interface is not registered within the business model. To avoid this error, register the specified interface via the XafTypesInfo.Instance.RegisterEntity(string, Type, Type) or XafTypesInfo.Instance.RegisterSharedPart(Type) methods https://documentation.devexpress.com/#Xaf/DevExpressExpressAppDCITypesInfo_RegisterEntitytopic).

Can you please tell me why?
I attached my sample solition

Thanks a lot!

Kai

Attached files:

Replies

UserDescriptionPosted On
Tin-Kai

By the way:

I also tried to register in the setup block:

DCSecurity.RegisterSecurity()
DCSecurity.RegisterDCSecuritySystemRole()
XafTypesInfo.Instance.RegisterSharedPart(GetType(IDCSecuritySystemUser))

There I get another exception, which shows that the database needs to be updated. (But I deleted the old database and started a completely new one)

An error with number 1111 has occurred.
Error message: The database version is greater than the application version. The application needs to be updated. Please contact your system administrator or download a new version.
Additional information: the local version 1.0.5397.19270 of module 'SecurityModule' is smaller than version 14.1.6.0 in the database.

Thanks a lot!

Sasha (Xafari Support)Agent

Hello Kai,

To solve your first problem, you must register in the Setup block:

DCSecurity.RegisterSecurity()
DCSecurity.RegisterDCSecuritySystemRole()
DCSecurity.RegisterDCSecuritySystemUser()

or

DCSecurity.RegisterSecurity()
DCSecurity.Register().

Thanks, this document's mistakeĀ  we will fix.

To solve your second problem, you must rename your project Security(SecurityModule).

As simple: MySecurity.

Your project name conflicts with DevExpress.ExpressApp.Security.

Please, try this solution end let me know whether it suits you or not.

Regards, Sasha.

 

 

Tin-Kai

It works great! Thanks, Sasha!

× This ticket is closed.

Write US