Skip to content
This repository was archived by the owner on Nov 1, 2018. It is now read-only.
This repository was archived by the owner on Nov 1, 2018. It is now read-only.

IIS Application Route 404 #315

@steveoh

Description

@steveoh

I am publishing my first asp.net core app to IIS 8.5. I have followed the directions on https://docs.microsoft.com/en-us/aspnet/core/publishing/iis

Install .net core windows server hosting bundle
https://aka.ms/dotnetcore_windowshosting_1_1_0

Stop and start www publishing service

net stop was /y
net start w3svc

Run dotnet publish -c Production on core app to create publish folder
You can rename the publish folder and put this folder on the server.

Create a no managed code app pool.
Create an application over the copied publish folder.

Run https://github.com/aspnet/DataProtection/blob/dev/Provision-AutoGenKeys.ps1 for app pool.

These are the instructions I followed.

I have the basic Default Web Site pointed at c:\inetpub\wwwroot serving static files. Inside of wwwroot i added a folder called daq and beneath that I have created an application called api. I can navigate to mywebsite.com/daq/api/Home and I am served the home view. I also have a search controller with httpget attribute routing. This route fails with a 404 when accessed through iis.

If I run dotnet myapp.dll and browse to localhost:5000 and use the url that 404'd through iis and the request succeeds.

If I create a new website and point it at the api folder and bind it to port 8080 and navigate to localhost:8080 and the same url, the request succeeds.

I would like to have the asp.net core app under the default web site so it will have the same domain name.

What is IIS doing to cause this 404 or what am I doing to cause this 404?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions