vs2010and ne tframework
TRANSCRIPT
![Page 1: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/1.jpg)
Visual Studio 2010and
.NET Framework 4
Training Workshop
Visual Studio 2010and
.NET Framework 4
Training Workshop
![Page 2: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/2.jpg)
Web Deployment WithVisual Studio 2010
Web Deployment WithVisual Studio 2010
NameTitleOrganizationEmail
![Page 3: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/3.jpg)
AgendaAgenda
1. Review configuration in ASP.NET and IIS2. Transforming settings in web.config3. Packaging applications for deployment4. Deploying packages to IIS5. Once-click Deployment
![Page 4: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/4.jpg)
ASP.NET and IIS ConfigurationASP.NET and IIS Configuration
Configuration stored in XML files validated by a schema.
Schema describes configuration settings for IIS, ASP.NET and 3rd party applications.
Central configuration file for the server contains system wide configuration settings.
Distributed configuration files contain overrides and local site and application settings.
Validation
![Page 5: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/5.jpg)
Review configuration in ASP.NET and IISReview configuration in ASP.NET and IIS
![Page 6: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/6.jpg)
Web Deployment TodayWeb Deployment Today
Multiple environments including Development, Testing, Staging and ProductionMust manage settings for each environmentDifficult to keep environments consistentApplications often need to be deployed by someone else
Need to package code, data, application settings and environment configuration for easier deployment
![Page 7: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/7.jpg)
What are the components, settings, etc you have to deploy with your web application?
![Page 8: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/8.jpg)
Managing SettingsManaging Settings
Need consistent configuration with customizations across deployment environmentsHaving multiple web.config files introduces inconsistencies
Web.config transformations allows one master web.config with specific customizations for target environments
![Page 9: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/9.jpg)
How it Transformation WorksHow it Transformation Works
Web.configWeb.config
Web.Staging.config
Web.Staging.config
Visual StudioTransformationVisual Studio
Transformation
DeployedWeb.config
DeployedWeb.config
<appSettings> <add key="EnvironmentName" value="Staging" xdt:Transform="SetAttributes(value)" xdt:Locator="Match(key)" /></appSettings>
<connectionStrings> <add name="LoggingConnectionString" connectionString=“connection" providerName="System.Data.SqlClient" xdt:Transform="Replace" xdt:Locator="Match(name)" /></connectionStrings>
![Page 10: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/10.jpg)
Web.Config TransformationWeb.Config Transformation
Transform Descriptionxdt:Transform=“Replace” Replaces the first matched
node
xdt:Transform=“Remove” Removes the first matched node
xdt:Transform=“RemoveAll” Removes all the matching nodes
xdt:Transform=“Insert” Inserts the node at the end
xdt:Transform=“SetAttributes(attributeNames)”
Creates or changes values of the existing attributes
xdt:Transform=“RemoveAttributes(attributeNames)”
Removes the attributes if they exist
xdt:Transform=“InsertBefore(XPath)” Inserts the node on the provided Xpath
xdt:Transform=“InsertAfter(XPath)” Inserts the node on the provided XPath
![Page 11: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/11.jpg)
Web.Config Transformation LocatorsWeb.Config Transformation Locators
Locator Descriptionxdt:Locator=“Match(attributeName)” Can accept comma seperated names of the
attributes
xdt:Locator=“Condition(xPath Predicate)” Can take any Xpath predicates like xdt:Locator="Condition(@name=’Northwind’ or @providerName=’ System.Data.SqlClient’)"
xdt:Locator=“Xpath(/configuration/…)” Can take any complicated Xpath like "XPath(//system.web)"
![Page 12: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/12.jpg)
MS DeployMS Deploy
Synchronize, Migrate, DeployWorks with IIS 6.0 and IIS 7.0Analyze the destination environmentDo a –whatif Analysis before committing operation
Includes a service for deploying applications remotelyIntegration
Integrated with PowershellIntegrated in Visual Studio 2010Compatible with Web Platform Installer
![Page 13: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/13.jpg)
Integration with Visual Studio 2010Integration with Visual Studio 2010
![Page 14: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/14.jpg)
One-click DeploymentOne-click Deployment
Leverages everything we’ve seen so farWraps multiple steps into a single click
![Page 15: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/15.jpg)
Making Deployment EasierMaking Deployment Easier
![Page 16: Vs2010and Ne Tframework](https://reader033.vdocuments.net/reader033/viewer/2022052619/5552667bb4c905d41d8b503f/html5/thumbnails/16.jpg)