0% found this document useful (0 votes)
69 views16 pages

SWE40006-Software Deployment and Evolution-H1

The document outlines the tasks for a software deployment portfolio, detailing steps for creating an Azure account, installing development tools, and deploying applications. It includes instructions for developing C# and PHP applications, deploying them to Azure, and troubleshooting common issues encountered during deployment. The outcome highlights successful deployment of both ASP.NET and PHP apps on Azure, demonstrating integration capabilities between the two technologies.

Uploaded by

Urban Creators
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views16 pages

SWE40006-Software Deployment and Evolution-H1

The document outlines the tasks for a software deployment portfolio, detailing steps for creating an Azure account, installing development tools, and deploying applications. It includes instructions for developing C# and PHP applications, deploying them to Azure, and troubleshooting common issues encountered during deployment. The outcome highlights successful deployment of both ASP.NET and PHP apps on Azure, demonstrating integration capabilities between the two technologies.

Uploaded by

Urban Creators
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

SWE40006-Software Deployment and Evolution

Deployment Portfolio Task 3

Task 3.1 Pass ............................................................................................................... 1


Create Azure account ................................................................................................ 1
Install visual Studio/VS Code ..................................................................................... 3
Deploy any existing app to cloud via Azure .................................................................. 4
Task 3.2 Credit ............................................................................................................. 7
Develop a C# app ...................................................................................................... 7
Deploy your app to cloud via Azure ............................................................................. 8
Deactivate your app ................................................................................................ 10
Task 3.3 HD ............................................................................................................... 12
Install PHP (can use a separate shell or add as an extension to visual studio/VS Code) 12
Develop a web app .................................................................................................. 12
Deploy app to cloud via Azure .................................................................................. 13

Task 3.1 Pass


Create Azure account
Go To Microsoft
Azure home page.
Home - Microsoft
Azure
Enter the necessary
details and select
Azure for students
for access or Azure
free trail, which is for
12 months.

Get your academic


status verified.
Check email and
verify.

Account created
with $100 credits. Or
you can choose the
12-month Free trial.
Home page

Install visual Studio/VS Code


Download visual Studio
Installer will be downloaded,
Run the installer.

Modify the Workload as needed.

Make sure we have ASP.NET and


web development and Azure
development
Sign in and verify

Azure CLI for debugging

Deploy any existing app to cloud via Azure


Go to the publish and then Select Azure.

New
Select the creating a Web services Window
Enter the name and select region and other

Enter the details needed as region and


resources groups
Once published click in publish to upload
the at least version.

https://webapplication120250914175859-
c8ctbrd4hphxcqh0.canadacentral-
01.azurewebsites.net
Task 3.2 Credit
Develop a C# app
Creating a C# app, create a new Item and
link it to the Index page.
Deploy your app to cloud via Azure
Follow the same procedure and publish it on the Azure by creating Web app service.
https://webapplication120250914175859-c8ctbrd4hphxcqh0.canadacentral-
01.azurewebsites.net
Deactivate your app
Go to Azure Portal and then App Services.

Select your web app


Select your web app,
Three dots and then stop
Confirms Yes

Now App is Deactivated temporary.

Checked link and no active


Task 3.3 HD
Install PHP (can use a separate shell or add as an extension to visual
studio/VS Code)
Download PHP from
https://windows.php.net/download
Unzip and edit enviroment variables

php -v
To check the version and if its installed.

Develop a web app

Creating web app with PHP

PHP Form Validation Example


'.$errors['name'].'
'; ?> <div>
<input type="email" name="email" placeholder="Enter your
email" value="<?= $email ?>" required />
<?php if(isset($errors['email'])) echo '<div
class="error">'.$errors['email'].'</div>'; ?>
</div>

<div>
<input type="number" name="age" placeholder="Enter your age"
value="<?= $age ?>" required />
<?php if(isset($errors['age'])) echo '<div
class="error">'.$errors['age'].'</div>'; ?>
</div>

<button type="submit">Submit</button>
</form>

Deploy app to cloud via Azure


Go on publish, create resources groups, enter the region for them.

Finalize and them publish the at least version.

https://jugrajphpwebapp20250914193557-c0eaa6d6b8esb9er.canadacentral-
01.azurewebsites.net

Trouble shooting
1. Deployment Pending Content Error

Issue: After deploying the first ASP.NET app, Azure displayed the message:
“Your web app is running and waiting for your content.”

Cause: Content was not correctly published from Visual Studio to Azure.

Resolution: Used Publish option in Visual Studio → reselected App Service target →
confirmed that project files were included. After republishing, the app loaded successfully.

2. Multiple OnPost() Methods Conflict (C# App)

Issue: While adding greeting and calculator features, the C# IndexModel had two OnPost()
methods, causing build errors.

Cause: ASP.NET Razor Pages only allows a single OnPost() per page.

Resolution: Combined into one method with an action parameter (e.g., "greet" or
"calculate").
3. Missing PHP Execution

Issue: PHP files placed under /php/ folder returned 404 Not Found when accessed on
Azure.

Cause:

Initial deployment was to a Static Web App, which doesn’t support PHP.

PHP was also mistakenly embedded inside .cshtml Razor pages, which ASP.NET cannot
interpret.

Resolution:

Learned that PHP requires an App Service with PHP runtime.

Moved PHP code into .php files, and deployed separately to a PHP App Service.

Linked C# Razor app to PHP app using an <a href> link.

4. Namespace Registration Error

Issue: Deployment attempt triggered:


“The subscription is not registered to use namespace 'Microsoft.OperationalInsights'.”

Cause: The Azure subscription was not registered for that resource provider.

Resolution: Registered the provider via Azure Portal → Subscriptions → Resource Providers
→ Register Microsoft.OperationalInsights.

5. Wrong Azure Service Chosen

Issue: Initially created a Static Web App, which caused problems with running PHP and
server-side C#.

Cause: Static Web Apps only support HTML, CSS, and JS.

Resolution: Recreated the app using App Service (Web App) with appropriate runtime
(ASP.NET Core for C#, PHP 8.x for PHP).

6. PHP Form Validation Placement


Issue: Tried embedding PHP form validation code directly inside a Razor (.cshtml) page.
This caused build errors.

Cause: ASP.NET Core does not parse PHP code.

Resolution: Kept PHP code in its own PHP file and linked it separately from the main Razor
app.

Outcome:
• Successfully deployed an ASP.NET C# multi-feature app (Greeting, Calculator,
Quotes).
• Successfully deployed a PHP app with form validation as a separate Azure Web
App.

Both apps are running on Azure and can be linked together.

You might also like