开发者

Which is recommended, physical subdomain or virtual directory to separate Asp.net applications?

I have a domain xyz.com on an ASP.NET shared hosting environment.

I am confused with which is to choose to separate my ASP.NET MVC 2 applications.

Whether to create a physical subdomain for each app or create a virtual directory for each app.

I also want to use the asp.net membership and role provider for all apps.

The shared hosting company structures the folder as follows:

  1. \httpdoc is for xyz.com
  2. \subdomains\one is for physical subdomain one.xyz.com that is a website below xyz.com website.
  3. \subdo开发者_如何学Pythonmains\two is for physical subdomain two.xyz.com that is a website below xyz.com website.
  4. \httpdoc\three is for virtual directory xyz.com/three.
  5. \subdomains\one\four is for virtual directory one.xyz.com/four.

My questions are:

  1. Which is recommended to separate applications, using physical subdomain or virtual directory?
  2. Is there a side effect for each mechanism on asp.net membership & role provider?

Note: The hosting company also provides virtual subdomain creation (virtual subdomain is often called as subdomain in subfolder). Each virtual subdomain is mapped to a folder in the \httpdoc belongs to the root domain. For example: virtual subdomain xyz.com/five will be mapped to a folder in \httpdocs\five.

EDIT 1: I don't like virtual subdomain mechanism to create subdomain because it willl mess up the folder structure belongs to virtual directory.


Ans 1:

When I was thinking of registering SSL certificate, I got a statement from the registrar that I must specify the domain to register for the SSL certificate. So separating applications by creating subdomains---a subdomain for each app--- will cost more because each domain must have a SLL certificate.

Ans 2:

I also did many trial and errors, I think there is no side effect when a single ASP.NET membership database is shared among more than one application as long as the applicationName attribute in web.config is set properly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜