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
- What kind of 7-pin connector is this from a 1997 Compaq laptop?
- Dependent type theory and free variables
- How can my dwarves keep humans from reverse engineering their technology?
- What is this under cabinet lamp style? Are they easily convertible to LED?
- What is the parity of a neutrino?
- Calculus Books or Websites Recommendation
- Testing Hypotheses with Limited Data in an Ecological Experiment. How do I approach my data?
- Should I regularly reapply thermal paste?
- How would the wind patterns of a Disc-like-world work?
- Kepler's first law proof error - can anyone help me see what the error is?
- Can you identify this aircraft landing at Llanbedr Airfield?
- Hypothetical copyleft exposure developer on proprietary project, legal?
- Voltage-Controlled 555 Timer?
- What is the weight of holy water?
- Why did the Holy Spirit send Jesus to the wilderness to be tempted by Satan?
- Are you allowed to take a slow release capsule of caffeine on Shabbos to help you fast on Tisha Bav - Sunday or is it hachana for the weekday?
- forcing line break in url while preserving link url, without using \href
- What are the canonical commutation relations mathematically?
- Is there a link between ます and まします?
- An SF novel where a very young child escapes being murdered by hiding in the water tank of a toilet
- Book recommendations for theistic books about God's existence
- Unclear step in a math book for entertainment
- Shimano 105 ST 5500 compatible with a triple front derailleur
- Sci-fi novel human-centered, with alien empire using stargates, humans try to avoid overruling