English 中文(简体)
How to deploy asp.net web application multiple times on the same server?
原标题:

I have a ASP.NET 3.5 web application and I would like to allow users to install this web application multiple times on the same server.

Each web app will work with it s own database:

Server1
--------
WebApp1 - database1
WebApp2 - database2
WebApp3 - database3

Firstly I tried to use web-deployment-project, but it allows me to install my web application only once.

How I should implement deployment of web app multiple times on the same server? Should I develop my own winforms application?

最佳回答

Yes. I think that will be the best way to do it and by writting your custom app you ll be able to meet your specific demands.

You should make a winform application that emulates the process being done by web deployment project (like copying files to the file system, creating new application virtual directory on the select website, etc.).

问题回答

You probably need to do this:

  • Create a virtual directory in IIS for each of your databases
  • Be sure to set the config files for each web application to the correct database
  • When you deploy, copy your files to each directory minus your config files

You could write a small application or batch file to do it.

the best is to use Web Deploy 3.0

Web Deploy (msdeploy) simplifies deployment of Web applications and Web sites to IIS servers. Administrators can use Web Deploy to synchronize IIS servers or to migrate to newer versions of IIS. Web Deploy Tool also enables administrators and delegated users to use IIS Manager to deploy ASP.NET and PHP applications to an IIS server.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签