MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Multitenant Application  (Mono Support )

Viewed 51823 time(s), 46 post(s) 2/11/2014 5:18:06 AMby Dinesh.Sajwan
Dinesh-Sajwan

Dinesh.Sajwan

2/12/2014 11:15:12 AM
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
This content has not been rated yet. 
1284 Reputation 156 Total posts
inanc

inanc

2/12/2014 11:20:35 AM
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
This content has not been rated yet. 
469 Reputation 60 Total posts
Dinesh-Sajwan

Dinesh.Sajwan

2/12/2014 12:53:38 PM
Hi,

Please share the solution?

Regards
Sumit
This content has not been rated yet. 
1284 Reputation 156 Total posts
inanc

inanc

2/12/2014 12:59:06 PM
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
This content has not been rated yet. 
469 Reputation 60 Total posts
idrazic

idrazic

2/12/2014 1:14:00 PM
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
This content has not been rated yet. 
1384 Reputation 152 Total posts
Dinesh-Sajwan

Dinesh.Sajwan

2/12/2014 1:13:55 PM
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
This content has not been rated yet. 
1284 Reputation 156 Total posts
inanc

inanc

2/12/2014 1:56:09 PM
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
This content has not been rated yet. 
469 Reputation 60 Total posts
khorvat

khorvat

2/12/2014 2:30:55 PM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts
idrazic

idrazic

2/12/2014 2:37:29 PM
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
This content has not been rated yet. 
1384 Reputation 152 Total posts
Dinesh-Sajwan

Dinesh.Sajwan

2/12/2014 2:46:00 PM
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
This content has not been rated yet. 
1284 Reputation 156 Total posts
1 2 3 4 5