1 / 9

Deployment

Deployment. Moving an ASP.NET application from the development environment to the production environment. Development environment vs. Production environment. Development environment. Production environment. Runs many (potentially thousand) user sessions simultaneously Microsoft IIS

chenoa
Download Presentation

Deployment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Deployment Moving an ASP.NET application from the development environment to the production environment Deployment

  2. Development environment vs. Production environment Development environment Production environment Runs many (potentially thousand) user sessions simultaneously Microsoft IIS Full-fledged web server Port 80 Accessible world wide • Runs a single (or few) user sessions simultaneously • Visual Studio comes with a built-in web server • Random port number • Accessible from local host, only Deployment

  3. Avoiding hardcoded settings • Settings should not be in the pages • Example: Company name, email address, etc. • Settings should be declared in web.config <appSettings> <add key="CompanyName" value="Roskilde Used Cars"/> <add key="MaintainedBy" value="andersb@rhs.dk" /> </appSettings> • Used like <asp:Literal ID="Literal1" runat="server" Text=” <%$ AppSettings:CompanyName %> ” > </asp:Literal> • Example • Deploymentexample/MasterPages/MyMasterpage.master Deployment

  4. Copying a web site • Visual Studio helps you make a copy of your web site Deployment

  5. Publishing a web site • Alternative to ”Copying a web site” • Available in Visual Studio Prof. Editions • Build menu -> Publish • Pages can be precompiled • File.aspx-> file.dll • First request to a page will run faster • Compilation not required at request-time Deployment

  6. Transportation options • When copying a web site you have 4 ways of transporting the files to the production environment • File System • Files are moved manually • Local IIS • Files are moved automatically to a local IIS • FTP Site • Files are sent to IIS using FTP (File Transfer Protocol) • Remove Site • Files are sent to IIS using IIS • Requires Front Page Server Extensions Deployment

  7. Microsoft IIS • IIS (Formerly Internet Information Server) • Microsoft’s web server • Comes with most major Windows versions • But is not installed! • IIS must be installed and configured • Configured to execute ASP.NET Deployment

  8. Installing and configuring IIS • Control Panel -> System and Security -> IIS Manager • Select ”Default Web site” and click ”Advanced Settings” (left) • Set Physical path • Right click ”Default Web Site” to add a new application Deployment

  9. Further readings, etc. • Imar Spaanjaars Beginning ASP.NET 4 in C# and VB, Wrox 2010 • Chapter 19 Deploying your Web Site, page 697-730 • Configuration of IIS + deployment of Web Site Projects (not Web Application Projects) • Bill Evjen et al. Professional ASP.NET 4 in C# and VB, Wrox 2010 • Chapter 36 Packaging and Deploying ASP.NET Applications, page 1337-1367 • George Shepherd Microsoft ASP.NET 4 Step by Step, Microsoft Press 2010 • Chapter 26 Deployment, page 575-586 Deployment

More Related