Last post Feb 08, 2018 11:23 PM by tbowen01
Jan 29, 2018 06:09 PM|tbowen01|LINK
I have an ASP.Net Core 2.0 mvc web application I am trying to deploy using IIS. I have been working off of this document:
I have followed it closely. Once I finish the steps, I try to navigate to the page and I get the page not found 500 error. When I deploy (and I've tried it with the tool in Visual Studio 2017 and Powershell), I noticed the Views folder is not there. I tried
manually moving that folder over, but I get the same 500 error. The Default Web Site runs fine when I turn it on. I am running IIS on Windows Server 2012 R2. I have ASP.Net Core 2.0 installed, along with the latest hosting package from Microsoft, DotNetCore.2.0.5-WindowsHosting.
The web app runs fine locally when hitting ctrl-f5, etc. But whe I try to deploy, I get the error. Any thoughts or ideas on what I can look at or try would be appreciated.
Jan 29, 2018 10:50 PM|Radomir|LINK
to find out what the error is.. then go from there.. unfortunately hard to give more specific stuff with "500 error..." as the only detail..
PS. You shouldn't be missing Views folder when deploying.. not sure why it's not carrying it over but it should.. it does out-of-the-box...
Jan 30, 2018 02:23 AM|Edward Z|LINK
For another way to check the error, I suggest you add a web.config, and change stdoutLogEnabled="false" to true and then check the logs at stdoutLogFile=".\logs\stdout".
A simple demo like below:
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" requestTimeout="00:20:00" />
Jan 31, 2018 12:48 AM|tbowen01|LINK
Thanks for the help. I previously had a working web app with .net core 1.1, but upgraded to 2.0. I've put in the error log and re-published the .net core web app. I'm no longer getting the 500 error. I am now getting the 502.5 process failure error. In searching
around I've found it may be related to having upgraded from .net core 1.1 to 2.0. But right now .net core is not even starting up. I've seen various different discussions laying the blame on different libraries or references.. I've tired some of the fixes
but nothing is working yet. Now I'm looking at rebuilding the web server and installing .net core 2.0 fresh, without 1.1 having been installed.
Jan 31, 2018 12:59 AM|Radomir|LINK
Get more details from the event log.. then search for common reasons for 502.5 - use hex code as guide as several different things can produce 502.5 but they have different specific failure codes.
Jan 31, 2018 09:34 PM|tbowen01|LINK
I had the server rebuilt and installed the latest VS, .Net Core 2.0, DotNetCore2.0 hosting. I created the site in IIS and pointed to my deployed folder. I still got the same 502.5 error. I then created a new generic ASP.Net Core MVC application and deployed
that. And it worked perfectly. So I think something is leftover in the previous project from .Net Core 1.1 that is making 2.0 choke. I'm going to try and track it down with the suggestions I've been getting. But I may also just create my solution new and re-create
the application altogether.
Feb 01, 2018 07:54 AM|Edward Z|LINK
>> So I think something is leftover in the previous project from .Net Core 1.1 that is making 2.0 choke.
Do you mean you migrate .net core 1.1 project to 2.0, and then publish it to IIS?
After migrating from 1.1 to 2.0, could your project run correctly in VS debug mode?
Feb 08, 2018 11:23 PM|tbowen01|LINK
Sorry for the delayed answer. I was able to track it down to the ApplicationInsights package. Once I fixed that it finally ran. Thanks for the help.