RE: Need for deployment project, VS 2008, WinXP
- From: hongyes@xxxxxxxxxxxxxxxxxxxx ("Hongye Sun [MSFT]")
- Date: Fri, 13 Feb 2009 08:40:13 GMT
Thanks for Phil's answer. It is very helpful and insightful.
Hi Lena,
Thanks for your post. I am Hongye Sun [MSFT] and it is my pleasure to work
with you on this issue.
The process you are using to deploy a web application is very common. A
staging server is usually used to test the latest code and check whether it
is proper to put into the production server. From technical point view,
copying updated DLL to Production server works fine. You even do not need
to restart website in IIS. ASP.net will detect the change and reload the
whole website. However, for the considerations of the product quality, it
is best to first deploy the changes in a testing server and after testing,
copy the whole tested website to production server, in order to avoid any
missing files by mistake.
The problem you are having is that the deployment process is too long and
many duplicate work, so you are trying to skip parts of the process when
deploying some small changes. If so, I can provide you methods to simplify
the process while keeping the benefits of it. Phil's answer focuses on how
to make the MSI to do upgrading, while I want to add you more value from
another perspective.
The main idea of simplification is using command line.
1. Create a share folder, for example: \\Stageing\ShareInstall\ with read
and write permission.
2. In development machine, set the output folder to the share folder.
In Visual Studio, right click on web setup project -> select Properties ->
in the Property page, select Configuration Properties\General -> set
"Output file name" as "\\Stageing\ShareInstall\<WebSetupName>.msi".
3. In the staging server, create a bat file named "ReinstallWebSetup.bat".
Its content is:
-----------------------------
::Uninstall website
MsiExec.exe /x \\Stageing\ShareInstall\WebSetupName.msi" /quiet
::Install website
\\Stageing\ShareInstall\setup.exe" /quiet
-----------------------------
Note: setup.exe is a bootstrapper automatically generated by Visual Studio.
4. Share the destination folder in the Production server. For example,
\\Production\WebSiteName with read and write permission to copy account.
5. In the staging server, create a bat file named "CopyToProduction.bat"
with the content below:
-------------------------------
xcopy "C:\inetpub\wwwroot\WebSiteName" \\Production\WebSiteName" /E /Y
/Exclude:Exclude.txt
-------------------------------
6. Create an Exclude.txt file in the same folder of CopyToProduction.bat.
Its content is:
-------------------------------
Web.config
-------------------------------
It excludes Web.config file while copying.
After doing all the steps above. The process will simplify as following:
1. Build website
2. Build web setup project
3. Run ReinstallWebSetup.bat in Staging server
4. Test in staging server (This is not a necessary step)
5. Run CopyToProduction.bat to copy to production server
If you really do not care about testing on staging and the deployment
performance is critical to you, please read following comments:
Actually, all the steps above except #4 can be converted into commands. If
staging server can visit the source code and projects, all the steps can be
included into a single batch file. That means after you do a change of
source code, just double click a bat file will make the production server
updated.
Please let me know if you need more information on that. I will be glad to
help.
Regards,
Hongye Sun (hongyes@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- References:
- Need for deployment project, VS 2008, WinXP
- From: LenaMsdn08
- Need for deployment project, VS 2008, WinXP
- Prev by Date: Re: Figuring out which version of .NET an assembly is dependent on
- Next by Date: Removing unwanted integrated programs
- Previous by thread: Re: Need for deployment project, VS 2008, WinXP
- Next by thread: When creating a new website getting error message "Access to path ... is denied"
- Index(es):
Relevant Pages
|