Azure / azure-libraries-for-net

Azure libraries for .Net
MIT License
377 stars 190 forks source link

Deploying WebApp with package URI fails with 404, "No route registered for '/MSDeploy'" #1287

Open JosXa opened 2 years ago

JosXa commented 2 years ago

I am trying to use the Fluent API's .WithPackageUri deployment method as follows:

var appService = _azure.AppServices.WebApps.Define(_stackInfo.AppName)
     .WithExistingLinuxPlan(linuxPlan)
     .WithExistingResourceGroup(resourceGroup)
     .WithBuiltInImage(new RuntimeStack("DOTNETCORE", "5.0"))
     .WithSystemAssignedManagedServiceIdentity()
     .WithClientCertEnabled(true)
     .WithHttpsOnly(true)
     .Create();

...

var appService = await _azure.WebApps.GetByResourceGroupAsync(_stackInfo.ResourceGroup, _stackInfo.AppName);

var result = await appService.Deploy()
    .WithPackageUri(myPerfectlyValidSasUri)
    .WithExistingDeploymentsDeleted(true)
    .ExecuteAsync();

But the response from the endpoint is a 404 with "No route registered for '/MSDeploy'". This makes me think that maybe this feature is not enable on Linux plans?

When I add this package zip URI manually to the "WEBSITE_RUN_FROM_PACKAGE" setting, all works as expected.

weidongxu-microsoft commented 2 years ago

@JosXa This SDK is in maintenance mode. Please consider using the new SDK which to be released here https://aka.ms/azsdk/dotnet/mgmt

wenbya commented 1 year ago

any progress for this error ?

weidongxu-microsoft commented 1 year ago

This package is already deprecated.

weidongxu-microsoft commented 1 year ago

https://www.nuget.org/packages/Microsoft.Azure.Management.AppService.Fluent

zlaazlaa commented 9 months ago

@JosXa I got the same error code while creating a language bot using Azure Language Studio for the QnA service. My error info: {"code":"DeploymentFailed","target":"/subscriptions/189e2bc4-fa4e-47c5-bab5-**********/resourceGroups/**/providers/Microsoft.Resources/deployments/Microsoft.Template-20231007160908","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"BadRequest","message":"No route registered for '/MSDeploy'"}]} My solution: Before creating a bot, you need to deploy first, otherwise it can not find resource.

image

Your service type is different with mine, but I think we are the same reason. Hope this can help you.❤️

zlaazlaa commented 9 months ago

@JosXa I got the same error code while creating a language bot using Azure Language Studio for the QnA service. My error info: {"code":"DeploymentFailed","target":"/subscriptions/189e2bc4-fa4e-47c5-bab5-**********/resourceGroups/**/providers/Microsoft.Resources/deployments/Microsoft.Template-20231007160908","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"BadRequest","message":"No route registered for '/MSDeploy'"}]} My solution: Before creating a bot, you need to deploy first, otherwise it can not find resource. image Your service type is different with mine, but I think we are the same reason. Hope this can help you.❤️

What's more, according to this article, I created a new App Service Plan, whose default plan is standard plan.

image

Because preview plan is a free plan (consumption plan), which causing a new error code : {"code":"DeploymentFailed","target":"/subscriptions/189e2bc4-fa4e-47c5-bab5-**********/resourceGroups/********/providers/Microsoft.Resources/deployments/Microsoft.Template-20231007165519","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"target":"/subscriptions/189e2bc4-fa4e-47c5-bab5-**********/resourceGroups/********/providers/Microsoft.Resources/deployments/Microsoft.Template-20231007165519","message":"Consumption pricing tier cannot be used for regular web apps."}]}

zlaazlaa commented 9 months ago

@JosXa I got the same error code while creating a language bot using Azure Language Studio for the QnA service. My error info: {"code":"DeploymentFailed","target":"/subscriptions/189e2bc4-fa4e-47c5-bab5-**********/resourceGroups/**/providers/Microsoft.Resources/deployments/Microsoft.Template-20231007160908","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"BadRequest","message":"No route registered for '/MSDeploy'"}]} My solution: Before creating a bot, you need to deploy first, otherwise it can not find resource. image Your service type is different with mine, but I think we are the same reason. Hope this can help you.❤️

What's more, according to this article, I created a new App Service Plan, whose default plan is standard plan. image Because preview plan is a free plan (consumption plan), which causing a new error code : {"code":"DeploymentFailed","target":"/subscriptions/189e2bc4-fa4e-47c5-bab5-**********/resourceGroups/********/providers/Microsoft.Resources/deployments/Microsoft.Template-20231007165519","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"target":"/subscriptions/189e2bc4-fa4e-47c5-bab5-**********/resourceGroups/********/providers/Microsoft.Resources/deployments/Microsoft.Template-20231007165519","message":"Consumption pricing tier cannot be used for regular web apps."}]}

Finally, I created the bot successfully.

image