1
votes

I am trying to get my new asp.net core rc2 version running on my dev server that running IIs 8.5 and window 2012 server

I've followed the steps list in here, which is: On my local:

  • Create a new asp.net core project using VS 2015 (Dev14) U2
  • Change the web.config stdoutLogEnabled="true", create a new deploy profile and publish it locally to a folder
  • Make sure the website works on IIS Express.

On my server

  • Installed the DotNetCore.1.0.0.RC2-WindowsHosting.exe and reset IIS
  • Setup new app pool with no managed code, setup new website in IIS that points to the local: D:\apps\myapp1\
  • Copy the deploy content to D:\apps\myapp1\ (such as the dll is D:\apps\myapp1\myapp1.dll)
  • dotnet.exe is on the path. I can even go to D:\apps\myapp1\ and dotnet myapp1.dll. It will bring up the nano server.

What I see when I hit http://mydevserver/myapp1 (or localhost/myapp1 on my dev server):

HTTP Error 502.3 - Bad Gateway

When I view the Event log, I can see a bunch of failure like this:

enter image description here my logs folder on D:\apps\myapp1\logs is also empty. There is no log in that folder whatsoever.

At this point I am pretty lost on what to do. Help!!!

Here's the content of my web.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>

  <!--
    Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
  -->

  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
    </handlers>
    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
  </system.webServer>
</configuration>
</xml>
2

2 Answers

1
votes

There are a few things you can do to troubleshoot:

  • go to the published app and try running it without IIS
  • logs won't be written if the folder does not exist and by default the logs folder does not exist
  • if it is a portable app make sure the path to dotnet.exe is on the system wide %PATH% (note you need to do iisreset after you set it to make IIS pick it up)

I wrote a blog post explaining how ASP.NET Core apps work with IIS and the post contains the section on troubleshooting your very problem.

0
votes

So I finally figured out what's wrong. Apparently because I did not setup my website under "Default Web Site" of IIS, so IIS (I think) routes my website incorrectly. My fix is to move my website under Default Web Site.

One of my friends found another way to setup the website outside of Default Web Site by disabling the Default Web Site. I have not tried to get both Default Web Site enable and MyApp website enable working. Maybe somebody else can contribute in...