====== Map Suite MVC Edition Azure Deployment Guide ====== {{section>upgrade_map_suite_to_10.0}} The purpose of this guide is to show you how to upload your MVC Edition Sample to Azure Server, and at the same time install the MVC Server Edition to remove the watermark after deployment. It is using 3 key files( one cmd , one exe and one msi). MVC Server Edition serial number needs to be upgraded in the cmd file to pass the online validation. This guide works with Map Suite 7.0 MVC Edition. If you are using 7.0.0.0 assemblies you can directly use the attached tools. If you are using a newer version please replace the “Setup Unmanaged Dependencies 7.0.0.0.msi” and update the corresponding script in MapSuiteMVCServerAzureInstaller.cmd. ===== Download the Sample ===== {{filehistory:MVCEditionSample AzureDepolyment CS 130726.zip|Download This Sample}} //( 24.12 MB)// ===== Setting up the Environment ===== ==== Run VS as administrator and create Windows Azure Cloud Service ==== {{mvcedition:mvc1.png}} ==== Add a MVC 3 web role ==== {{mvcedition:mvc2.png}} ==== Add a shapefile to the project and write code as following to display it on the map ==== Map map = new Map("Map1", new System.Web.UI.WebControls.Unit(99, System.Web.UI.WebControls.UnitType.Percentage), 460); map.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF")); map.CurrentExtent = new RectangleShape(-131.22, 55.05, -54.03, 16.91); map.MapUnit = GeographyUnit.DecimalDegree; map.MapTools.PanZoomBar.Enabled = true; map.MapTools.MouseCoordinate.Enabled = true; ShapeFileFeatureLayer layer = new ShapeFileFeatureLayer(Server.MapPath("SampleData/cities_a.shp")); layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.Capital1; layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; LayerOverlay overlay = new LayerOverlay(); overlay.Layers.Add(layer); map.CustomOverlays.Add(overlay); return View(map); {{mvcedition:MVCEdition Sample Code.png}} {{mvcedition:MVCEdition Sample Project.png}} ==== Copy the 3 files to the project folder and reference them into your project ==== {{mvcedition:mvc3.png}} ==== Set the 3 files’ Build Action to "Content" and Copy to Output Directory to "Copy Always" ==== {{mvcedition:mvc4.png}} ==== Change the MapSuiteMVCServerAzureInstaller.cmd by typing in the license key, then rebuild ==== {{mvcedition:mvc5.png}} ==== Add a new node to the ServiceDefinition.csdef under WebRole node as following ==== {{mvcedition:mvc6.png}} ==== Publish it, the MVC server edition should have been installed and no watermark will be shown on the Map Suite Map. ==== {{mvcedition:MVCEdition Deploy to AzureCloud.png}}