Current filter:
                                You should refresh the page.
                                  • Hi,

                                    I'm using the SecuritySystem in a non Xaf  Win application. My application is like a console used by the user to connect to different system with different account.
                                    So it is multi user and each user has a dedicated connection, session and a dedicated security system which could be connected  to different databases.
                                    My question is about SecuritySystem.Instance, since the property istance is static, it is shared by all user accounts and it is not correct behavior in my scenario. Is there a way to not use the static instance?



                                1 Solution

                                Creation Date Importance Sort by

                                Hello Davide,

                                Thank you for contacting us. The SecuritySystem.Instance property returns a value obtained from the ValueManager class. This architecture allows us to use the same code in applications based on different platforms - WinForms, ASP.NET, WCF. For instance, ASPSessionValueManager stores values in HttpSessionState, so each user has its own value storage.

                                >> each user has a dedicated ..., session
                                You can create your own ValueManager based on the session, implement the IValueManager interface, and register your class using the static ValueManager.ValueManagerType property at the application startup.

                                ValueManager.ValueManagerType = typeof(MultiThreadValueManager<>).GetGenericTypeDefinition();

                                For more information on MultiThreadValueManager, refer to About MultiThreadValueManager and
                                Additionally research this and other default implementations within the XAF source code: HttpContextValueManager, WcfInstanceContextValueManager, SimpleValueManager, ASPSessionValueManager.
                                I must emphasize that these APIs are internal and undocumented and can be changed without notice in the future.

                                • David Desiderà 11.26.2018

                                  Thanks Uriah,

                                  I created my custom "MultiSession" value manager. It seems working correctly.

                                • Andrey K (DevExpress Support) 08.21.2019

                                  We’re doing our best to explain the XAF security system and how it can be used in non-XAF .NET apps powered by XPO.
                                  Please check our new WinForms CRUD demo and tutorial and updated Console and ASP.NET Core Web API/OData v4 + DevExtreme non-XAF apps.