I am looking for some ideas on how to offer a installation package for my ASP.NET website. Some things I need to be able to do is read/write Registry keys, get the database(s) information and test the connection and I must be able to overwrite the existing website without an uninstall and update the web config on new versions. I do not wish to uninstall the website and re-install it. I would like minimum downtime on upgrades. I think I am going to have to implement a custom solution and if this is true how can i include all the output of my web application into my custom solution?
EDIT: I am not installing this on my own system(s). This is for distribution to other clients who will be installing/upgrading the website. It is important that I be able to upgrade to the latest asp.net website without uninstalling. Ideally it would be overwriting the existing site and updating the web.config file.
Option 1. Create web application installation package
Use Web Setup Project for creating a web application installation package (.msi)
Creating or Adding a Setup Project at MSDN
You can create your installation the way it will offer user an Upgrate option of your application if it's already installed on his or her machine. That's not a problem.
Alternatives to Web Setup Project (all of them can handle upgrade scenarios):
Wise Installation Studio
InstallShield
Nullsoft Scriptable Install System - this one is free and open source
Optoin 2. Deploy web application on the server
You can use NAnt or MSBuild or IIS Web Deployment Tool for these tasks automation.
For example with NAnt of MSBuild you could specify tasks like these:
get project files from source repository
update .config file and maybe some other files if needed
compile you web application
update registry settings on the server
update database schema on the server
synchronize files (x-copy) between you build folder to IIS web folder
Web Deployment Blog
Option 3. Distribute your web applications via Web Plafrom Installer.
http://www.microsoft.com/web/
Have you looked into Web Deployment Projects or the IIS Web Deployment Tool?
I think you can build asp.net application into .msi package and install it. Is that what you are looking for? And then you can build all of your customization into pre-deployment and post-deployment scripts.
I use NAnt and NSIS with some small console apps where they can't easily do some manipulations I require.
Do you tried the new Microsoft Web Platform Installer (new! 2.0 beta)?
Related
I have web form aplication in asp.net and i have to create (has to be easy to install)complex instalator, witch will install IIS server, deploy the app to it create a local database and sets everything up. So the user will just complete installation and then will just run the aplication with out and other setting(or as little as posible).
I have no idea what to use or if it is even posible. Coudl you help me with what to use and how to create such instalation?
Thanks.
In my opinion, you could try to use some extenstion tool to achieve your requirement.
Like Professional edition of Advanced Installer.
It support:
IIS web sites, app pools, web apps and virtual directories
Install windows features without writing any scripting
I have an asp.net project, and i want to create an installer for the deployment of the project. The installer will check if Sql Server is installed in the server, and if not, it will install it. The installer will also create and fill the database, and finally, it will create an repertory and copy the web pages and the dlls, and create the web site in IIS.
I have no idea how to do all this. So, can you just give the steps to follow.
(the deployment will be on a local server)
Thank you.
You can do this by using installer specialized tools like "InstallShield" or "Advanced Installer". Both tools have dedicated support for this type of setup configuration.
I want to make an installer for a client which installs
a web app on IIS
a mssql db
a window service
I am totally naive to thinking of the solution for this automated deployment through an installer (msi or exe). The installer may hint the user for prerequisites for example MSSQL server and upgrading/installing IIS before the web app installation can proceed. Is it possible?
Yes, it is possible. You need to first select in an authoring tool for Windows Installer. Some examples are Windows Installer XML (WiX) and InstallShield (various editions from free to pricey). You'll have some kind of EXE bootstarpper/chainer where you can handle prerequisite installation such as windows features and database engines. Or you can choose to simply ship an MSI that detects and blocks if these are missing and put the effort on the user to manage their baseline environment. The actual MSI will then likely have features for web, service and sql. The web feature will install a bunch of files and configure the IIS meta. The windows service will install some files and create a windows service. The SQL feature will ask for connection string information, execute some sql scripts and possibly configure the web and service layers' connection strings.
Some of this can be deferred until after the installation and placed into a custom configuration utility to simplify the installer work.
There are various design decisions that can be made so it can't be answered in more detail in a simple question format.
In my organization the main product is a web application and an associated database. Both the web application and database is source controlled in TFS. We are running this product in various versions across hundres of IIS web site instances. When having that many web site instances on IIS deployment is atm. a problem.
What I want to do is to package my web application together with the output from my database project. I've been looking into creating a Web Deploy Package which makes it easy to deploy a web application remotely, locally or programitically to IIS if i want to.
What I want to achieve is to have one package but I want to know if it's possible to embed a Database project into a Web Deploy Package taking advantages of dacpac incremental database deployment?
If this is not possible is there any good alternatives to Web Deploy Package that suit my needs?
Another method is to create an MSI package to deploy both the Web Deploy Package and also update the DBs. For example, with Advanced Installer you can use the built-in support for Web Deploy Packages.
To perform dacpac incremental database deployment you can call SqlPackage.exe from the same MSI, as a custom action. The linked example shows a simple EXE running, but you can change that to run any desired EXE, passing your required command line parameters.
If you perform frequent upgrades of the websites, or the settings are usually changed after the installation/deployment, then you should take a look at the next thread too, it talks about persisting website installations during upgrades.
What are the types of deployment we have in asp.net?
Till now what I am doing?
I use to publish my website in any folder than copy paste the compiled file to the inetpub folder [where my website is configured with the IIS]. I am not sure what kind of deployment this is, is it XCOPY? But I am not using any command line tool.
So you have the following options
xcopy deployment
Compile your asp.net application and copy all the files to your server. You can do this by using FTP or shared directories. (Or anything else to transfer files.)
WebDeploy
You have the possibility to deploy your asp.net webpage directly form your Visual Studio. If you go to "Build" and you choose "Publish Web". To be able to to do this you have to configure your server before. But this works automatically after you have set up everything. It's very handy since your deployment becomes easy to rebuild.
http://weblogs.asp.net/scottgu/archive/2010/09/13/automating-deployment-with-microsoft-web-deploy.aspx
Web Setup - Installer
Visual Studio provide also the option to build an installer. This works like installing usual software on your windows computer with the installer wizard. (See the link)
http://weblogs.asp.net/scottgu/archive/2007/06/15/tip-trick-creating-packaged-asp-net-setup-programs-with-vs-2005.aspx
Manage multiple server
There is also a way of managing the deployment of multiple servers. It seems to be a bit more complicated but could be interesting for professionals. (Check out on Google Microsoft Web Farm Framework 2.0
To answer your question: yes, what you are using is called xcopy deployment. Even though you do not type xcopy . ... it is still a 'plain copy' and therefore called xcopy deployment.