Current filter:
                                You should refresh the page.

                                1 Solution

                                Creation Date Importance Sort by

                                Hello Gary,

                                Yes, this solution is still valid for v18.2.4 with some minor adjustments. Which specific errors did you receive? When this diagnostic information is available from the very beginning, we will be able to provide solutions much faster.

                                I downloaded the v16.2.3+ from GitHub and upgraded it using the Project Conveter tool. There were no compilation errors and the app ran fine. Only, custom dialogs were not editable and caused data validation errors as in the following screenshot:

                                To make it work for v18.2, modify your code as per this Breaking Change detailed in our What's New documentation: https://www.devexpress.com/bcid=BC4471.

                                In particular, I modified the SecurityExtensionsModule.Setup method (Security.Extensions\Module.cs) as follows:

                                [C#]
                                public override void Setup(ApplicationModulesManager moduleManager) { base.Setup(moduleManager); if((Application != null) && (CreateSecuritySystemUser != null)) { SecurityStrategyComplex securityStrategy = Application.Security as SecurityStrategyComplex; if(securityStrategy != null) { SecuritySystemUserType = securityStrategy.UserType; // Dennis: Changes for v18.2 (https://www.devexpress.com/bcid=BC4471). securityStrategy.AnonymousAllowedTypes.Add(typeof(RestorePasswordParameters)); securityStrategy.AnonymousAllowedTypes.Add(typeof(RegisterUserParameters)); securityStrategy.AnonymousAllowedTypes.Add(securityStrategy.UserType); securityStrategy.AnonymousAllowedTypes.Add(securityStrategy.RoleType); } } }

                                After that, the application functioned as expected (refer to the attachment). Taking a chance, I also migrated the old example's code to NonPersistentObjectSpace (see the changed ManageUsersOnLogonController.cs and LogonActionParameters.cs files).

                                If you use the new permission policy, you may also modify the example's code to use PermissionPolicyUser instead of SecuritySystemUser. I hope you will complete this part yourself using the existing online documentation and demos. Thanks.

                                Show all comments
                                • Dennis (DevExpress) 01.08.2019

                                  Gary,

                                  While we are at it, I would greatly appreciate it if you describe your client requirements in greater detail:

                                  1. Did you consider the recommended How to: Use Google, Facebook and Microsoft accounts in ASP.NET XAF applications (OAuth2 authentication demo) solution as an alternative? If this does not meet your needs, please clarify why.
                                  2. How is your Web app published and used within the organization (for instance, Intranet or public usage; how many end-users access it, etc.)?
                                • Customer9240 01.08.2019

                                  Hello Dennis,

                                  Thanks, I will try your solution and feedback later.

                                  1. We want to build a CRM system using XAF Web. Our customers can login to query some orders / manufacturing status, dashboard, reports, ticketing, etc. However, most of our customers are located in mainland China which most of them may not have Google/Facebook accounts, may be they have QQ/Baidu/WeChat accounts. So finally, for both overseas or mainland China, we are more comfortable with the register/forget password approach.

                                  2. The Web app should be used within organization (intranet) and also allow our customers to access (internet). So, we will use the mixed mode authentication (How to: Allow a user to select the authentication type at runtime).

                                  - Internal Users use Active Directory (probably the CS, PD, ME Department, etc)
                                  - Customers use Standard Authentication (So, we need register / forget password or our CS team should register the accounts for new customer manually)

                                  I think end users < 100.

                                  Thank you so much!

                                  Best Regards,
                                  Gary

                                • Dennis (DevExpress) 01.09.2019

                                  Hello Gary,

                                  Thank you for your update! Let me know if you experience any difficulties with this custom-tailored implementation.

                                  >>most of our customers are located in mainland China which most of them may not have Google/Facebook accounts, may be they have QQ/Baidu/WeChat accounts.

                                  I just wanted to explicitly clarify that QQ/Baidu/WeChat must also support OAuth2 and thus the example's solution can be used with them. It will just require you to implement a .NET connector library or find a ready one in the community, for instance: https://www.nuget.org/packages?q=Tags%3A%22OAuth%22

                                • Customer9240 01.09.2019

                                  Dear Dennis,

                                  Thanks, the solution works. The dialogs are editable and new Permission Policy is also OK.

                                  We will also add How to: Use Google, Facebook and Microsoft accounts in ASP.NET XAF applications (OAuth2 demo) later.

                                  Thank you very much!

                                  Best Regards,
                                  Gary

                                • Dennis (DevExpress) 01.10.2019

                                  I am happy to hear of your results, Gary!

                                • Bobby Shreeves 1 09.12.2019

                                  Dennis,

                                  Given all of the breaches we've seen with social media services, I'm just curious why you would recommend OAuth2 services over your own code?

                                • Dennis (DevExpress) 09.13.2019

                                  Hello Bobby,
                                   
                                  To be honest, I have not seen XAF customers who used Facebook logins in their business apps (I think you primarily refer to this platform). I also do not think that the source of these breaches relates to OAuth2 itself (I may be missing public information on this though).
                                   
                                  We created the new example with OAuth2 authentication based on customer requests for Office 365, Azure AD authentication - and it is getting more popular recently. For instance, 43% of respondents in our recent https://community.devexpress.com/blogs/xaf/archive/2019/07/17/xaf-using-xaf-security-system-apis-in-non-XAF-net-apps-powered-by-xpo.aspx survey were interested in these particular providers and even Facebook and Google. The primarily reason (besides the organization requirements) is that these systems provide services for managing users (e.g., register and delete users, reset forgotten passwords, 2FA), documents, apps and other things within an organization using standard and familiar for business people means.
                                   
                                  Please let me know if we can help you address your requirements with a simple logon form and password and DevExpress components.