.NET CORE IIS 502.5 Error

-1

I have a .NET CORE 2.0 solution, with 4 projects as below:

  • .NET Standard 2.0 Project
  • .NET CORE 2.0 ASP Site

Running dotnet --info I have the following installed:

C:\WINDOWS\system32>dotnet --info .NET Command Line Tools (2.1.202)

Product Information: Version: 2.1.202 Commit SHA-1 hash: 281caedada

Runtime Environment:

OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.202\

Microsoft .NET Core Shared Framework Host

Version : 2.0.9 Build : 1632fa1589b0eee3277a8841ce1770e554ece037

C:\WINDOWS\system32>dotnet --version 2.1.202OS Name: Windows OS Version: 10.0.17134

I cannot get IIS to host my Published website, but I can run it from VisualStudio using IIS Express.

In my event viewer I see:

ErrorCode = '0x80004005 : e0434352.

Any ideas? I've tried reinstalling CORE 2.0 Runtime and SDK, and restarting my PC. No such luck though!

Small UPDATE:

Somehow got past that, now I get the following Error:

An unhandled exception occurred while processing the request. FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Razor.Language, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

c#
asp.net-core
asp.net-core-2.0
asked on Stack Overflow Jul 20, 2018 by Kai Day • edited Jul 20, 2018 by Kai Day

3 Answers

1

Have you tried dotnet clean? If that doesn't work, try deleting bin and obj folders. It may be caused because something you used to reference is still there trying to satisfy the same requirement.

answered on Stack Overflow Jul 20, 2018 by DIV
1

Have you tried this: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.1&tabs=aspnetcore2x

I had those issues too a while back and following this helped me solve it. Make sure you have the hosting bundles installed also.

answered on Stack Overflow Jul 20, 2018 by Lotusin
1

I managed to get it working, for anyone who is interested. Using Visual Studio installed, "Development time for IIS support", and then published locally. Which solved that issue.

On the server I uninstalled all runtime/hosting bundle copies and just installed the very latest and then added false to my csproj. That got me up and running!

Hope this helps someone in the future.

answered on Stack Overflow Jul 23, 2018 by Kai Day

User contributions licensed under CC BY-SA 3.0