Deploying an ASP.NET Web Application to a Hosting Provider Using Visual Studio Tom Dykstra

Total Page:16

File Type:pdf, Size:1020Kb

Deploying an ASP.NET Web Application to a Hosting Provider Using Visual Studio Tom Dykstra Deploying an ASP.NET Web Application to a Hosting Provider using Visual Studio Tom Dykstra Summary: This series of tutorials shows you how to make an ASP.NET web application available over the internet by deploying it to a third-party hosting provider. The deployment method used is Visual Studio one-click publish. The tutorials illustrate deployment first to IIS on the development computer for testing. They then show you how to deploy to the hosting provider as the production environment. Category: Step-By-Step Applies to: ASP.NET 4.0 and earlier, Visual Studio 2010 Source: ASP.NET site (link to source content) E-book publication date: May 2012 162 pages Copyright © 2012 by Microsoft Corporation All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Microsoft and the trademarks listed at http://www.microsoft.com/about/legal/en/us/IntellectualProperty/Trademarks/EN-US.aspx are trademarks of the Microsoft group of companies. All other marks are property of their respective owners. The example companies, organizations, products, domain names, email addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, email address, logo, person, place, or event is intended or should be inferred. This book expresses the author’s views and opinions. The information contained in this book is provided without any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers, or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly by this book. Deployment to a Hosting Provider Contents Deployment to a Hosting Provider: Introduction - 1 of 12 ........................................................................ 6 Overview ............................................................................................................................................ 6 Intended Audience ......................................................................................................................... 6 The Hosting Provider Shown in the Tutorials .............................................................................. 6 Web Application Projects versus Web Site Projects..................................................................... 7 ASP.NET Web Forms versus ASP.NET MVC ............................................................................. 7 Programming Language ................................................................................................................ 7 Troubleshooting During this Tutorial ........................................................................................... 7 Comments Welcome ...................................................................................................................... 7 Prerequisites ...................................................................................................................................... 7 Downloading the Sample Application ............................................................................................... 8 Reviewing Application Features that Affect Deployment ................................................................ 9 Deploying SQL Server Compact Databases - 2 of 12 ............................................................................... 11 Overview .......................................................................................................................................... 11 SQL Server Compact versus SQL Server Express ......................................................................... 11 Configuring the SQL Server Compact Database Engine for Deployment..................................... 12 Creating an Application Database for Deployment ........................................................................ 14 Creating a Membership Database for Deployment ........................................................................ 18 Renaming the Production Databases .............................................................................................. 22 Setting Connection Strings so that Only Development Databases are Used in Development ....... 23 More Information ............................................................................................................................ 25 Web.Config File Transformations - 3 of 12 ............................................................................................. 26 Overview .......................................................................................................................................... 26 Web.config Transformations versus Web Deploy Parameters ...................................................... 26 Creating a New Build Configuration .............................................................................................. 26 Preventing Entity Framework Code First from Dropping the Production Database ................... 29 Limiting Error Log Access to Administrators ................................................................................ 30 1 Setting an Environment Indicator .................................................................................................. 32 Disabling Debug Mode .................................................................................................................... 33 Setting Connection Strings .............................................................................................................. 33 More Information ............................................................................................................................ 34 Configuring Project Properties - 4 of 12 ................................................................................................. 35 Overview .......................................................................................................................................... 35 Configuring Deployment Settings in the Project Properties Window............................................ 35 Making Sure that the Elmah Folder gets Deployed ........................................................................ 39 Deploying to IIS as a Test Environment - 5 of 12 .................................................................................... 40 Overview .......................................................................................................................................... 40 Configuring the Application to Run in Medium Trust ................................................................... 40 Installing IIS and Web Deploy ........................................................................................................ 41 Setting the Default Application Pool to .NET 4 .............................................................................. 41 Publishing to IIS .............................................................................................................................. 45 Testing in the Test Environment ..................................................................................................... 49 More Information ............................................................................................................................ 53 Setting Folder Permissions - 6 of 12 ....................................................................................................... 55 Overview .......................................................................................................................................... 55 Testing Error Logging and Reporting ............................................................................................ 55 Setting Write Permission on the Elmah Folder .............................................................................. 56 Retesting Error Logging and Reporting ......................................................................................... 58 More Information ............................................................................................................................ 59 Deploying to the Production Environment - 7 of 12 ............................................................................... 60 Overview .......................................................................................................................................... 60 Selecting a Hosting Provider ........................................................................................................... 60 Creating an Account ........................................................................................................................ 60 Setting the .NET Framework Version............................................................................................. 63 Publishing to the Hosting Provider ................................................................................................. 66 Setting Folder Permissions for Elmah ............................................................................................ 68 Testing in the Production Environment .......................................................................................... 71 Creating a More Reliable Test Environment .................................................................................. 75 Preventing Public Access to the Test Site ...................................................................................
Recommended publications
  • Building Openjfx
    Building OpenJFX Building a UI toolkit for many different platforms is a complex and challenging endeavor. It requires platform specific tools such as C compilers as well as portable tools like Gradle and the JDK. Which tools must be installed differs from platform to platform. While the OpenJFX build system was designed to remove as many build hurdles as possible, it is necessary to build native code and have the requisite compilers and toolchains installed. On Mac and Linux this is fairly easy, but setting up Windows is more difficult. If you are looking for instructions to build FX for JDK 8uNNN, they have been archived here. Before you start Platform Prerequisites Windows Missing paths issue Mac Linux Ubuntu 18.04 Ubuntu 20.04 Oracle Enterprise Linux 7 and Fedora 21 CentOS 8 Common Prerequisites OpenJDK Git Gradle Ant Environment Variables Getting the Sources Using Gradle on The Command Line Build and Test Platform Builds NOTE: cross-build support is currently untested in the mainline jfx-dev/rt repo Customizing the Build Testing Running system tests with Robot Testing with JDK 9 or JDK 10 Integration with OpenJDK Understanding a JDK Modular world in our developer build Adding new packages in a modular world First Step - development Second Step - cleanup Before you start Do you really want to build OpenJFX? We would like you to, but the latest stable build is already available on the JavaFX website, and JavaFX 8 is bundled by default in Oracle JDK 8 (9 and 10 also included JavaFX, but were superseded by 11, which does not).
    [Show full text]
  • Salesware Installation Guide Version 4.4
    Salesware Installation Guide Version 4.4 accesso 302 Camino de la Placita Taos, NM 87571 575.751.0633 www.accesso.com Copyright Copyright 2015 accesso Technology Group, plc. All rights reserved. NOTICE: All information contained herein is the property of accesso Technology Group, plc. No part of this publication (whether in hardcopy or electronic form) may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of accesso Technology Group, plc. The software, which includes information contained in any databases, described in this document is furnished under a license agreement and may be used or copied only in accordance with the terms of that agreement. This publication and the information herein is furnished AS IS, is subject to change without notice, and should not be construed as a commitment by accesso Technology Group, plc. accesso Technology Group, plc. assumes no responsibility or liability for any errors or inaccuracies, makes no warranty of any kind (express, implied, or statutory) with respect to this publication, and expressly disclaims any and all warranties of merchantability, fitness for particular purposes, and non-infringement of third party rights. Installation overview ............................................................................................................................................ 2 Installation of core Salesware modules .............................................................................................................
    [Show full text]
  • File Management
    File management Information about file management How to use the SFTP Wrapper Advanced: WinSCP SFTP Guide Advanced: CyberDuck SFTP Guide Restoring Backups Installation Locations File Manager How to use the SFTP Wrapper To quickly load up WinSCP, you can use our wrapper to automatically launch WinSCP and log you in without messing around with usernames/passwords/ports/protocols etc. It's super easy!* Our wrapper is currently Windows only; if you would like information on how to access your files using one of our other sFTP guides. Our wrapper is currently Windows only; if you would like information on how to access your files please see one of our other sFTP guides. 1. Make sure you have .NET Framework 4.0 (or higher) installed from Microsoft's website. This is needed for the wrapper to work properly. If your computer is on Windows 8 or later, you already have it! 2. Download and run it by clicking here: here NOTE: CLOSE THE PROGRAM AFTER INSTALLATION. 1. Head on over back to the "Service" > "Access" page and click the "Download" button and then confirm you have read the very serious warning, and click "Download" again. This will download your chPPK file, a tiny little file crammed with information on how to connect to your system. Note: If clicking the sFTP wrapper install URL shows a page full of text. You will need to go back and Right Click > Save As, and run the wrapper application from your download folder. Some browsers/browser versions will not automatically download this .application file. 2.
    [Show full text]
  • Tutorial #1: Getting Started with ASP.NET
    Tutorial #1: Getting Started with ASP.NET This is the first of a series of tutorials that will teach you how to build useful, real- world websites with dynamic content in a fun and easy way, using ASP.NET and C#. ASP.NET pages can display HTML, collect user input, and interact with databases. Note that these tutorials are not meant to provide an in-depth training in ASP.NET programming. The goal is to walk you through the development steps of a simple project, which you may later follow in designing an interface to your own final database project for this class. If you are interested in further study of web development with ASP.NET, I recommend the book by Scott Mitchell, SAMS Teach Yourself ASP.Net in 24 Hours, Pearson Education, 2010, ISBN 978-0-672-33305-7. Step 1. Installing the Software Environment Prior to using ASP.NET, you will need to install the following software: • SQL Server 2008 R2 for the database engine. • SQL Server Management Studio Express for the client (SSMS) • Visual Web Developer Express 2010 for the IDE • The .NET framework 4 environment To install this software, visit the following website: http://www.microsoft.com/express/Downloads/ Click on Download then scroll down to 2010 Express products and click on Visual Web Developer 2010 Express. Because Visual Web Developer is designed for developing ASP.NET websites, installing it automatically installs the .NET Framework and other required ASP.NET tools. You can also optionally install SQL Server 2008 (just checkmark “Microsoft SQL Server 2008 Express Service Pack 1” when prompted).
    [Show full text]
  • Ideablade Devforce Installation Guide
    DevForceDevForce Silverlight WinClient Installation Guide DevForce Silverlight Installation Guide Table of Contents Table of Contents Preface ................................................................................................................................ 1 Installation .......................................................................................................................... 2 Product Prerequisites ........................................................................................................................... 2 Pre-installation Checklist ...................................................................................................................... 2 Installing DevForce Silverlight .............................................................................................................. 4 Post-Installation Tasks ......................................................................................................................... 6 Updating Existing Applications....................................................................................... 7 Consult the Release Notes ................................................................................................................... 7 Upgrading DevForce Versions.............................................................................................................. 7 Upgrading DevForce Editions ............................................................................................................. 11 Troubleshooting
    [Show full text]
  • Data File Manager
    Data File Manager Welcome to Data File Manager! Thank you for using the data file manager. Highlights of the data file manager are as follows: Intuitive operability Buttons on the tool menu, drag & drop, and context menu with a right click are supported to use each function. Tree view for data in SD memory card Files and folders in SD memory card are shown in a tree structure and target files can easily be found. Operations for files and folders Files and folders can be added, renamed or deleted. PLC maintenance Viewing the PLC status, such as Run/Stop state or error status, downloading/uploading user programs, or upgrading the system software of the PLC are supported. MICRO/I maintenance Viewing the target information, such as system software version or external memory device information, or downloading/uploading project is supported. Notes - Data File Manager There are the following notes when you use Data File Manager: Supported hardware Data File Manager supports the following hardware: FC4A series MICROSmart FC5A series MICROSmart Pentra FC6A series MICROSmart FT1A series SmartAXIS expect FT1A Touch HG3G/4G series MICRO/I HG2G-5F series MICRO/I HG2G-5T series MICRO/I HG1G series MICRO/I SD card access (SmartAXIS Pro & Lite) SD card inserted on SmartAXIS series can be accessed while the PLC is stopped only. Downloading or uploading the user program (PLC) You can download or upload the user programs using ZLD files, which can be created or read with WindLDR. Downloading or uploading the project (MICRO/I) You can download or upload the project using ZNV files, which can be created or read with WindO/I-NV4.
    [Show full text]
  • Billquick-SQL Server 2012 Express Installation Guide
    INSTALLATION GUIDE BillQuick-SQL Server 2012 Express Installation BillQuick-SQL Server 2012 Express Installation BillQuick | Power Up Your Business (866) 945-1595 | www.bqe.com | [email protected] INSTALLATION GUIDE BillQuick-SQL Server 2012 Express Installation CONTENTS SQL EXPRESS INSTALLATION 1 SYSTEM REQUIREMENTS 1 INSTALLING SQL 2012 EXPRESS 1 SQL EXPRESS CONFIGURATION 8 BILLQUICK DATABASE 11 BillQuick | Power Up Your Business (866) 945-1595 | www.bqe.com | [email protected] INSTALLATION GUIDE BillQuick-SQL Server 2012 Express Installation SQL EXPRESS INSTALLATION The Microsoft® SQL Server® 2012 Express software is the database engine you will use to store and report on data in BillQuick (Basic, Pro and Enterprise editions). It is available free from Microsoft and is a replacement for MSDE and SQL 2005. We do not recommend using SQL Server 2005 that might be installed with your Windows Server because other software programs that rely on that SQL Server instance can break if you attempt to install service pack updates on them. System Requirements You can check Microsoft Download Center to download Microsoft SQL Server 2012 R2 SP2. Click to know about the system requirements and installation instructions. Hardware/Software Requirements To know about the hardware and software requirements, go to Microsoft Developer Network . Installing SQL 2012 Express Please follow the steps below to install SQL Server 2012 Express edition. If you prefer, click here to watch a video on installing SQL Server Express. 1. Download the appropriate SQL Server 2012 Express setup to your desktop. Express Version System Microsoft® SQL Server® 2012 Express SP1 For 32-Bit machines, download the file: SQLEXPRWT_x86_ENU.exe For 64-Bit machines, download the file: SQLEXPRWT_x64_ENU.exe 2.
    [Show full text]
  • SQL Server Express: Setting up for Unistream User Guide 3/17
    Headquarters Unitronics (1989) (R"G). Unitronics Building, Airport City P.O.B. 300, Ben Gurion Airport, Israel 70100 Tel: + 972 (3) 977 8888 Fax: + 972 (3) 977 8877 SQL Server Express: Setting up for UniStream User Guide 3/17 Contents SQL Server Express: Setting up for UniStream ...................................................... 1 Overview ....................................................................................................... 1 Supported Controllers ...................................................................................... 1 First-time Installation & Configuration ................................................................. 2 Download ...................................................................................................... 2 Installing SQL Server ...................................................................................... 3 Setting up the Local Database .......................................................................... 5 Configuring SQL Server ................................................................................... 6 Activating the SQL Server Browser. ................................................................ 6 Enable TCP/IP, Assign Port ............................................................................ 7 Create a new Login ....................................................................................... 8 SQL Server Express—Existing Installation ........................................................... 10 Enable TCP/IP, Assign Port
    [Show full text]
  • CHAPTER 3 - DEVELOPER TOOLS for SHAREPOINT 2013 by Paul Swider, Reza Alirezaei, Brendon Schwartz, Matt Ranlett, Scot Hillier, Jeff Fried & Brian Wilson
    PROFESSIONAL SHAREPOINT 2013 DEVELOPMENT CHAPTER 3 - DEVELOPER TOOLS FOR SHAREPOINT 2013 by Paul Swider, Reza Alirezaei, Brendon Schwartz, Matt Ranlett, Scot Hillier, Jeff Fried & Brian Wilson IN THIS CHAPTER YOU WILL: • Understand the different tools available to SharePoint developers • Explore what’s new in SharePoint Designer 2013 • Learn how to use the new SharePoint tools in Visual Studio 3 Developer Tools for SharePoint 2013 WHAT’S IN THIS CHAPTER? ➤ Understanding the diff erent tools available to SharePoint developers ➤ Exploring what’s new in SharePoint Designer 2013 ➤ Using the new SharePoint tools in Visual Studio SharePoint has become one of the most developed-on platforms over the last decade, and Microsoft has invested in the developer experience with every release of SharePoint. SharePoint 2013 continues to improve the tools available for developers such as Visual Studio and SharePoint Designer while making tremendous strides with the addition of apps, Offi ce 365, and Microsoft Offi ce development. The addition of apps in SharePoint 2013 is a drastic change along with using familiar programming web standards such as HTML, CSS, JavaScript, OData, REST, and OAuth. The developer tools have included this support as well with full support for development against the cloud platforms. If you have used SharePoint 2010, you will see that many of the same project fi les are available, but there are new addi- tions to the array of items you can now use. The development tools are more integrated with the platform; debugging is easier in complex scenarios such as the web and more; and new tooling containing designers and templates was added so that you can easily work on SharePoint and transition to another web-based frame- work.
    [Show full text]
  • Open Windows File from Download Open Files from the File Menu
    open windows file from download Open files from the File menu. The Open tab on the File menu shows a list of files you’ve recently opened, and it includes links to places where you commonly store files. The Recent list shows the files that you opened recently from any of your devices. If this list gets unwieldy, you can remove files from it. Just right- click the file name and then pick Remove from list . You can make other changes to the Recent list. To learn more, see Customize the list of recently used files. If you don’t use the list of Recent files, and you’d rather jump straight into browsing folders, use Ctrl+F12 to open the Open dialog box directly. To access files from your Microsoft 365 Groups or SharePoint Online document libraries click the Sites - Your Company link. You'll get a list of your frequently Groups and Sites to select from. Pick the one you want and browse to the file you want to open. Double-click Computer to get to local files, including removable flash drives. You can also select one of the locations your accounts let you get to, sign in if necessary, and then open the file you want. To add a new location, click Add a Place . Tip: If you want to bypass File > Open and always use the Open dialog box, do this: Select File > Options > Save , and then select the Don’t show the Backstage when opening or saving files check box. Then, close and reopen any open Office applications.
    [Show full text]
  • Syncstudio Requirements
    Hardware and Software Requirements The SyncStudio Sync Management Console and the custom generate Sync Web Service run on Windows OS systems. We support Windows 7, 8.1, 10 and Windows Server 2012 or 2016. Win XP is not supported. For production environments, we recommend Windows Server. We support both virtual and physical machines. The machine needs to have IIS 7 or above installed, enabled and with the features/roles as per our quick start guide. .NET Framework 3.5 is the minimum but 4.6 or higher is recommended. The server database can be either MS SQL SERVER or MS SQL EXPRESS versions 2008, 2010, 2012, 2014, 2016. Version 2014 and above is recommended. If you don’t have MS SQL Server, you can download SQL Server Express from this link: MS SQL Server 2016 Express Edition In SQL add login NT AUTHORITY\NETWORK SERVICE and make it a db owner of the selected SQL database. Visual Studio – SyncStudio depends on portions of Visual Studio to perform automated code generation. If you’ve installed a full license of Visual Studio 2010 or above, then you are good to go. If you do not own a full license, then you can use the Free Visual Studio Express or Visual Studio Integration Shell 2010. Minimum Microsoft Visual Studio 2010 or 2012 SyncStudio does not require that you own a full license of Visual Studio. You do however need to have installed one of the following… - Microsoft Visual Studio Integration Shell 2010 - Microsoft Visual Studio Express for Web 2010 or 2012 - Microsoft Visual Studio 2010 or 2012 full license Windows Firewall - Turn off firewall or configure pass thru as needed.
    [Show full text]
  • Xactimate 28 Network Installation Guide
    Network Installation Guide © 2011-2013 by Xactware . All rights reserved. Xactware, Xactimate, Xactimate Online, XactNet, and/or other Xactware products referenced herein are either trademarks or registered trademarks of Xactware Solutions, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. (031213) www.xactware.com Xactimate version 28 Network Installation Guide INTRODUCTION Like all networked software applications, Xactimate must be installed on a workstation connected to a network that has been properly set up and mapped to a shared drive (this document uses the X drive as an example). Xactware recommends that a certified network technician set up and administer the network. It is recommended for a network installation of Xactimate to use the physical disc. For instructions about how to set up a network installation of Xactimate via the downloadable version, visit the eService Center at https:/ / eservice.xactware.com/apps/esc/ Xactimate v28.0 Network Installation Guide Page 1 Introduction SYSTEM REQUIREMENTS - XACTIMATE V28.0 NETWORK INSTALLATION Specifications Minimum Requirements Recommended Requirements Processor Single Core Processor 1.5GHz Dual Core Processors Operating System Windows 8 (32 bit, 64 bit) Windows 7 (32 bit, 64 bit) Windows Vista (32 bit, 64 bit Business, 64 bit Ultimate) Windows XP Service Pack 3 *Windows RT is not Supported Video Card Open GL 2.0 Compatible with 128 Open GL 2.0 Compatible with MB of VRAM and Latest Drivers 512 MB of VRAM and Latest Drivers
    [Show full text]