Migrating ASP .NET Application to Azure – Step By Step

ASP NET application

Moving ASP.NET Apps to Azure

Migrating the ASP NET application to Windows Azure for newbies is a challenging task. However, with little patience and meeting prerequisites, you can handily replenish this otherwise which is a demanding task. Before you start, make sure to have an active Azure account and a working SQL Azure Database.

If you don’t have one, set up a new account at the Azure store and create a temporary database ‘database_alfa’ in SQL Server Management Studio. Also, make sure that your firewall settings do not stop your ASP NET application from running. Microsoft Azure lets you focus on business ideologies while Azure takes care of the foundation and open-ended maintenance to manage the apps.

The Step By Step Guidance In Migrating Database Is As Follows:

  1. Migrate the alfa.MDF (application)
  2. Change the connection strings
ASP.NET developers

1. Migrating Alfa.MDF

  • Open SQL Server Management and connect using .SQLExpress.
  • Select ‘Attach’ under Database.
  • Select ‘Add’ and locate ‘alfa.MDF’ from your directory, upload it.
  • Select alfa database (that you just added), Select Tasks-> Generate Scripts.
  • Click Next twice and select ‘Advanced’ under Set Scripting Options.
  • Scroll to ‘Script for database engine type’ and opt ‘SQL Azure Database’.
  • Based on your type of data, select related script option from schema only, the schema and data or data only.
  • Save the script file and open it in SSMS.
  • Our next task here is to connect to SQL Azure. Right Click Connect button from Object Explorer and choose ‘Database Engine’.
  • When asked server name, write your SQL Azure portal name with your domain name. i.e. zkymadd998.database.windows.net. Also enter the same Server name in Connect to Server dialog for SSMS.
  • Login to your SQL Azure portal.
  • Select ‘Options->Connection Properties’ and enter alfa.db against ‘Connect to database’, this shall place the SQL Azure database in SSMS object explorer.
  • Open a new SQL Query window from ‘New Query’ option under SQL Azure Database.
  • Execute the query window after copy, pasting the database script. Successful query execution would appear after running your query against the alfa.db.

2. Migrate ASP.NET Providers

  • Import your scripts and extract them from existing data source.
  • Open InstallCommonSQL script from SSMS and select ‘Connection | Disconnect’ from query window in order to connect to ‘beta.db’.
  • Right Click SQL Query window, and enter beta.db as the connect to database.
  • Run script; open InstallMembership.SQL and installprofile.SQL, and run them against beta.db.

3. Changing Connection String

  • Finally, we need to change our connection strings in connectionstrings.config file in our project.
  • Change the user ID and Password, also change the database source. It should look something like this:

< connectionStrings > < add name=”ApplicationServices” connectionString=”Server=tcp: zkymadd998.database.windows.net; Database=alfadb;User ID=jnak;Password =< enter >;Trusted_Connection=False;” providerName=”System.Data.SqlClient” /> < add name=”AlfaConnectionString” connectionString=”Server=tcp: zkymadd998.database.windows.net; Database=betaDB;User ID=jnak;Password=;Trusted_Connection=False;” providerName=”System.Data.SqlClient” /> connectionStrings >

Remove database files from App Data and execute.

#ASP.NET application #Windows Azure #Cloud #SQL Azure # MS SQL #asp.netdevelopers #webdeveloper

Recommended for You

transform to buyers
Turn Browsers into Buyers with Our Strategic UX and Web Designing Services

In today’s digital landscape, competition is fierce. With a seemingly…

bridging the gap
Bridging the Gap: How Coding Skills Boost UI Web Designers’ Capabilities

In today’s dynamic design landscape, UI/UX professionals…

good design
The ROI of Good Design: Why UI/UX is Essential for Brand Success

A website is more than just an online brochure; it’s a critical touchpoint…

unlocking excellence
Unlocking Excellence: Elevate Your Website with Our Top Interface Design Company

Discover How Expert UI/UX Design Can Transform Your Digital Presence…

Discuss your ideas. Connect now
We've successfully delivered over
Development Design Process
leads for the client
Years In Business
Projects Completed

© Copyright 2024. All Rights Reserved. | Privacy Policy