Reputation: 393
I have an .net core application that uses certain .net framework dlls.For this reason, I had to run .net core on .net framework 4.6.2. It works fine of visual studio 17 but cannot host on IIS server. I am receiving
An error occurred while starting the application.
.NET Framework X86 v4.0.30319.42000
| Microsoft.AspNetCore.Hosting version 1.1.2
| Microsoft Windows 6.1.7601 S
Any suggestion is highly appreciated. Thanks
Upvotes: 1
Views: 5970
Reputation: 393
Thanks you for you suggestions.
The problem was appsettings.production.json and appsettings.Staging.json. These files were empty.
I am not sure what this was not issue while debugging the application from Visual Studio. Anyway, I add minimal codes to those file to overwrite the appsettings.json and it worked like a charm.
Upvotes: 1
Reputation: 62290
At lot of things can go wrong with ASP.NET Core. At first, I'll go to server, and see correct version of .NET Core is installed.
C:\Program Files\dotnet\shared\Microsoft.NETCore.App
1.1.2 version should be there. If not, you'll have to install it.
Upvotes: 0