具有单个数据库,单个代码库的多个站点 [英] Multiple Sites with single databse,single code base

查看:69
本文介绍了具有单个数据库,单个代码库的多个站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,

在开发新的Asp.net项目时,我需要您的大力帮助.

我有3个网站Site1,Site2,Site3在各自的代码库中运行.数据库.

所有都是具有3个角色的求职门户,即管理员,雇主,求职者.

现在,我的要求是对所有站点都使用单一代码库,即单一数据库".

意味着所有内容和特定于日期的日期应根据所请求的URL动态出现.

实现此目标的最佳方法是什么,如果我维护相同的数据库,则如何更改现有模式.

如果我只有Single数据库,性能将会下降.

请建议我最好的方法.

在此先感谢.

Hi Friends,

I need your great help in developing a new Asp.net project.

I have 3 websites Site1,Site2,Site3 running on their own Code base''s & Databse''s.

All are Job portals having 3 roles i.e Admin,Employer,Job seeker.

Now my requirement is to have a Single code base,Single Databse for all the sites.

Means all the content and state specific date should come dynamically according to the URL requested.

What is the best way to achive this and if I maintain same database then how to change the existing schema .

If I have Single database will the performance goes down.

Please suggest me the best approach .

Thanks in advance.

推荐答案

我从事的工作是这样的
这是我的方法:
您可以提供每个网站的ID,如果这三个网站用于
在其他服务器中的示例,您可以在Web配置上设置站点的ID.
并且当您请求例如站点1的url时,根据配置文件中的siteid从db加载数据

您将在请求任何url时将网站ID用作过滤方法
例如http://me.com/viewpage.aspx?siteid=1
I working in some thing like this
and this is my method:
you can give for example id for each site and if these three sites for
example in different server you can set the id of the site on the web config
and when you requested for example the url of site 1 load your data from db according to the siteid in the config file

you will make the site id is the filteration method when requesting any url
for exampl http://me.com/viewpage.aspx?siteid=1


这篇关于具有单个数据库,单个代码库的多个站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆