Sergey Smelov
Sergey Smelov

Reputation: 1081

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?

Upvotes: 0

Views: 1036

Answers (3)

HAJJAJ
HAJJAJ

Reputation: 3787

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.

Upvotes: 1

Carra
Carra

Reputation: 17964

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.

Upvotes: 1

Jojo Sardez
Jojo Sardez

Reputation: 8578

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.).

Upvotes: 1

Related Questions