HTTP Error 500.35 - ANCM Multiple In-Process Applications in same Process - Azure App Service dotnet 5 - .net-core

I am deploying 2 different projects in an azure web app service. The service is configured to be running dotnet 5. I am using virtual directory to deploy 3 applications in this app service. The default app, a dotnet 5 app, runs fine. On the first subsites if I deploy a dotnet 2.1 app, that works perfectly. But when I try to deploy a dotnet 5 app on the second subsite it shows the mentioned error in question - added an image of it
As far as I understood this is probably happening because they share same application pool. I tried the following stuffs:
Deployed as a self-contained app
Added AspNetCoreModuleV2 and out of process tags in csproj files of all projects as per this answer (and a few more answers from that link)
Frankly speaking I couldnt find much help in the net and not really sure how to proceed with this.

Related

Unable to publish the artifact for .NET Core on Azure Devops (pipeline)

Unable to publish the artifact for .NET Core, I can able to build but can't publish on Azure Devops.
Frontend: Angular
Backend: .NET Core 6
SQl : MSSQL server
Front code : Angular,
Back end : dotnet 6,
Sql : MSsql Server
Given that your project could be restored correctly, I suppose that you could add a --no-restore to your dotnet publish argument and test again.
Updated on 1/2
======================================================
I suppose there are multiple possible caused for your current issue of https 500.30. You could visit this doc to troubleshoot.
Additionally,
1.Check your hosting model. Confirm that whether it's IN Of Process or Out of Process. You can check the configuration in you csproj file. if you using In of Process, try to change it to
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
2.If you are deploying win-x64 app and try to have it published using an Application Pool that supports 32-bit apps, you will need to make them match-up.
3.Check in portal.azure.com for your web-app whether it is running correctly.
4.Go to portal.azure.com check you app console, and try to manually start your project with dotnet ServerApp.dll.
==========================================================
Updated on 1/9
Hi devendar
Check this doc Bad Gateway errors in Application Gateway for further troubleshoot.

How to debug ASP.NET MVC web app without pushing a commit in CodeStar (AWS)

There is something that I cannot really understand during the AWS CodeStar development flow. Let's say I am developing a web app (MVC) locally, it works and now I want to test it remotely before deploying to the final production environment.
CodeStar has created a Git repository for pushing the changes and it automatically starts the building, testing and deployment tasks. I have few questions:
How can I deploy a change to verify that it works BEFORE doing any sort of commit (avoiding to put dirty commits in the case there are some errors) to the remote environment?
How can I DEBUG a remotely ASP.NET application (breakpoints, etc...)?
How can I tell the application to use a different development database (or any other AWS service) while it is in the development "status" ?
Thank you for your delucidations.

How to deploy a solution with two projects to Azure App Service?

I am trying to minimize the cost of running my web app in Azure App Service. I have a Visual Studio 2017 solution with two Web Projects: Web and API (both .NET Core). The entire solution is part of a single GitHub Repo. Before adding the API project, the build and deployment to Azure App Service was automated. My goal is to deploy both projects under the same App Service (to minimize cost) with two subdomains (e.g. www.example.com and api.example.com) and keep everything automated.
Is this something that can be done? Can somebody please help me understand how this can be done? Can those settings be commited?
An Azure App Service Plan can contain multiple web apps. Normally when you use the Azure portal to connect it to source control, Kudu (the tool behind App Service Plans), will create a deployment script for that site.
In case you want to deploy two projects of a single solution (and git repo) to different Web Apps you have to do the following:
Create two web apps under the same App Service Plan
Connect both of them to the same git repo for automated deployments
Modify the deployment parameters
I'm going to suppose you know how to do the first two steps.
To modify the deployment parameters, you could either modify the deployment script by downloading it through Kudu and adapting it or, much simpler, configure it through the portal:
Go the App1 => Application Settings => Add setting PROJECT with value
<path>\<path-to-app1>.csproj
Go the App2 => Application Settings => Add setting PROJECT with value <path>\<path-to-app2>.csproj
Every time you push up a change, both web apps will receive an update, but they will deploy a different part to the web site.
More information can be found here (see last paragraph): https://github.com/projectkudu/kudu/wiki/Customizing-deployments

Unable to deploy ASP.NET 5 (ASP.NET Core 1) to Azure

I have a ASP.NET 5 (ASP.NET Core 1) solution here in GitHub which has multiple projects in it. I have been able to build and publish the project just fine on my local machine. But I am not able to publish the same project on my azure web app.
I tried this, this, this, this and a lot more. I tried doing direct ftp publishing, custom deployment scripts,just XCOPY command on the custom script to copy published files from repository to site folder in azure. But nothing seems to work.
The continuous deployment within azure gives me an error "could not find a part of the path while doing dnu publish in the deployment script of azure every time.
Even when I am directly copying and pasting the locally published files to azure site folder via ftp. The site won't run.
I just want to have the site deployed on azure and if possible with continuous integration.
I have spend 2 days trying to figure out a solution. And I have given up on it now. Any help and directions would be highly appreciated.
What .NET Framework version are you compiling against. Sometime back I ran into this and finding the real cause took me a bit. The cloud service guest OS are behind a bit see this.

Remotely publish ASP.NET 5 to IIS

I've got an ASP.NET 5 project that I'd like to deploy to a remote server. I don't have remote desktop access to this machine, otherwise I could follow the same method most people use when deploying to IIS.
I'm able to deploy to my IIS 8.5 just fine on the same machine as my development. First I package my project to get the approot and wwwroot directories. Then, I point IIS to my wwwroot, and all works fine.
The problem is trying to deploy remotely. Normally I would zip up my MVC 5 project and use the IIS gui to 'import' an application.
That doesn't work for my MVC 6 project. Either I'm zipping it up incorrectly or MVC 6 projects can't be deployed this way.
How do you publish a vNext application to a remote IIS server?
Edit:
Just FYI, I am using Microsoft's Web Deploy Remote Agent to deploy this to the server. http://www.asp.net/web-forms/overview/deployment/configuring-server-environments-for-web-deployment/configuring-a-web-server-for-web-deploy-publishing-(remote-agent)
It works perfectly for MVC 5 apps, because developers can easily deploy web apps and IT can restrict access to the machines, but the problem is trying to deploy MVC 6 apps using this agent.
I'm not questioning how to deploy MVC 6 projects to IIS, because that's already answered Here, this is concerning how to remotely deploy to IIS.
I solved this by updating to Web Deploy 3.6. The newest version includes a specialized provider for deploying ASP.NET 5 applications.
Details on how to use it can be found with this blog post:
http://azure.microsoft.com/blog/2014/08/11/web-deploy-3-6-beta-released/
The download link is as follows:
http://www.microsoft.com/en-us/download/details.aspx?id=43717
Use the contentPathLib provider or enable contentlibextension.
Example usage:
C:\Program Files (x86)\IIS\Microsoft Web Deploy V3> msdeploy
-verb:sync -source:iisapp=C:\release\Publish\wwwroot -dest:iisapp="Default Web Site/ExampleApp",computerName=machinename -enablelink:contentlibextension
To my knowledge, there isn't a GUI supporting these deployment methods yet. I assume this is because vNext is in Beta, and is expected to have breaking changes.

Resources