Reputation: 5791
I was experimenting with a new feature that comes with .NET core sdk 2.2 that is supposedly meant to improve performance by around 400%.
Impressive so I tried it out on my ABP (ASP.NET Boilerplate) project
Template asp.net core mvc 4.0.2.0
I added the following to my web.mv.cproj
file
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
</ItemGroup>
Unfortunately I do not think this version of the ABP framework is compatible as the project simply fails to run and throws: (eventually)
HTTP Error 500.30 - ANCM In-Process Start Failure
I checked the logs after setting stdoutLogEnabled="true"
in the web.config and re-trying - but no entries.
Has anybody had any success running the current ABP against a asp.net core in process setup?
I'm thinking this may be something only available in ABP vNext.
Upvotes: 177
Views: 466588
Reputation: 5523
From ASP.NET Core 3.0+ and visual studio 19 version 16.3+ You will find section in project .csproj file are like below-
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
There is no AspNetCoreHostingModel
property there. You will find Hosting model selection in the properties of the project. Right-click the project name in the solution explorer. Click properties.
Click the Debug menu.
Scroll down to find the Hosting Model option.
Select Out of Process.
Save the project and run IIS Express.
UPDATE For Server Deployment:
When you publish your application in the server there is a web config file like below:
change value of 'hostingModel'
from 'inprocess'
to 'outofprocess'
like below:
From Several Comments, I have learnt that 'Out Of Process' is worked for them instead of 'Default (In Process)'.
Upvotes: 100
Reputation: 983
for me issue was that old project in .net core 3.1 loaded in vs 2022
SOMEHOW added to webconfig environmentVariables
<environmentVariable name="ASPNETCORE_HOSTINGSTARTUPASSEMBLIES" value="Microsoft.AspNetCore.Watch.BrowserRefresh;Microsoft.WebTools.BrowserLink.Net" />
<environmentVariable name="DOTNET_STARTUP_HOOKS" value="C:\Program Files\dotnet\SDK\7.0.201\DotnetTools\dotnet-watch\7.0.201-servicing.23116.14\tools\net7.0\any\middleware\Microsoft.AspNetCore.Watch.BrowserRefresh.dll;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Microsoft\Web Tools\Browser Link\Microsoft.WebTools.BrowserLink.Net.dll" />
<environmentVariable name="ASPNETCORE_AUTO_RELOAD_WS_ENDPOINT" value="wss://localhost:44345/ApiDotNetCore/,ws://localhost:64285/ApiDotNetCore/" />
<environmentVariable name="DOTNET_MODIFIABLE_ASSEMBLIES" value="debug" />
<environmentVariable name="ASPNETCORE_AUTO_RELOAD_WS_KEY" value="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7s+b3aeCFt3VjmXgwX73r2K4vZ1hWvXkXqEdG8hjDvdNkqJx6fQbOcfZ91tOTh54Q4Bm4rm6Cc4qe3stRZRdJ0+pUpcA7K1gzarHjcfTPx4frIwfIFlQF9FmH4O5SA+OC5QYXAgqwXcHukYXZAA6LMdRDceeQBy8Y0JyTgKePo3ZyjkSByDgTmfIc+jObBuvaDoxjOv+GyD84VeNsw4O1bvo1NQ9tlTObDeQIDAQAB" />
<environmentVariable name="ASPNETCORE_AUTO_RELOAD_VDIR" value="/" />
after removing thease and keeping just
<environmentVariable name="COMPLUS_ForceENC" value="1" />
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" />
as it was sometimes ago - it works fine !!
hope this helps someone regards
Upvotes: 0
Reputation: 337
This error was blowing my mind. I tried all the things.
The magic happened when I deleted the published site from IIS, deleted the Application pool and created all over again. After that, It worked on the first request.
I don't know If I had broken some configuration before, but setting up the ISS site again worked.
Upvotes: 1
Reputation: 4202
I got the same error on my development machine running Windows 10. The error did not go away after I installed dotnet core hosting bundle. I had to go to Event Viewer to get the detailed error. Your underlying issue (if any) may be different than mine. Point is, if you're on a Windows machine, Event Viewer is there to provide details. Hope this helps someone.
Upvotes: 30
Reputation: 212
If you got this error after configuring the Azure Key Vault with the .NET Core application, please refer the following article. It will definitely help you to fix it. https://medium.com/@aravindi.s.amarasinghe/configure-azure-key-vault-with-net-core-project-and-deploy-to-azure-app-service-7616303181e
Upvotes: 0
Reputation: 1689
In Visual Studio I was incorrectly running debug mode as "IISExpress", I changed to my profile, and now everything works
Upvotes: 0
Reputation: 3443
I was encountering this error when trying to deploy (.NET Core 3.1/Angular app) to Azure App Service via Visual Studio publish. The issue ended up being old files on the server not being deleted properly post publish.
To fix:
Upvotes: 0
Reputation: 133
I was able to get the site working InProcess by setting "Enable 32-Bit Application" as False for the application pool for the respective net core site app pool.
Upvotes: 0
Reputation: 131
moreover a generic error. To know more information about the error Go to Azure Portal > your App Service > under development tools open console. We can run the application through this console and thus visualize the real error that is causing our application not to load. For that put, the name of our project followed by “.exe” and press the enter key.
Upvotes: 3
Reputation: 37
In my case I forgot to add one comma (,) between two lines in the appsetting.json file. I have added the comma, after that it works.
Upvotes: 0
Reputation: 593
In my case after spending a lots of time the problem was the platform target was x86 and after change it to any CPU the issue fixed.
Upvotes: 1
Reputation: 2119
it's exception in the setup or missing library or file dependency if you are on azure go to App Service Diagnostics then logs and you will get the issue
i was having same issue in my asp 3.1 core , the error was missing a json dependency file so i had to add it to wwwroot/ExternalDependencies in azure
Upvotes: 0
Reputation: 630
In my case it was database connection problem. This error needs to be more clear. I hope they will do it in the future. Basically it is a problem at ConfigureServices function in Startup. My advise is try to add all lines try catch in ConfigureServices function and you can findout where is problem.
Upvotes: 1
Reputation: 17004
When hosting in Amazon Web Services (AWS) using an Elastic Beanstalk (EBS) deployment AND using this stackoverflow answer on how to access configuration values in EBS containers (https://stackoverflow.com/a/47648283/78804)
If NO configuration values have been set within the Elastic Beanstalk -> Environments -> [APP NAME] -> Configuration -> Software
menu, you will probably see this error.
Setting ANY SINGLE VALUE in the EBS config, makes it go away.
This is probably caused by the configuration-loading block failing to do a null check and the entire website failing un-gracefully because the error is happening during the application Startup
phase.
Upvotes: 0
Reputation: 1147
For us, it was after install EF 5 on an existing core project.
On the PC of my colleague, after a publish, he was having this DLL file :
mscordaccore_amd64_amd64_4.700.20.20201.dll
And me, this one :
mscordaccore_amd64_amd64_4.700.20.36602.dll
After his publish to release, the website returned the HTTP Error 500.30
.
After my own publish to release, the website was working fine.
Upvotes: 0
Reputation: 3441
HTTP Error 500.30 – ANCM In-Process Start Failure” is moreover a generic error. To know more information about the error
Go to Azure Portal > your App Service > under development tools open console. We can run the application through this console and thus visualize the real error that is causing our application not to load.
For that put, the name of our project followed by “.exe” and press the enter key.
Upvotes: 30
Reputation: 89
In my case it was a wrong value in appsettings.json file. The value was .\SQLEXPRESS
and it worked after i changed it to .\\SQLEXPRESS
Upvotes: 2
Reputation: 121
Make sure that your *.deps.js json file copied correctly to the deployed location
Upvotes: 1
Reputation: 455
All i'm going to say in this answer is make sure you uh... don't have anything similar to this in your service registration code..
while (!Debugger.IsAttached) {
Thread.Sleep(500);
}
This totally did not happen to me and definitely did not make me a very sad boy after 3 hours of screwing around with all of the above answers and more.
Upvotes: 0
Reputation: 115
Wow, there are a lot of answers on this question, but I had this same issue and my solution was different from anything I read here, and also quite simple.
I had been having issues with deploying my app to azure with the right environment settings, so I was messing with the launchsettings.json file, and I had changed the value of the ASPNETCORE_ENVIRONMENT variable in the IIS profile from "Development" to "Production". Changing it back to "Development" fixed the issue for me.
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
Upvotes: 1
Reputation: 299
I have met this problem because I edit the Program.cs and I delete the Run function. Just add it again:
Upvotes: 0
Reputation:
Just in case this helps anyone that may have made the same mistake I did.
My website has a SSL certificate by Certify the Web.
When I published, I deleted the _Well-Known folder and this error came up.
Had I not emptied my recycle bin 30 seconds before I figured this out on my virtual machine, I could have just restored the folder.
Instead, I re-requested my certificate, restarted that site and the issue was resolved.
Upvotes: 0
Reputation: 9089
I got this problem when my Azure service was immediately trying to get a secret from Azure KeyVault and I had forgotten to give the service permission by KeyVault.
Upvotes: 0
Reputation: 192
I Had the same problem that made because I did this in Startup.cs
class and ConfigureServices
method:
services.AddScoped<IExamle, Examle>();
But you have to write your Interface
in the first and your Class
in the second
Upvotes: 0
Reputation: 13458
In my case it was due to SDK version.
I have installed all latest updates of VS 2019 but it was not enough.
Error happened when I tried to start web application with VS development server (IISExpress/Kestrel).
So to fix that I just downloaded and installed latest dotNetCore SDK.
For that moment it was version 3.1.2.
And problem is solved!
Upvotes: 0
Reputation: 849
I have encounter issue with .net core 3.1. I have tried all the solution but did't work for me. Then I looked into IIS Log . The issue was Application unable to make connection with database because coonection string was invalid. So Please Look into IIS log to find the issue It may be any exception comes at runtime
Upvotes: 0
Reputation: 24380
I encountered this issue on an Azure App Service when upgrading from 2.2 to 3.1. The reason ended up being the "ASP.NET Core 2.2 (x86) Runtime" Extension was installed on the App Service. Removing that extension from Kudu fixed the issue!
Upvotes: 1
Reputation: 1467
I had a runtime error in Startup.cs. Schoolboy error - I made a small tweak to that file, but didn't run my app locally before deploying to Azure. The app didn't startup successfully and I got the 500.30 error page.
Upvotes: 0
Reputation: 1255
Resolved my issue by running dedicated App Pool for AspNetCoreModuleV2
Description:
HTTP Error 500.34 - ANCM Mixed Hosting Models Not Supported
I was running multiple applications under the same App Pool. Some of the applications were running
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
The application causing the error was running AspNetCoreModuleV2
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
I created a new App Pool dedicated for AspNetCoreModuleV2 and it resolved my issue.
Upvotes: 1