Multiple Sites In Medium Trust Environment

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
1/29/2009 12:12:03 PM
Gravatar
Total Posts 25

Multiple Sites In Medium Trust Environment

 Hi,

Had a quick question about an issue I am having. I have tried to install mojoPortal in a medium trust environment and have not been able to get to the second site I created when trying to run as a multisite business model. I see that the folder was created for the site and that the contents of the site, call it siteid=2, have all properly copied over. (Skins...etc...) I then added added a folder mapping called site2 and the mapping was saved correctly, but when I try to access the site as, www.talkwithfamily.com/site2/Default.aspx. I got a page not found error. I have since read that you don't think multiple sites should be used under a medium trust environment and I was curious why this is, and is there any way I can get around the issue. Typically mojoPortal with my pages is around 200mb (Just on disk), so if I have 100's of sites this would really take a lot of space.

 also for some reason when I hit www.talkwithfamily.com it redirects to talkwithfamily.com/mojo 

Note: mojo is the root folder name.

Thanks, joe2 ;)

1/29/2009 1:14:48 PM
Gravatar
Total Posts 18439

Re: Multiple Sites In Medium Trust Environment

If you create a folder named mojo on your host and it has the mojoportal files then mojoportal is not running in the root of the site unless you have full control of the server and have pointed the site root to that folder. For folder based sites the first site must run in the absolute root, it can't work using folders if its not running in the root. Only other reason it might append /mojo to the url is if you populated the database on a different machine like localhost/mojo then moved it to hosting. I don't recommend that.

Multi site issues in medium trust are mainly going to be the search index may not work correctly because the setting required for lucense lock directory is the same across sites. Because VirtualPathProvider doesn't work in medium trust all sites will use the same theme.skin file coming from App_Themes/default but this should not be too much of a problem because we mainly just use css and not themes to set style properties.

Hope it helps,

Joe

1/29/2009 2:02:24 PM
Gravatar
Total Posts 25

Re: Multiple Sites In Medium Trust Environment

 Ah, yes that makes sense. So given the folling information, what would be the best way to host multiple sites under one install/mysql db.

1.) Medium Trust.

2.) Root folder being d:/somefolder/somefolder/mymojo

3.) I can host unlimited domain names. Though its a pain to go in and set them up. (Need more real time creation)

     Also don't mind having www.somesite.com/somesubsite or www.somesubsite.somesite.com

 

Would the best/only option be "Hosting Multiple Sites Based on Host Names"?

1/29/2009 2:30:27 PM
Gravatar
Total Posts 18439

Re: Multiple Sites In Medium Trust Environment

As far as I know the issues under medium trust are the same for folder based or host named based sites.

Possible theme issues.

Probable search index issues. Because of the lock directory setting I "think" all sites would write to the same search index and therefore searching in any site will find pages in other sites. Not 100% sure of this, if anyone has time to test and confirm this it would be helpful. You could live without the search feature and remove the search link from layout.master file of skins and delete the /SearchResults.aspx page to mitigate this. I've made a note to myself that I should implement a web.config setting for disabling search that would automatically remove the search link and disable the search page. I will try to get that done in the next version.

The file system path is irrelevant. What is relevant is that the IIS web site points to the folder where mojoportal files are, not to a folder above it.

Other than medium trust issues which I believe are the same in both scenario, folder based vs hostname based sites have various pros and cons as discussed in the documentation, such as with folder based sites you could secure all sites with a single SSL certificate because they share the same domain.

Hope it helps,

Joe

1/29/2009 2:36:21 PM
Gravatar
Total Posts 18439

Re: Multiple Sites In Medium Trust Environment

It sounds to me like your site is really running in a virtual directory name /mojo, not in the root of the site but your host has some method where they route a domain directly to it as if it were the root site, but this isn't going to work. mojoportal knows it is running in the /mojo folder not the root in spite of the host trickery.

mojoPortal must run as a root web site to support folder based multi sites and the first site will correspond to the root url.

You "could" run host name based multi sites in a virtual directory like /mojo but doing that you would really miss ou on the benefit of host named sites because each site will still run from the /mojo folder so it will be host1/mojo, host2/mojo. So really for any mutli site installation you need mojoPortal running in the absolute site root.

Hope it helps,

Joe

1/29/2009 3:38:38 PM
Gravatar
Total Posts 25

Re: Multiple Sites In Medium Trust Environment

All good. Thanks Joe,

 

I was able to get multi sites working by just using host names. I will create a bot to set these up. The downside is that my hosting provider takes about an hour to get it configured after I do my part, but I will live with it for now and just handle it by email, it gives me a chance to oversee who is creating what anyway.

Thanks, Joe2

4/13/2009 5:48:44 AM
Gravatar
Total Posts 32

Re: Multiple Sites In Medium Trust Environment

Hi joe

I have 2 different sites like www.abc.com & www.def.com, with multiple sites with different Host Name,
I have added the Host name as above in site settings,

Please let me know what are other setting to be done so that 2 different sites should work indepedently
with single server and single Database, I have read the document of Multiple sites from mojoportal

Thanks ( JOE )

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