After upgrading to 2.9.2.0 MSSQL user not getting correct roles in related sites

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

9/24/2025 1:03:25 PM
Gravatar
Total Posts 137

After upgrading to 2.9.2.0 MSSQL user not getting correct roles in related sites

I've upgraded a multi-tenant site (hostnames) to 2.9.2.0 MSSQL successfully. Everything seems to be working, using framework skin for now, except that when I log in to any site other than the master site for users and roles, I get no permissions.  The admin menu icon does nothing, and I cannot get to any protected pages. It's like the roles are corrupted or something. Quite a major problem!

I have these settings:

    <add key="UseRelatedSiteMode" value="true"/>
    <add key="RelatedSiteID" value="2"/>
    <add key="RelatedSiteModeHideRoleManagerInChildSites" value="true"/>

In site 2 I can login in fine as an Administrator and everything works fine. In any other tenant it's broken.

I have tried restarts/recycles. I have cleared all cookies, but no change.

I have tried both with previous machine key and with a newly generated one.

I really don't want to have to roll back, but I might have to if this cannot be solved... any suggestions? Is this feature definitely working in 2.9.2.0?

Thanks!

 

9/24/2025 1:16:38 PM
Gravatar
Total Posts 137

Re: After upgrading to 2.9.2.0 MSSQL user not getting correct roles in related sites

Ok, I've discovered that if I edit the roles cookie on one of a broken tenant to the value of the roles cookies from the working master site, everything starts working - I immediately get an administration menu etc.

e.g. I edit value of cookie mybadsite.comportalroles to the value copied from cookie myrootsite.comportalroles then my admin account in mybadsite.com starts working.

So this cookie is being created incorrectly.

Any suggestions please?

 

9/24/2025 1:46:58 PM
Gravatar
Total Posts 137

Re: After upgrading to 2.9.2.0 MSSQL user not getting correct roles in related sites

I'm seeing there were lots of changes in the relevant area about 9 months ago: https://github.com/i7MEDIA/mojoportal/blob/c815fab76c4c7a18c7d1ebccbbdfdfbe7622e9ad/Web/Components/mojoRoleProvider.cs

 

9/24/2025 6:37:39 PM
Gravatar
Total Posts 2262

Re: After upgrading to 2.9.2.0 MSSQL user not getting correct roles in related sites

Hi Crispin,

We have a fix for this and will release it asap.

Thanks,
Joe

9/26/2025 2:50:46 AM
Gravatar
Total Posts 137

Re: After upgrading to 2.9.2.0 MSSQL user not getting correct roles in related sites

I can confirm the 2.9.2.1 hotfix release fixed this issue - thanks!