jrz
jrz

Reputation: 1387

Web App is not loading after deploying

I have a working app service named "matanwebserver" over a subscription in Azure. This is a website that I am working on. I work with Visual Studio.

Now I created another Web App on the same subscription that I will use as an integration site so I can test my code before publishing to the production site. The name of the new Web App is "matanwebservertest". After publishing my project from Visual Studio to the new Web App, when I enter it's URL it seems like nothing happened, but it writes "Your App Service app is up and running".

What am I doing wrong?

Added some screenshots for a better understanding of the issue

  1. In Visual Studio I do right click on the web app which is called "MatanWebServer" and choose "publish". Then I choose the new web app that I just created on Azure portal which called "matanwebserertest", and publish successfully.

enter image description here

  1. This is the original (production) website. which its address is http://matanwebserver.azurewebsites.net

enter image description here

  1. After publish to the matanwebservertest web app, I expect to see a "copy" of the original site, but it seems like nothing is there.

enter image description here

Upvotes: 12

Views: 36627

Answers (5)

Asif Ali
Asif Ali

Reputation: 1

I had same issue but, i used Azure Web Deploy from Visual Studio. Initially it did not work. After that i tried with associating the instance with hosting and redeployment. It worked then.

Associating Instance with hosting

Upvotes: 0

AtLeastTheresToast
AtLeastTheresToast

Reputation: 387

My issue was the .NET version I am using ASP.NET 4.6 for local builds but selected its runtime as 3.5

Went to Configuration > General Settings and changed the .NET Version to 4.8 (this should only work if you are using ASP.NET not Core) did the trick for me.

Upvotes: 0

AverageProgrammer
AverageProgrammer

Reputation: 184

I had the same issue, I fixed it by adding the command "dotnet YourArtifact.dll" command in:

mywebapp > Application Settings (Configuration) > General settings > Stack Settings -> Startup command

Adding startup command to Azure webapp

Upvotes: 10

Bruce Chen
Bruce Chen

Reputation: 18465

AFAIK, when publishing web application to Azure Web App via the publish wizard of VS, you would see the following similar logs:

Updating file (brucewebapp01\bin\AspDotNet-MVC-Website.dll)
OR
Adding file (brucewebapp01\Scripts\respond.js)

Your App Service app is up and running

Go to your app's Quick Start guide in the Azure portal to get started or read our deployment documentation.

It seems that your web app only picks up the hostingstart.html default page which is automatically created after you created your web app. The default documents for your web app look like this:

enter image description here

As Joy Wang commented, you'd better check your deployed contents under your matanwebserertest web app and compare them with the web contents under your production web app via KUDU or Azure App Service Editor or FTP tools to make sure that you have correctly deployed the proper web contents into your test web app. Details you could follow here.

Also, you could try to create a new web app and manually copy / drag the local published web contents into your new web app (D:\home\site\wwwroot) via KUDU or FTP tools to narrow this issue.

Upvotes: 3

Munawar
Munawar

Reputation: 2587

To configure staging and production environment on Azure, use builtin feature "deployment slots". Follow these links to read more about deployment slots.

Documentation to Set up staging environments in Azure App Service

Video Tutorial to setup Azure WebSites - Deployment Slots for Staging Sites

Enabling Deployment Slots To Safely Deploy Applications To Azure App Service

Upvotes: 0

Related Questions