Hosting Multiple Sites

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
2/24/2009 6:35:00 AM
Gravatar
Total Posts 72

Hosting Multiple Sites

Hi Joe,

A few questions re hosting multiple sites.  

1. Do you recommend a cheap or reasonable priced .net host that can handle mojoportal and multiple sites

2. If I host multiple sites, is it easy or a problem if in the future I needed to move one of those sites to a single mojo use scenario on a different server.  Can the data be transferred and the site?

3. How would web statistics packages like Woople work with multiple sites based on Host Names?  Does .Net keep seperate log files?

Cheers

 

 

 

 

 

2/24/2009 7:37:00 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

Hi Chris,

1. Any host that supports mojoportal should be fine but how many sites you can host and performance will depend on the robustness of the hosting package and the aggregate traffic of all the sites. I don't really have a report card for different hosts. Have heard some complaints about WebHost4ASP recently but used them in the past and they were decent. For shared hosting I currently use DiscountASP or CrystalTech, for dedicated servers I use 1and1.com. I'm in the 1and1 affiliate program so if you go with a dedicated server from them please click this link and I can get a little commission. I'm not an affiliate with any others, I just list hosts that I'm aware of that do host mojoportal.

2. It can be done, its not trvial but its not extremely difficult. You would backup the site file system and database and restore in a new location then delete unwanted sites from the db using Site Settings in the root admin site, then delete unwanted /Sites/[SiteID] folders. Probably would be best toi query around in the db and make sure all unwanted site data from other sites is gone.  Once upon a time joeaudette.com was running from the same installation as mojoportal.com but I separated them a good while back with this approach.

3. the IIS logs would include all sites traffic because its really all one site from IIS point of view. But google analytics and woopra work just fine because they don't rely on IIS logs they track to their own data from javascript. ASP.NET doesn't have any logging for web requests, its IIS that does the logging. The mojoportal log is also per installation so events/errors of all sites appear in the same mojoportal log. Only the root admin site has visibility to the mojoportal log via the UI.

I generally don't host different customer sites in the same installation (though some people do). I host multiple sites for the same customer that way sometimes. There is no good way currently to backup or restore a specific site from a multi site installation. If you restore the db its restores the whole db.

Hope it helps,

Joe

3/13/2009 7:29:50 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

Hi ,all

I'm new in mojoPortal

I have a question..

I create a website and i want to support 4 languages

I create a child site for admin site and in section Folder Mapp i mapped this to a physical folder each put in wwwroot/

I open the admin site with localhost/mojo

When open the child site i try localhost/mojo/mojoFrance (mojoFrance is folder mapped)

But is open a empty page!

And I use this in my web.config

<add key="UseCultureOverride" value="true"/>
<add key="site4culture" value="de-DE" />
<add key="site1culture" value="en-US" />

Can help me anyone?

Thanks and sorry for my english!

3/13/2009 7:36:30 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

Folder sites can only be 1 folder deep, so the admin site has to be at localhost, not localhost/mojo.

Hope it helps,

Joe

3/13/2009 7:41:54 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

Sorry I don't understand

Where i must placed the folder?

If open localhost/mojoFrance give me error: HTTP 404 - File not found Internet Information Services

The site created is in ~/Data/Sites/

In my mojoFrance I have only one file Default.aspx and is empty

 

Thanks,Valik

 

3/13/2009 7:48:47 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

Get the first site running at http://localhost not http://localhost/mojo

You may want to start with a clean db because you alreadty created url mappings for  /mojo/pagename.aspx

Start with a clean db, get the first site running at http://localhost, then create the folder site at http://localhost/mojoFrance/Default.aspx

If you want it to work with http://localhost/mojoFrance/ without the Default.aspx then you need to actually create a folder named /mojoFrance and put an empty text file there named Default.aspx

Hope it helps,

Joe 

3/13/2009 7:51:29 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

  My virtual folder on IIS is names "mojo" You say that I renamed whit localhost?

 

Valik

3/13/2009 7:56:10 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

No, I say point the root web site at the same folder where you have the virtual directory pointing at then delete the virtual directory. 

It can't work in a Virtual Directory the admin site must be a root web site.

3/13/2009 8:06:02 AM
Gravatar
Total Posts 55

Re: Hosting Multiple Sites

Our colleague named 111 maybe works with such Windows/IIS combo that doesn't support multiple web sites (like my Win XP / IIS 5.1 development machine). If that is a problem, this wonderful utility should solve it (for development purposes). Using it, you can have multiple web sites on IIS 5.1 with limitation that only one of them can be active in the same time. However, it's child's play to deactivate one site and activate another when needed.

3/13/2009 8:08:21 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

 What is a root website?

I created in IIS 5.1 in section Web Sites/Default Web Site/ one virtual dir for my first site

The next site created in mojoPortal was normalyy created from SiteSettings ,and mapped with mojoFrance folder

You say that i must create a new virtual directory in IIS?and point to my folder mapped?

Valik

3/13/2009 8:12:15 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

 

  Yes I use IIS 5.1 and Windows XP SP2

3/13/2009 8:39:19 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

In IIS on XP there is only 1 web site "Default Web Site" and there is a limitation that there can only be one web site because MS doesn't want you to use XP as a server, on a server you can create multiple Web Sites, or you can explore workarounds like Slaven suggested.

For using folder based sites in mojoPortal, the first site must be a root web site NOT a Virtual Directory. Currently you have a Virtual Directory named mojo that points to the folder where the mojoportal files live. You need to point Default Web  Site at that folder, right click Default Web Site and go to properties point  Home Directory to the mojoportal. Then the first site will work at http://localhost, which corresponds to Default Web Site.

Hope it helps,

Joe

3/13/2009 8:49:13 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

Ok I do this and now can open http://localhost

The next step is to make majoFrance virtual dir and point to wwwroot?

 

Thanks,Valik

3/13/2009 8:54:14 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

No, you don't need any Virtual Directory for the folder sites, once mojoportal is running at http://localhost just go to Administration Menu > Site Settings, see the dropdown near the site name, choose new site, create the site, then on the Folder Mappings tab create the folder mojofrance, now it will work you can visit the new site at http://localhost/mojofrance/Default.aspx, if you want it to work without the Default.aspx then create a folder beneath the root of the main site at /mojofrance using Windows Explorer. Put an empty text file there and name it Default.aspx

Hope it helps,

Joe

3/13/2009 9:16:41 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

 

   Thanks a lot ,Joe .It works ok

 

3/18/2009 3:15:36 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

Hi ,Joe

 To hosting multiple web sites in IIS 6.0 I must do the same thing like for IIS 5.1?

Thanks

3/18/2009 4:48:02 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

And the site settings I cannot edit from parent site?

In this moment the dropdownlist ddSiteList is not visible to child sites but into parent site .I didn't found this! Where is?

 

3/18/2009 7:25:30 PM
Gravatar
Total Posts 251

Re: Hosting Multiple Sites

Hi, the documentations says:

"If your hosting provider enforces a Medium trust policy, hosting multiple sites on 1 web installation will not work correctly"

My hosting is in medium trust policy, and i am running a tryout of multiple sites. It looks everything is ok, but, this is just a tryout, not public page, i don't have tried all of functions and many users at once; what will not work correctly?

3/19/2009 4:21:38 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

 

  Hi, Joe

  I work with multiple folders in mojoportal and created 3 folders for french,german and spanish

  When go to spanish localhost/es/home.aspx and try edit one html content give me this error:

  System.Web.HttpException: The file '/ServicEditorStyles.ashx' does not exist.

 You can tell me how resolve it?

Thanks,Valik

3/19/2009 7:32:59 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

This is a bug that has been fixed if you upgrade to version 2.2.9.5

Best,

Joe

3/19/2009 8:41:57 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

I cannot fixed for my version 2-2-8-6?

I must found a solution in this version..

Valik

3/19/2009 9:14:40 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

If you have the 2.2.8.6 source code you can copy the newest version of Web/Components/UrlReWriter.cs to get the bug fix and then produce your own build.

Other than that the only way to get bug fixes is upgrading.

3/20/2009 7:13:45 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

I work directly with mojoPortal-2-2-8-6-mssqlreleasefiles

Can here to do something?

I have the source code and I open the .cs file but what to do with this?

Valik

3/23/2009 4:14:14 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

Hi,

 When I use IE7 browser give me js errors .One of this is on this line

$('div.yui-navset').each(function(n){var myTabs = new YAHOO.widget.TabView(this.id);}) and tell me "Syntax error"
I look in web.config and line <add key="CombineJavaScript" value="false"/> look like here.

Another is "null is null or not a object" and go to the same line like the first error

Can help me anyone?

3/23/2009 7:38:06 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

Hi,

The YUI scripts and the jQuery scripts are loaded form the internet using the google CDN (Content Delivery Network). So if your machine is not connected to the internet you may get script errors because it can't load the scripts. Its possible (but not trivial) to download the needed scripts and then host them from within the mojoportal site, but it takes some configuration and understanding of mojoPortal. 

That combine javscript was something I experimented with but it did not work well, it should be left as false. The scripts are not combined, they are loaded from the google cdn.

Hope it helps,

Joe

3/23/2009 7:50:16 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

But for firefox is not appear this js errors and i have connection to internet!!

But CDN (Content Delivery Network) how obtain it? Is a service or what?

Thanks,Valik

3/23/2009 7:55:15 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

I don't get this error in IE 7. Sometimes if you have script debugging enabled in IE you may get some errors that you would not get with standard settings.

Google CDN just means google hosts the js files and we load them from a google url.

Hope it helps,

Joe 

3/23/2009 7:59:10 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

You are right Joe I have enabled script debugging in my browser!

When disabled it works!

For the future your recomadation is to work with debugging disabled? If I need debug a js files created by just ignored this error?

Valik

3/23/2009 8:07:52 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

Yes, I think sometimes the IE debugger shows errors that don't happen normally. A while back I was using Microsoft Gatineu (their answer to google analytics) and even the script for tracking using the MS service was causing erros with the IE debugger enabled. I leave it disabled but enable it if I need to use it then disable it again after. If I see errors unrelated to what I'm debugging I ignore them.

3/24/2009 4:31:14 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

Hi Joe,

You can tel me please why it is happens:

If i want to edit a url for a page. Per example i have a page named Product,but I don't know when i saved the first time it put the url Default.aspx?PageId=5; and I want that the url be named product.aspx.But when I try to edit the page the url is not applyed,but it changed in database.I don't have other page named Product.

Valik 

 

3/24/2009 11:26:31 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

It won't allow duplicate urls. If it won't let you use the url you want then you may need to look in Administration Menu > Advanced Tools > Url Manager and find if another page is usingthe url or if it is orphaned somehow then delete it so you can use it again. You may also want to look under Advanced Tools > 301 Redirect Manager to make sure its not redirecting.

Hope it helps,

Joe 

3/25/2009 8:44:23 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

Hi, joe

I resolved edit url when remove from url manager the broken links. Thanks for help!

I have another questions:

1. Is there an interface on the database to do some filters? For example, display all users registered on newsletter for the last month and who are corporate users. (I have a custom module Newsletter that saved into new table created by me all addresses. )

2. How can I make a dump of the database ?(export ...)

3. What pages are indexed for search control? If i want that one page each is not visible to users do not show works?

4.a. Each time a user is requesting a page, a request to MoJo database is done to build the page – can I have a cache mechanism, that updates the page every 10 min or every hour for example?

5.Can I detect IP from each  user logged in?

Regards,Valik

 

3/26/2009 6:32:46 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

Hi Joe ,

You can  respond to my yesterday post? I need it! :)

Thanks,

Sorry for insistently! 

3/26/2009 7:05:35 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

I don't like it when people ask a bunch of questions on a thread with an unrelated topic or change the topic after I answer.

1. No, if you need something custom you have to implement it.

2. All database platforms have their own tools for backup and restore of databases, its not needed to iimplemnt it in mojoPortal. Maybe someday we will implement import and export to makwe it possible to move from on db plaform to another but its not a hihg priority.

3. If a user searches they only see results if they are in a role with permission to view the page, result are filtered according to the user's roles.

4. You can enable caching at the module level, click the gears next to the title of the module. It works well for Html module but not for any module that does postback or uses ajax so use it with caution if you do use it. For most installations in shared hosting you don't have enough memory available and if you start caching too much it will run out of memory and recycle the app frequently. Caching should only be used to solve a perfomance problem for a site that gets a lot of traffic an is under heavy load. It is disabled by default because it can be problematic to use it. To enable it you need to add this to user.config or Web.config

<add key="DisableContentCache" value="false" />

5. By default we already trackuser ip addresses, you can see it if you click the gear next to a user name on member list to get to user management, then look on the location tab to see ip addresses the user has used.

Hope it helps,

Joe

 

3/27/2009 9:31:10 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

Sorry Joe for precedent post ,but I post to topic General Questions !

Again about mojo :)

I can use IP address for locate country for a user?

How obtain ip address in code

Thanks,Valik

 

4/13/2009 7:42:21 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

Hi Joe,

 I don't know why you don't respond me on latest posts you have a problem with me?

Sorry if I upsed you but i'm not a person with solid knowledge about asp and cms!

I want to learn!

please give me answer for this...

4/13/2009 7:57:05 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

Hi Valik,

No I don't have any problem with you, but please understand I'm very busy and I can't help everyone learn ASP.NET. I help as much as I can, I try to help everyone who has installation problems or bugs but I cannot answer every question that developers ask or every general question. So many people ask big questions that I could spend my whole day answering them. I am not yet even making a living off of my work so I have to stay focused on getting my own work done.

You can get the user's ip address like this:

string userIp = Request.ServerVariables["REMOTE_ADDR"];

With a little googling you could have found this answer yourself.

There is nothing yet in mojoPortal to determine the user location from ip address, but it is possible to do it. One way is using 3rd party data from various vendors, the one I've looked at is ipligence. They have free data that could be imported and used to associate a geographic location with an ip address, they also have more detailed data if you pay money. Google for "ip address geolocation" for more info. I created the mp_UserLocation table based on the idea of using the data from ipligence, but I never finished it.

There are other ways of doing it as well using various services including google, this blog post by Scott Hanselman has some info on that. 

At some point I will use one of these strategies to build it into mojoPortal so we can capture user locations and plot users on a map, but its not my top priority.

Best,

Joe

 

4/13/2009 8:03:23 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

And also you will find you get more help if you ask 1 question per thread as I said before and make the topic be related to the question. This helps everyone because now if someone searches mojoportal site for "ip address, location", now the result for this thread will say "Hosting Multiple Sites" which is not related at all to the question so the user may not click that result and yet this thread now has the answer.

But still I can't answer every single question, I'm just telling you I'm more likely to answer questions if you post 1 question per thread.

Best,

Joe

4/13/2009 8:09:16 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

Thanks for answer Joe,

I understand that you say!

For the future I wil ask you only problems related to mojoportal! One of them is :

I add in source code a new folder for MycustomModules and create a CartUserControl.ascx and CartsiteModule.ascx(like it is propose in heloo word example from mojoportal documentation).

I want to separate code by the tags and put the all c# code in code behind.I do this and click on build in release mode.

But give me errors: The labels (i have two labels on acsx) is not recognized in ascx.cs file.

The same things i do for release files project and work ok.But here I have <script runat="server"> tag where put the code in ascx.

Maibe is problem with this:<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CartUserControl.ascx.cs"  Inherits="MyCustomModules_CartUserControl" %> ?
 

In release files i have :<%@ Control Language="C#" AutoEventWireup="true" ClassName="CartModule.ascx" Inherits="System.Web.UI.UserControl" %>

Regards,

 Valik

4/13/2009 8:13:46 AM
Gravatar
Total Posts 18439

Re: Hosting Multiple Sites

You are not hearing what I'm saying, I'm not going to tell you again, your new question has nothing to do with this thread, you keep asking new questions on an unrelated thread. If you have a new developer question you should start a new thread in the developer forum and quit asking more questions on this thread.

 

4/13/2009 8:18:42 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

  Sorry i write the latest post before see it you post with new topics.

  I will move this on 'create custom modules' topic it is ok?

4/13/2009 8:22:41 AM
Gravatar
Total Posts 98

Re: Hosting Multiple Sites

My new topic is "create custom modules in source code ,build in release mode and use it in project with release files"
in developer forum :)

Thanks for patiens!

4/19/2012 4:38:27 PM
Gravatar
Total Posts 17

Re: Hosting Multiple Sites

 

 Hi Joe,

 

mojoPortal - 2.3.8.1 MSSQL

Operating System - Microsoft Windows NT 6.1.7601 Service Pack 1

ASP.NET v4.0.30319 Running in Full Trust

 

I've created a Multiple Sites solution with this version.

I've done with based on Folder Names like says in your page Hosting Multiple Sites Based on Folder Names,

In development environment the web sites work fine.

Today i've published the site to production and site number 2 ( /en/home.aspx ) is not working.

The production server is a hosting service.

In log4net says "The file '/en/csshandler.ashx' does not exist."

Do you know to solve this? any idea?
Thanks

 

I've created a Multiple Sites solution

4/20/2012 6:27:08 AM
Gravatar
Total Posts 17

Re: Hosting Multiple Sites

I found a solution.

 copy the csshandler.ashx file to the folder /en/

Thanks

5/23/2012 4:53:49 AM
Gravatar
Total Posts 3

Re: Hosting Multiple Sites

All done! Correct solution for me here! Thank!

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