RelatedSitesMode and Medium Trust (foldersite)

This is a place to discuss how to adapt mojoPortal to the needs of different cultures. Before asking questions here please first review the localization documentation.

This thread is closed to new posts. You must sign in to post in the forums.
5/10/2011 12:21:08 PM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

RelatedSitesMode and Medium Trust (foldersite)

Hi Joe,

Whenever I'm asked to design a multilanguage site based on mojoPortal, I proceed with the standard approach suggested by the documentation.

I set up the main site (Site ID = 1) for the primary language and then set user.config as follows:

   <!-- ******* multi site installation settings -->
    <add key="AllowMultipleSites" value="true" />
    <add key="UseRelatedSiteMode=" value="true" />
    <add key="RelatedSiteID" value="1"/>
    <add key="RelatedSiteModeHideRoleManagerInChildSites" value="true"/>
    <add key="UseFoldersInsteadOfHostnamesForMultipleSites" value="true"/>
    <!-- ******* end multi site installation settings -->

Then I create a second site (Site ID = 2) to host the secondary language content, set the site2 folder mapping to a "/lang2" folder containing an empty "default.aspx" file and finally update user.config to force the requested culture for each site.

    <!-- ******* culture settings -->
    <add key="UseCultureOverride" value="true" />
    <add key="site1culture" value="it-IT" />
    <add key="site1uiculture" value="it-IT" />
    <add key="site2culture" value="en-US" />
    <add key="site2uiculture" value="en-US" />
    <add key="DefaultCountry" value="IT"/>

The problem is that my customer's hosting space is on a provider service which enforces a Medium Trust Policy therefore the second site does not work correctly as it does in Full Trust.

In documentation at url: http://www.mojoportal.com/muliplesites.aspx it is suggested that

If your hosting provider enforces a Medium trust policy, hosting multiple sites on 1 web installation will not work correctly but you can still use 1 database as long as you have separate physical web installations at the same host.

How should I set up the second site in another installation to share users, roles etc. with the first site and keep page hierarchy and contents separate?

How is file Manager affected ?

Regards.

Diego

 

5/10/2011 12:29:18 PM
Gravatar
Total Posts 18439

Re: RelatedSitesMode and Medium Trust (foldersite)

Hi Diego,

What specific trouble are you having in Medium Trust?

As far as I recall the problems are mainly related to the problem with theme.skin file under .NET 3.5 Medium Trust, but this is not a problem under .NET 4.

The idea to use a separate installation but the same db is not going to work with folder sites, it could work with host name based child sites.

Best,

Joe

5/10/2011 12:40:12 PM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Re: RelatedSitesMode and Medium Trust (foldersite)

Joe,

The problem is that after setting up the second site, when I click on the flag link of sithe 1 to visit site 2 it I correctly shows the home page of site 2 but my user is not recognized.

I still have to login as admin@admin.com.

When I log in and visit Site (2) Settings I can see the list of default logos but not the custom ones I have uploaded to show in the site header.

If I use File Manager and click on any folders I get an error: "Error occurred while loading file list."

5/10/2011 12:46:38 PM
Gravatar
Total Posts 18439

Re: RelatedSitesMode and Medium Trust (foldersite)

Hi Diego,

I will look into these issues and see if I can reproduce them. If I can produce the problems I will try to fix that for the next release.

Best,

Joe

5/11/2011 7:53:49 AM
Gravatar
Total Posts 18439

Re: RelatedSitesMode and Medium Trust (foldersite)

Hi Diego,

In my testing with related sites mode and folder child sites, when I log into either site it logs me into all sites.

I was able to reproduce the problem with the file manager. I can fix this for the next release, but I think you can work around it by creating a text file at

/lang2/Services/FileService.ashx

and put this as the content of the file:

<%@ WebHandler Language="C#"  Class="mojoPortal.Web.Services.FileService" %>

Best,

Joe

5/11/2011 9:06:32 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Re: RelatedSitesMode and Medium Trust (foldersite)

Thanks Joe,

as you found no problems in logging into both Sites with same users I had a second check on my user.config statements and I found a mistyping error in <add key="UseRelatedSiteMode" value="true" /> therefore in the end it was my fault. (Sorry ! blush)

For the File Manager issue,  I successfully added the suggested workaround file in Site2 folder (English). Now it works.

Nevertheless, the top link to the "Alternate File Manager" (/Dialog/FileManagerAltDialog.aspx) opens a window on Site1 (Italian) Folder instead of Site2 (English) Folder.

Thanks again.

Ciao. Diego

 

5/11/2011 10:58:22 AM
Gravatar
Total Posts 18439

Re: RelatedSitesMode and Medium Trust (foldersite)

Hi Diego,

Thanks! I will fix the link for the next release, I have fixed it in my copy already.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.