IT tutorials
 
Applications Server
 

Packaging and Deploying Sharepoint 2013 Apps : Anatomy of an App (part 3) - Web Deploy Package, Database Package

2/5/2014 2:53:31 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

3. Web Deploy Package

If you are building an Autohosted application then the app package produced by Visual Studio will contain a Web deploy package containing your app code and pages. Web Deploy is a tool produced by Microsoft that can take Web deploy packages and deploy the contents to an Internet Information Server (IIS) enabled server. It is also a packaging format that can be used for deploying to Azure. Because Autohosted apps use Azure, your code and pages are packaged as a Web deploy package for automated deployment to Azure when an Autohosted app is installed. When the app is installed, SharePoint Online takes the Web deploy package included in the app’s .app file and automatically deploys it to Azure. This creates a running website with your app’s code and pages in it. Additionally, SharePoint Online creates a new client ID and client secret and sets up the app with it so that the OAuth and API calls all work . Likewise, when the app is uninstalled, the website in Azure is removed. This entire process is managed by SharePoint Online without any user or developer involvement, hence the name Autohosted model.

If you take a look inside an .app file for an Autohosted app, you will find the Web deploy package contained within it packaged into a .zip file and named the same name as the app in Visual Studio with a “.web” appended. For example, SharePointAppPackage.Web.zip file shown the in the file list in Figure 2 is the Web deploy package.

FIGURE 2

image

4. Database Package

Like Web deploy packages a database package may be included in an Autohosted app’s .app package. This is commonly called a DACPAC because it’s a file with a .dacpac extension, but it is the packaging name for the Data-tier Applications technology (DAC for short, chosen because DTA was already taken), introduced in SQL Server 2008 R2. Essentially a DACPAC is a packaging format for databases.

A DAC is a self-contained unit of SQL Server database deployment that enables data-tier developers and database administrators to package SQL Server objects into a portable artifact called a DAC package, also known as a DACPAC.

“Data-tier Applications.” Microsoft TechNet Library

For developers, Visual Studio supports building .dacpac files with the SQL Server Database Project type. SQL Azure also supports deploying DACPACs, hence the use of DACPACs in Autohosted app packages.

In the same way code packages work, if SharePoint Online detects a DACPAC in the app package it will extract it, create a database in SQL Azure, and deploy the DACPAC. This, in turn, creates the tables, relationships, and associated SQL objects needed in the database to support the application.

A question you might be asking yourself at this point is, “How does my SharePoint app know where the database is?” SharePoint will replace a specially named connection string in your app’s web.config file after the database has been set up and configured. To ensure this works correctly you must have a connection string property named SqlAzureConnectionString and configured in the app’s web.config file as follows:

<add key="SqlAzureConnectionString" value="Data 
Source=(localdb)\MyDatabaseProjName;Initial
Catalog=AutohostedAppDatabase;Integrated Security=True;Connect
Timeout=30;Encrypt=False;TrustServerCertificate=False" />

NOTE As of this writing, Microsoft has indicated that the use of the SqlAzureConnectionString configuration property is subject to change moving forward.

After you have the database connection string, you can treat the database and access it like any other SQL Azure database, and all the same data access and query techniques apply.


WARNING When thinking about developing Autohosted applications, it is important to consider the life cycle of an Autohosted app and the impact it has on data stored in the SQL database. Like the Web deploy package for an Autohosted app, the SQL database is also deleted after the app is uninstalled. This causes data loss, and there is no way to get it back.
 
Others
 
- Packaging and Deploying Sharepoint 2013 Apps : Anatomy of an App (part 2) - Manifest and Assets, SharePoint Solution Package
- Packaging and Deploying Sharepoint 2013 Apps : Anatomy of an App (part 1)
- Exchange Server 2013 : Exchange Clients - Design Considerations (part 3) - Network Usage, Exchange 2013 User Throttling
- Exchange Server 2013 : Exchange Clients - Design Considerations (part 2) - Client Performance
- Exchange Server 2013 : Exchange Clients - Design Considerations (part 1) - Supportability, Security
- Sharepoint 2013 : Community portals and sites - Managing your community settings
- Sharepoint 2013 : Community portals and sites - Adding users to community sites
- Sharepoint 2013 : Community portals and sites - Adding moderators to community sites
- Sharepoint 2013 : Community portals and sites - Creating a community site subsite
- Sharepoint 2013 : Community portals and sites - Creating a community site site collection
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us