ade12.Q4.W8 Final

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Computer Programming (.

Net) – Grade 12
Learning Activity Sheets
Quarter 4

Republic Act 8293, section 176 states that: No copyright shall subsist in any work of
the Government of the Philippines. However, prior approval of the government agency or
office wherein the work is created shall be necessary for exploitation of such work for profit.
Such agency or office may, among other things, impose as a condition the payment of
royalties.
Borrowed materials (i.e., songs, stories, poems, pictures, photos, brand names,
trademarks, etc.) included in this activity sheet are owned by their respective copyright
holders. Every effort has been exerted to locate and seek permission to use these materials
from their respective copyright owners. The publisher and authors do not represent nor claim
ownership over them.

Published by the Department of Education – Schools Division of Tacloban City


Schools Division Superintendent: Mariza S. Magan
Assistant Schools Division Superintendent: Edgar Y. Tenasas

Development Team of the Activity Sheet

Writers: Emmarnie S. Estoque


Evaluator: Almer H. Bugal
Management Team:
CID Chief: Mark Chester Anthony G. Tamayo
Division EPS of LRMS: Gretel Laura M. Cadiong
Division Learning Area EPS: Evelyn P. Malubay

Department of Education - Region No. VIII – Schools Division Office of Tacloban City

Office Address: Real St., Tacloban City


COMPUTER PROGRAMMING (.NET) GRADE 12
LEARNING ACTIVITY SHEET
Quarter 4 Week 8

Objectives: (TLE_ICTP.NET 11-12DAMWAIVa-e-41)


• Create RESTful API, modify URLs, and deploy ASP.NET MVC applications:
✓ Pack an ASP.NET MVC 5 Web application from a development computer to a
Web server for staging or production
✓ Deploy an ASP.NET MVC 5 Web application from a development computer
to a Web server for staging or production

Materials:
• Computer
• Microsoft Visual Studio (2013 or higher) with VB.Net

Let’s kick it off!

Look at the picture below and describe what you see.

Figure 1. Packaging and Deploying Web Apps


June 27, 2021. https://www.willmakerdirect.co.uk/images/legacy_software_package.jpg

Are you taking it?

• What do you see in the picture?


• How are the elements in the picture connected/related to each other
• How do you package and deploy an ASP.Net web application?
Here’s how it is!

,,,.

Introduction to ASP.Net Web Deployment


When you create an application, you usually launch and test it in Visual Studio.
The development web server for web application projects in Visual Studio 2017 is IIS
Express by default. IIS Express is more like full IIS than the Visual Studio Development
Server (also known as Cassini), which is the default in Visual Studio 2017. However,
neither development web server operates in the same way as IIS. Consequently, an app
could run and test correctly in Visual Studio but fail when it's deployed to IIS (Dykstra
2019).
You may test your application in two ways that are both reliable:
1. Deploy your application to IIS on your development workstation, following the same
process you'll perform in the production environment.
When you launch a web project in Visual Studio, you can configure it to use IIS, but
that won't test your deployment process. This method verifies that your application is
deployed correctly and that it runs in IIS.

2. Deploy your application to a test environment that is comparable to the one where it
will be used in production.
Web Apps in Azure App Service is the production environment for these tutorials. An
additional web app established on the Azure Service is the ideal test environment. It
would be built up similarly to a production web app, but it would only be used for
testing.

Using The Web Deploy Package In Visual Studio


One-Click publish options are available in Visual Studio 2010 and later editions.
We can deploy/publish an ASP.Net MVC web application directly from Visual Studio to
IIS or the server using those settings. In Visual Studio 2013, we have a variety of
publishing choices, one of which is the Web Deploy Package.

If we select the web deploy package method, then a .zip package will be created in
our local disk folder. We need to use this package to deploy using the CMD command
prompt, or we can mail this package to the admin team to deploy this .zip package.

We'll go over the steps for deploying or publishing an ASP.Net MVC web
application using Visual Studio's Web Deploy Package option. To publish and deploy
applications, assume that we already created a simple web application called OrderApp.

3 | Q4 W7
1. Right-click on Project name [OrderApp], and a list of options will appear. From that
List select [Publish] as shown below.

2. After selecting the Publish option, a new dialog will pop up with the name Publish
Web, as shown below.

4 | Q4 W7
3. In this dialog, it will first ask you to create a profile. If you have created a profile
already, you can select the profile from the Manage profile. Just click on the
Manage Profile button a new small dialog box of Edit Web Publish Profiles will
appear to see your already created Profile.

4. If you had proper look at the Publish Web dialog box, you would also find the Import
button. After clicking on the Import button below, a dialog will appear in this dialog
you can import from Azure Website or from Publish profile file.

This is the first time that we’ll publish this application; hence we are going to create a
New Profile.

5 | Q4 W7
Creating A New Profile
5. To create a New Profile, select [Select or Import a publish profile] dropdown. After
that a [New Profile] item will appear in the dropdown list select that.

6. After selecting a New Profile, a new dialog box will appear with the name [New
Profile] asking to enter a Profile name.

Here we entered the profile name as [OrderAppDeploy_WebDeploy_Package]. You can


enter the profile name of your choice.

7. After entering the profile name, click on the OK button. This process will move
forward to the next stage which is Connection setting.

6 | Q4 W7
Connection Setting in Visual Studio
8. Now we will select a way to publish our application. We need to move to the second
step connection and in the Publish method we need to select "Web Deploy Package".
9. After entering the package location, enter the site name [Default Web Site/OrderApp].

10. After entering all the details, click on the Next button to Move Forward to the next
deployment process stage.

Settings for Deploying Web Application


11. In this process, it will ask us to select Configuration mode. We have 2 options for this:
a. Debug - Debug is used for debugging.
b. Release Mode - Release is the final deployment.
Here we are going to select Release mode.
12. After Selecting Configuration, we have to specify which of the File Publish options
we want to apply:
a. If we want to remove additional files at the destination, then we need to select this
option.
b. If we want to precompile the application during publishing, then we need to select
this option.
c. If we want to exclude files from the App_Data folder, then we need to select this
option.

7 | Q4 W7
Here we will select 2 File Publish options as shown below:

Configuring Database Section


13. In cases where you have a remote connection string, you would need to configure it
from here. To do that you simply click the browse button to set the remote Connection
string. After choosing this option, we need to enter all the details of SQL Server with
Server name, Username, and Password.

8 | Q4 W7
14. After completing all database settings you may now click on the OK button.

15. After entering all details related to the destination Connection String click on the Next
button to preview the details of the deployment package.

16. After checking the preview, finally click on the Publish button to start the publishing
process.

9 | Q4 W7
17. After the publishing process is completed, check the folder which you selected to
publish these files into.

10 | Q4 W7
Now Do It!
ACTIVITY

Name: ______________________________________________ Date: ________________

Grade & Section: _____________________________________ Score: ________________

A. TRUE OR FALSE
Directions: Write TRUE if the statement is correct and write FALSE if the statement is
incorrect. Write your answers on the spaces provided before each item.

_______________ 1. The default development web server for web application projects in
Visual Studio 2017 is IIS express.

_______________ 2. There are one-click publish options that are available in Visual Studio
2010 and later versions.

_______________ 3. If choose to publish a web application using the web deploy package
method, then a .rar package will be created in your local disk folder

_______________ 4. If it is your first time to publish a web application, you will be required
to create a new profile.

_______________ 5. One of the application publishing choices available in Visual Studio


2013 is called Web Deploy Package.

B. ENUMERATION
Directions: Give what is being asked.

A. List the 2 Configuration Modes that you can choose from when deploying a web
application:

1. _________________________________________________________________

2. _________________________________________________________________

B. Give the 3 File Publish Options that you can choose from when deploying a web
application:

3. _________________________________________________________________

4. _________________________________________________________________

5. _________________________________________________________________

11 | Q4 W7
. Ace It!
ASSESSMENT
Name: ______________________________________________ Date: ________________

Grade & Section: _____________________________________ Score: ________________

SEQUENCING-TYPE TEST:
Directions: Arrange the following steps in packaging and deploying a .Net web application in
correct order by writing the correct step numbers on the spaces provided before each item.
Some of the items have already been answered for you.

_____ After the publishing process is completed, check the folder which you selected to
publish these files into.
__16_ After checking the preview, finally click on the Publish button to start the publishing
process.
_____ After entering all details related to the destination Connection String click on the Next
button to preview the details of the deployment package.
_____ After completing all database settings you may now click on the OK button.
_____ Click the browse button to set the remote Connection string.
_____ Specify which of the File Publish options you want to apply.
__11_ Select a Configuration mode.
_____ After entering all the details, click on the Next button to Move Forward to the next
deployment process stage.
_____ After entering the package location, enter the site name
_____ Select a way to publish our application by selecting Web Deploy Package.
_____ After entering the profile name, click on the OK button. This process will move
forward to the next stage which is Connection setting.
_____ After selecting a New Profile, a new dialog box will appear with the name [New
Profile] asking to enter a Profile name.

_____ To create a New Profile, select [Select or Import a publish profile] dropdown after
selecting a [New Profile] item will appear in the dropdown list select that.
_____ After clicking on the Import button below, a dialog will appear in this dialog you can
import from Azure Website or from Publish profile file.
_____ In this dialog, it will first ask you to create a profile. If you have created a profile
already, you can select the profile from the Manage profile.
_____ After selecting the Publish option, a new dialog will pop up with the name Publish
Web, as shown below.
_____ Right-click on Project name, and a list of options will appear. From that List select
Publish.

12 | Q4 W7
References:
• “Asp.Net MVC Publish with Web Deploy Package - Tutlane.” n.d. Tutorials for Asp.Net MVC, LINQ, C#, SQL Server,
Android, IOS, AngularJS, JOOMLA, JAVA, Perl, Php, MySQL - Tutlane - Tutlane. Accessed June 28, 2021.
https://www.tutlane.com/tutorial/aspnet-mvc/asp-net-mvc-publish-with-web-deploy-package.
• “Packaging .Net Web Applications.” Accessed July 1, 2021. https://help.veracode.com/r/compilation_ASPnet.
• Dykstra, Tom. 2019. “ASP.NET Web Deployment Using Visual Studio: Deploying to Test | Microsoft Docs.” Developer
Tools, Technical Documentation and Coding Examples | Microsoft Docs. January 6, 2019.
https://docs.microsoft.com/en-us/aspnet/web-forms/overview/deployment/visual-studio-web-deployment/deploying-to-
iis.
• Parekh, Jay. 2020. “How to Deploy Website on IIS.” C# Corner - Community of Software and Data Developers. June
9, 2020. https://www.c-sharpcorner.com/UploadFile/cb88b2/steps-to-deploy-website-on-iis/.

13 | Q4 W7

You might also like