Developing Windows Azure and
Web Services Lab @ home 1 Ans 1
Exploring the
Windows Azure Management Portal
1. Open Internet Explorer.
2. Type https://manage.wmdowsazure.com in the address bar. and then press the Enter key. The page to sign in to the Windows Azure account is displayed.
3. Enter your email (live account), such as myliveaccount@Iive.com. in the user name text box.
4. Enter the password in the password text box.
5. Click the Sign in button. The Windows Azure page is displayed
The Windows Azure page contains various options in the navigation pane. These options can be used to avail different types of services provided on the Windows Azure Management Portal.
The commonly-used services of the Windows Azure Management Portal are:
¦ WEB SITES: Offers options for secure and flexible development, deployment, and scaling of Web applications. In addition, it leverages the existing tools to create and deploy cloud applications without the difficulty of managing infrastructure.
¦ VIRTUAL MACHINES: Enables you to deliver on-demand, scalable computing infrastructure to meet the growing business needs. It allows you to create Windows Server and Linux operating systems environments in multiple configurations on top of the Windows Azure foundation.
¦ MOBILE SERVICES: Enables you to create a scalable and secure backend for the Windows. Android, and iOS apps. By using MOBILE SERVICES, you can:
• Store data in cloud by using various Windows Azure cloud storage techniques, such as Windows Azure Structured Query Language (SQL) database, blob storage, and table storage.
database, blob storage, and table storage.
• Authenticate users easily.
• Send push notifications to the apps running on Windows. Android, and iOS devices.
CLOUD SERVICES: Enables you to create liighly-available and substantially-scalable applications and Application Programming Interfaces (APIs). This service allows you to focus on the functionality of the application and not on the infrastructure required to run the application.
SQL DATABASES: Is fully managed relational database service that allows you to create and manage Windows Azure SQL database servers.
STORAGE: Allows your applications to access Windows Azure Blob. Table, and Queue services to store data. You need a separate storage account to use Windows Azure storage for your applications.
SQL REPORTING: Enables you to create reports with tables, charts, and maps and deploy the reports on both private and public clouds.
MEDIA SERVICES: Provide a range of inbuilt, ready-to-use. first and third-party components that can be combined to meet specific media distribution requirements. It provides various capabilities, such as upload, storage, encoding, format conversion, content protection, and delivery, which can be used to distribute media to global audience. Therefore. Windows Azure MEDIA SERVICES allow you to easily create, manage, and deliver media across multiple devices.
SERVICE BUS: Provides the messaging channel for connecting the cloud applications to on-premises applications, services, and systems. You can use SERVICE BUS to manage message delivery in the cloud, connect on-premises applications to the cloud, and send push notifications to mobile devices.
ACTIVE DIRECTORY: Provides identity management and access control capabilities for the cloud applications. It provides a cloud-based identity provider that can easily integrate with the on-premises Active Directory (AD) deployments. In addition, it provides full support for third party identity providers.
NETWORKS: Enables you to create a logically isolated network in Windows Azure. Further, it allows you to securely connect this network to on-premises datacenter or to a single client machine using an Internet Protocol Security (IPsec) connection. In addition, it allows you to:
• Easily extend your datacenter using Windows Azure.
• Build distributed applications.
• Debug your applications remotely.
TRAFFIC MANAGER: Allows you to manage incoming traffic across multiple hosted Windows Azure services so that you can ensure high performance and availability of your applications. It enables you to select from three load balancing methods: performance, failover, and round robin. Therefore, by configuring TRAFFIC MANAGER, you can run responsive applications and ensure high availability for your applications.
ADD-ONS: Enables you to quickly discover and purchase application and data services from Microsoft partners. Further, it allows you to manage the services purchased from Windows Azure Store through Windows Azure Management Portal.
MANAGEMENT SERVICES: Enables you to manage the alerts and operations logs for the current subscription.
SETTINGS: Enables you to configure settings related to management certificates, subscriptions, and affinity groups. For example, it allows you to add. edit, or remove subscriptions of a user from the Windows Azure account.
Developing Windows Azure and Web Services Lab
@ home 1 Ans 2
In this exercise, you have to use Windows Azure Management Portal
and create a new Windows Azure SQL Server. You need to connect the new SQL
server with SQL Server Management Studio and create a Blue Yonder database from
the .bacpac file.
To create a new Windows Azure SQL Server, you need to perform the following steps:
1.Open Internet Explorer.
2.Type https://manage.windowsazure.com in the address bar. and press the Enter key.
3.Enter your email and password in the respective text boxes on the Sign In page.
4.Click the Sign In button. The Windows Azure page is displayed.
5.Click SQL DATABASES in the navigation pane available on the left side. The sql databases page is displayed.
6.Click SERVERS in the top-left corner of the sql databases page.
7.Click the Add displayed, as shown in the following figure.
button at the bottom of the page. The SQL database server settings dialog box
8. Type SQLAdmin in the LOGIN NAME text box.
9. Type PaSSwOrd in the LOGIN PASSWORD and CONFIRM PASSWORD text boxes.
10. Select Southeast Asia from the REGION drop-dov/n list.
11. Click the Complete (right arrow) button.
12. Wait for the server to appear in the list of servers and its status changed to Started.
13. Note the name of the ser/er.
14. Click the name of the newly created server.
15. Click the CONFIGURE tab.
16. Add a new firewall rule by filling the following information in the allowed ip addresses section:
o RULE NAME: OpenAIIIPs
o START IP ADDRESS: 0.0.0.0
o END IP ADDRESS: 255.255.255.255
17. Click the Save SAVE button in the bottom.
18.Press the Windows logo key. The Start screen is displayed.
19.Start typing SQL Server Management Studio. The Search and Apps panes are displayed.
20.Click the SQL Server Management Studio tile. The Connect to Server dialog box is displayed.
21.Type SQLServerName.database.windows.net (replace SQLServerName with the name of the newly created server on Windows Azure).
22.Select SQL Server Authentication from the Authentication drop-down list.
23.Type SQLAdmin in the Login text box.
24.Type PaSSwOrd in the Password text box.
25.Click the Connect button. The Microsoft SQL Server Management Studio window is displayed.
26.Right-click the Databases node in the Object Explorer window, and then select the Import Data-tier Application option from the context menu. The Introduction page of the Import Data-tier Application wizard is displayed.
27.Click the Next button. The Import Settings page is displayed.
28.Ensure that the Import from local disk option is selected.
29.Click the Browse button. The Open dialog box is displayed.
30.Browse to the location where BlueYonder.bacpac file is saved.
31.Select the BlueYonder.bacpac file.
32.Click the Open button.
33.Click the Next button.
34.Click the Next button.
35.Click the Finish button, and wait until the database import procedure is finished.
36.Click the Close button.
37.Press F5 to refresh the database list.
38.Expand the Databases node, and verify that the BlueYonder database is added.
39.Close the Microsoft SQL Server Management Studio window.
40.Switch to the Internet Explorer window.
41.Click the user icon in the upper-right corner of the Windows Azure page. A context menu is displayed.
42.Select Sign out.
43.Close the Internet Explorer window.
Developing Windows Azure and
Web Services Lab @ home 1 Ans 3
In
this exercise, you have to create Entity Framework wrappers for the Blue Yonder
database.
To implement the required functionality, you need to perform the following steps:
1. Press the Windows logo key. The Start screen is displayed.
2. Start hyping Visual Studio 2012. The Search and Apps panes are displayed.
3. Click the Visual Studio 2012 tile in the Apps pane. The Choose Default Environment Settings dialog box is displayed.
4. Select Visual C# Development Settings in the Choose your default environment settings list box.
5. Click the Start Visual Studio button. The Microsoft Visual Studio splash screen is displayed for a while. Then, the Start Page - Microsoft Visual Studio window is displayed.
Note: If Help Content Manager dialog box is displayed, click the Yes button.
6. Select FILE—New—Project. The New Project dialog box is displayed.
7. Ensure that the Installed—Templates—Visual C# nodes are expanded in the navigation pane.
8. Select the Windows node.
9. Select Class Library from the list of templates in the middle pane.
10. Select and replace the existing text in the Name text box with BlueYonder.Model.
11. Select and replace the existing text in the Location drop-down list with D:\Exercises\Module_01\Exercise_02.
12. Ensure that the Create directory for solution check box is selected.
13. Click the OK button. The Classl .cs file is displayed in the BlueYonder.Model - Microsoft Visual Studio window.
14. Ensure that the Solution Explorer window is open.
15. Right-click the Classl.cs file, and then select Delete from the context menu. The Microsoft Visual Studio message box is displayed.
16. Click the OK button.
17. Right-click the BlueYonder.Model node in the Solution Explorer window, and then select Add—New Item. The Add New Item - BlueYonder.Model dialog box is displayed.
18. Ensure that the Installed—Visual C# Items nodes are expanded in the left pane.
19. Select the Data node from the left pane.
20. Select ADO.NET Entity Data Model from the list of templates available in the middle pane.
21. Select and replace the existing text in the Name text box with EntityModel.
22. Click the Add button. The Choose Model Contents page of the Entity Data Model Wizard is displayed.
23. Ensure that the Generate from database option is selected under the What should the model contain section.
24. Click the Next button. The Choose Your Data Connection page is displayed.
25. Click the New Connection button. The Choose Data Source dialog box is displayed.
26. Select the Microsoft SQL Server option from the Data source list box.
27. Ensure that the Always use this selection check box is selected.
28. Click the Continue button.
29. Type SQLServerName.database.windows.net (replace SQLServerName with your server name) in the Server name text box.
30. Select the Use SQL Server Authentication option.
31. Type SQLAdmin in the User name text box.
32. Type PaSSwOrd in the Password text box.
33. Select the Save my password check box.
34. Click the Test Connection button. The Microsoft Visual Studio message box is displayed.
35. Click the OK button.
36. Select BlueYonder from the Select or enter a database name drop-down list.
37. Click the OK button. The Choose Your Data Connection page of the Entity Data Model Wizard is displayed.
38. Select the Yes. include the sensitive data in the connection string option.
39. Click the Next button. The Choose Your Database Objects and Settings page is displayed.
40. Expand the Tables—dbo nodes.
41. Select the Locations and Travelers check boxes.
42. Click the Finish button. The Security Warning dialog box is displayed.
43. Selec the Do not show this message again check box.
44. Click the OK button. The EntityModel.edmx file is displayed.
45. Select FILE-Save All.
46. Close the BlueYonder.Model - Microsoft Visual Studio window.
Developing Windows Azure and
Web Services Lab @ home 1 Ans 4
In this exercise, you will create a website that exposes the Web
API for Create. Retrieve. Update. Delete (CRUD) operations on the BlueYonder
database.
To implement the required functionality, you need to perform the following tasks:
1. Browse to the location where you have saved the Exercise 03.zip file.
2. Extract the Exercise 03.zip file.
3. Double-click the Exercise 03 folder.
4. Double-click the BlueYonder.Model folder.
5. Double-click the BlueYonder.Model.sin file. The BlueYonder.Model - Microsoft Visual Studio window is displayed.
6. Ensure that the Solution Explorer window is opened.
7. Right-click the Solution 'BlueYonder.Model' (1 project) node, and then select Add->New Project option from the context menu. The Add New Project dialog box is displayed.
8. Ensure that the Visual C# node is expanded under the Installed node in the left pane.
9. Select Web under the Visual C# node.
10. Select ASP.NET MVC 4 Web Application from the list of templates in the middle pane.
11. Select and replace the text in the Name text box with BlueYonder.MVC.
12. Click the OK button. The NewASP.NET MVC 4 Project dialog box is displayed.
13. Select the Web API template.
14. Click the OK button. The ValuesController.es file is displayed in the BlueYonder.Model - Microsoft Visual Studio
window.
15. Right-click the BlueYonder.MVC project in the Solution Explorer window, and then select Add Reference. The Reference Manager - BlueYonder.MVC dialog box is displayed.
16. Click the Solution node in the left pane.
17. Select the BlueYonder.Model check box in the middle pane.
18. Click the OK button.
19. Double-click the App.config file of the BlueYonder.Model project.
20. Locate the connectionStrings> section, and then select the <add> element, including its attributes.
21. Press the Ctrl+C keys to copy the element to the clipboard.
22. Double-click the Web.config file of the BlueYonder.MVC project.
23. Locate the connection Strings> section.
24. Place the cursor after the connection Strings> tag. and then press the Ctrl+V keys to paste the connection string.
Note: Ensure that you replace the name of the database server in the connection string with the name of the recently created database server on Windows Azure Management Portal.
25. Press the Ctrl+S keys to save the changes.
26. Select BUILD—Build Solution.
27. Select VIEW—Server Explorer.
28. Right-click the Data Connections node, and then select the Refresh option from the context menu.
29. Expand the Data Connections node. The BlueYonderEntities (BlueYonder.MVC) node is displayed under the Data Connections node.
30. Right-click the Controllers node of the BlueYonder.MVC project, and then select Add—Controller. The Add Controller
dialog box is displayed.
31. Select and replace the text in the Controller name text box with LocationsController.
32. Select the API controller with read/write actions, using Entity Framework option from the Template drop-down list.
33. Select Location (BlueYonder.Model) from the Model class combo box.
34. Select BlueYonderEntities (BlueYonder.Model) from the Data context class combo box.
35. Click the Add button.
36. Right-click the BlueYonder.MVC project, and then select the Set as Startup Project option from the context menu.
37. Press the Ctrl+F5 keys. The Internet Explorer window is displayed.
38. Append api/locations to the address in the address bar. and then press the Enter key. At the bottom of the Internet Explorer window, a prompt appears.
39. Click the Open button.
40. Select Notepad from the list of available programs if you are prompted to select a program to open the file. When Notepad opens, you should see a list of Location entities, encoded with the JavaScript Object Notation (JSON) format.
41. Close Notepad
42. Close the Internet Explorer window.
43. Switch to Microsoft Visual Studio 2012.
44. Close Microsoft Visual Studio 2012.
No comments:
Post a Comment