Mono Support Multitenant Application 

Viewed 117918 time(s), 46 post(s), 2/11/2014 5:18:06 AM - by Dinesh.Sajwan
2/12/2014 11:15:12 AM
1284 Reputation 156 Total posts

Hi Idrazic,

Thanks for the response

1. Can you please tell me what are the bugs and what are their impact. hope there is no data loss or security issue as in one app data is visible to other app user
2. How to insert data of other application. if we use the same installer then it will insert the data of other application intelligently (as i have seen the scripts in the installer application name and application id is hard coded) 

please guide.

PFA a script from import folder where application id is hardcoded.

Regards
Sumit

11
2/12/2014 11:20:35 AM
469 Reputation 60 Total posts

Hi,
Would you mind telling it step by step please. Multi-tenancy is an important topic. Could you please explain it step by step please. Method of trial and error is very frustrating.

Regards

12
2/12/2014 12:53:38 PM
1284 Reputation 156 Total posts

Hi,

Please share the solution?

Regards
Sumit

13
2/12/2014 12:59:06 PM
469 Reputation 60 Total posts

Dear Dinesh,
Please help me a little bit . In the blog post Hosting multiple applications in MonoX , there are 2 classes named 

i) DynamicApplicationModule 
ii) DynamicMembershipProvider 

respectively.


Should I  use them to construct an  IIS module  as stated in here or should i use them in MonoX ver. 4.9 application?
Because in the first class it was said that 

 /// <summary>
/// You will need to configure this module in the web.config file of your
/// web and register it with IIS before being able to use it. For more information
/// see the following link: http://go.microsoft.com/?linkid=8101007
/// </summary>

and can you say how to configure this module in Monox's web.config ?



Regards

Inanc

14
2/12/2014 1:14:00 PM
1384 Reputation 152 Total posts

Hello,

Like I said in my previous post, use new installer to add new application entries.
So run it from start to finish and select the option outlined in the attached image.
Afterwards you can continue working with v4.8 .

Regards,
Igor

15
2/12/2014 1:13:55 PM
1284 Reputation 156 Total posts

Hi Inac,

Though i haven't implemented the complete solution yet but will share what i have done so far.
Still waiting reply from monox guys!!

Step1.
Create a http module and on init event override beginrequest. in beginrequest set the applicationname in context.Items["ApplicationName"].
Step2:
Register the module on portal by adding this line under httpmodules
<add name="ApplicationName" type="SetApplicationNameDynamically.SetApplicationName, SetApplicationNameDynamically"  />
Step3:
Add the same line mentioned above under <modules runAllManagedModulesForAllRequests="true"> section
Step4:
 Do the changes in RoleProvider, PersonalizationProvider and MembershipProvider as explained in http://www.mono-software.com/blog/post/Mono/35/Hosting-multiple-applications-in-MonoX/ 
Step5:
Now host the application in 2 different url.
Step6:
Run the app. 

Issue: the application will run fine from one URL but will give run time error from another URL.

Hope this help you.

Regards
Sumit

16
2/12/2014 1:56:09 PM
469 Reputation 60 Total posts

Hello,
Thanks for you  both "Dinesh.Sajwan" and "Idrazic" .
Yes I reviewed Irazic's previous post. I had overlooked the content in that post. There is a new  advanced option in the Monox installer in order to install new application entires. This is really interesting. But I wonder the case that I am gonna try to explain.

Please assume that we have a Monox portal  already running. In that case, am i gonna able to add a entry?
and Idrazic points an important by saying that ;

I think we have a little misunderstanding here.
The database setup part for additional applications is required. !

So in order to have a multi-tenant MonoX site I should have multiple databases? Is that true?

Thank yor very much for your concern.
Regards

17
2/12/2014 2:30:55 PM
15993 Reputation 2214 Total posts

No, you need to have multiple application entries in one database and that you can accomplish with the MonoX installer.
"So in order to have a multi-tenant MonoX site I should have multiple databases? Is that true?"

Regards

18
2/12/2014 2:37:29 PM
1384 Reputation 152 Total posts

No, you don't need multiple databases, and running installer on a database already in use is fine.
By "database setup" I meant that installer adds new entries to "aspnet_Application", "aspnet_Users" etc. tables

19
2/12/2014 2:46:00 PM
1284 Reputation 156 Total posts

Hi,

Can we extract the insert scripts from the installer as that would be more feasible to validate and run on production environment. 

Regards
Sumit

20
1 2 3 4 5
This is a demo site for MonoX. Please visit Mono Software for more info.