简体   繁体   English

多租户asp.net mvc2

[英]multi-tenancy asp.net mvc2

I need to develop a multi-tenant website like 我需要开发一个多租户网站,例如

sample1.mysite.com sample2.mysite.com sample1.mysite.com sample2.mysite.com

Hold on! 坚持,稍等! No, this is a different problem from what you are thinking; 不,这与您的想法不同。 and before giving me link to another question, please read through. 在给我链接到另一个问题之前,请通读。

The only difference in this kind of multi-tenancy is that the target site will remain the same. 这种多租户的唯一区别是目标站点将保持不变。 Only the content/data will be filtered depending on the host site. 根据主机站点,仅内容/数据将被过滤。 I do have a partition key for each of these tenant sites. 对于每个租户站点,我确实都有一个分区键。

www.mysite.com >> all data, specific content files (like css, images) sample1.mysite.com >> data specific to sample1, different content files www.mysite.com >>所有数据,特定的内容文件(如CSS,图像)sample1.mysite.com >>特定于sample1的数据,不同的内容文件

Need to know best practices regarding this. 需要了解与此相关的最佳做法。

Actually, just recently I found this article : http://archive.msdn.microsoft.com/aspnetmvcsubdomains 实际上,最近我才发现这篇文章: http : //archive.msdn.microsoft.com/aspnetmvcsubdomains

This solves the problem so far, I have tested it (also, tested the cache per domain) and it seems to work just perfect. 到目前为止,这已经解决了问题,我已经对其进行了测试(还对每个域的缓存进行了测试),并且看起来工作得很完美。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM