Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application Build with sdk .NET9 rc-1 and .NET9 rc-2 were not working in Azure app service(Linux) #109212

Closed
RajaVignesh99 opened this issue Oct 25, 2024 · 4 comments
Labels
area-Host needs-author-action An issue or pull request that requires more info or actions from the author.

Comments

@RajaVignesh99
Copy link

Description

I have created a new ASP.NET core web application (Razor Pages), and build the application with .NET9 rc-1 sdk. Then while publishing it to Azure app service Linux, it throws application error. The same behavior occurs while building the application with .NET9 rc-2 sdk (latest).

But If I build the same application with .NET9 preview 6, the application works as expected and the output was proper.

Note: In local windows machine, the application runs properly with the .NET9 rc1- or rc-2 sdk

Reproduction Steps

  1. Install the .NET9 rc-1 or rc-2 sdk in your machine.
  2. Create a new Asp.Net Core Web app (Razor pages) and build the application.
  3. Now publish the application in the Azure app service (Linux).
  4. You will get 504 gateway error initially and then while refreshing the page, you will get the Application error on the web page.

Expected behavior

The application should work properly without any errors as it runs properly in Local.

Actual behavior

It throws application error

Regression?

It works properly with the .NET9 preview6 version

Known Workarounds

No response

Configuration

Architecture: x64 (amd)

Other information

No response

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Oct 25, 2024
@martincostello
Copy link
Member

What is the actual error thrown by the application when published? You should be able to enable logging and retrieve it from the App Service logs.

@RajaVignesh99
Copy link
Author

@martincostello , Please find the application logs below,

2024-10-25T09:56:16.795181643Z _____
2024-10-25T09:56:16.795238345Z / _ \ __________ _________ ____
2024-10-25T09:56:16.795244545Z / /\ \__ / | _ __ _/ __ \
2024-10-25T09:56:16.795249745Z / | / /| | /| | /\ /
2024-10-25T09:56:16.795254345Z _
|__ /_____ _/ || __ >
2024-10-25T09:56:16.795259746Z / / /
2024-10-25T09:56:16.795264246Z A P P S E R V I C E O N L I N U X
2024-10-25T09:56:16.795268746Z
2024-10-25T09:56:16.795272746Z Documentation: http://aka.ms/webapp-linux
2024-10-25T09:56:16.795277146Z Dotnet quickstart: https://aka.ms/dotnet-qs
2024-10-25T09:56:16.795281546Z ASP .NETCore Version: 9.0.0-preview.6.24327.7
2024-10-25T09:56:16.795285846Z Note: Any data outside '/home' is not persisted
2024-10-25T09:56:22.837135944Z Starting OpenBSD Secure Shell server: sshd.
2024-10-25T09:56:22.888630444Z WEBSITES_INCLUDE_CLOUD_CERTS is not set to true.
2024-10-25T09:56:23.653020844Z Starting periodic command scheduler: cron.
2024-10-25T09:56:23.692483400Z Running oryx create-script -appPath /home/site/wwwroot -output /opt/startup/startup.sh -defaultAppFilePath /defaulthome/hostingstart/hostingstart.dll -bindPort 8080 -bindPort2 '' -userStartupCommand 'dotnet WebApplication1.dll'
2024-10-25T09:56:23.941273978Z Could not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
2024-10-25T09:56:23.942864337Z Could not find operation ID in manifest. Generating an operation id...
2024-10-25T09:56:23.952649798Z Build Operation ID: b630e2c4-0565-4abe-89ff-577f37b5f330
2024-10-25T09:56:25.059939051Z
2024-10-25T09:56:25.068352862Z Agent extension
2024-10-25T09:56:25.068375862Z Before if loop >> DotNet Runtime
2024-10-25T09:56:25.111413350Z DotNet Runtime 9.0Writing output script to '/opt/startup/startup.sh'
2024-10-25T09:56:25.199276892Z Running user provided startup command...
2024-10-25T09:56:25.230119930Z You must install or update .NET to run this application.
2024-10-25T09:56:25.230167932Z
2024-10-25T09:56:25.230182532Z App: /home/site/wwwroot/WebApplication1.dll
2024-10-25T09:56:25.230188633Z Architecture: x64
2024-10-25T09:56:25.238401236Z Framework: 'Microsoft.NETCore.App', version '9.0.0-rc.2.24473.5' (x64)
2024-10-25T09:56:25.238733448Z .NET location: /usr/share/dotnet/
2024-10-25T09:56:25.240592417Z
2024-10-25T09:56:25.240610617Z The following frameworks were found:
2024-10-25T09:56:25.240617117Z 9.0.0-preview.6.24327.7 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
2024-10-25T09:56:25.240622518Z
2024-10-25T09:56:25.240627518Z Learn more:
2024-10-25T09:56:25.240632418Z https://aka.ms/dotnet/app-launch-failed
2024-10-25T09:56:25.240647819Z
2024-10-25T09:56:25.240653019Z To install missing framework, download:
2024-10-25T09:56:25.240658119Z https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=9.0.0-rc.2.24473.5&arch=x64&rid=linux-x64&os=debian.12

@martincostello
Copy link
Member

Looks like your instance of App Service doesn't have .NET 9 RC1 or RC2 installed. You'll need to deploy the application as a self-contained application until it does so that the runtime the compiled application needs is present in the deployment.

@elinor-fung elinor-fung added the needs-author-action An issue or pull request that requires more info or actions from the author. label Oct 28, 2024
@agocke
Copy link
Member

agocke commented Nov 21, 2024

Closing as answered -- until AppService has .NET 9 available, self contained is the only option.

@agocke agocke closed this as completed Nov 21, 2024
@dotnet-policy-service dotnet-policy-service bot removed no-recent-activity untriaged New issue has not been triaged by the area owner labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Host needs-author-action An issue or pull request that requires more info or actions from the author.
Projects
Status: No status
Development

No branches or pull requests

4 participants