Is there any easy way to Deploy/Publish a website written in asp.net ? And what is the difference between deploy and publish ?
CARVIEW |
- Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
- Advertising Reach devs & technologists worldwide about your product, service or employer brand
- Knowledge Solutions Data licensing offering for businesses to build and improve AI tools and models
- Labs The future of collective knowledge sharing
- About the company Visit the blog
Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about CollectivesTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams4 Answers 4
Here is a site that shows different techniques how to accomplish this task. There are many techniques that can be utilized as a deployment strategy for your web application.:
-
2The information in this article is a little dated now. Check out weblogs.asp.net/scottgu/archive/2010/07/29/… for the VS2010 options. Commented Nov 24, 2011 at 10:01
Alt + B + H combination (opens publish window for ASP.NET web site / application) is the most simple way to deploy an application to the required location.
Publish used for compiling and deploying application to server.
Well, it depends on what you're trying to accomplish from an uptime/availability point of view. The publish/xcopy/installer options are interesting but all neglect to address the issue that it takes time for those options to complete. From the time the first file is copied into the directory to the time the last file is copied in the site is in an inconsistent state.
The ASPX files may refer to data-layer objects that aren't in the bin directory yet, or the bin directory may have a DLL w/a changed set of params on a function, but the aspx hasn't been installed yet, so the aspx is still looking for the old function. In short because the deployment isn't an atomic process you can/will have problems.
We've addressed this issue by installing the new files to a new directory, and then going into IIS and changing the website to point to the new directory. This makes the change an atomic process and makes things much smoother. Is it perfect? Nope. You can have viewstate issues or session issues (session is preserved, but maybe the new code looks for something in session that the old code didn't set) but it still makes the process much smoother.
Of course none of these solutions address the other non-atomic part of upgrading the website... the database. Again, the process of changing the DB schema takes time. Do you upgrade the code first or the database first? Can the DB change work w/out the code change (a new column that supports null or has a default) or can the code change work w/out the DB change (removing a column)? That's a case-by-case analysis, and isn't addressed by any of these solutions
Of course, if you can kick your users off the site for a period of time then life is easier, but if you're trying to achieve 100% uptime then it's not so simple.
Sometimes it's not practical to set up Web Publish to your desired target. If that's the case you might still be able to publish to your local machine (as outlined below) and then XCOPY deploy to your target.
- In IIS right-click Sites and click Add Website
- Set up a new web site as shown and click OK
- In Visual Studio (running with administrator privilege), right-click your ASP.NET web project, select Publish...
- Click the Profile heading and from the drop-down select New Custom Profile...
- Enter a profile name like "localhost44321", set up the profile as shown and click Publish
- The Overflow Blog
-
-
- Featured on Meta
-
-
-
-
-
Linked
Related
Hot Network Questions
- Why f[x___] := {x==="To be", x=!="not to be"} is both True for f[]?
- What is this under cabinet lamp style? Are they easily convertible to LED?
- why i'm not getting the first step of the gcd calculation
- Hypothetical copyleft exposure developer on proprietary project, legal?
- What is the source of "apavitrah pavitro va..."
- Is the six million dollar hut challenge real?
- Are there any (around) 14 hidden characters in path and/or filename in File Explorer?
- SMD Crystal mounted on resonator footprint
- If the police observe evidence of a different crime while in "hot pursuit" can they act on it?
- Faster 3D Voronoi Diagram from Point Cloud
- Uniqueness of a Universal Property
- Eleven Special Flashcards
- Can sunflowers disturb and mess with other surrounding plants?
- How to identify process' serving 127.0.0.53:53 and 127.0.0.54:53?
- I struggle to draft without editing
- EU/USA trade deal - is it really a done deal?
- Help distinguishing between statistics in Mixed Model output table
- Why does accessing my public IP via HTTPS on LAN show my modem's interface?
- How Does Code Reuse Work at NASA
- VMWare, SAN, SSD, Influence of the fill level on the performance of a virtual hard disk
- Has the similarity between diagrams of the expanding universe and of vapour pressure in mixtures been noted by others? Is this just coincidence?
- Sci-fi novel human-centered, with alien empire using stargates, humans try to avoid overruling
- Film or TV series about powerful man who is banished, fishes beings he creates from ponds
- Why did many arcade games have separate sound CPUs?