2

I am following this guide in order to host my Blazor WebAssembly project: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/blazor/webassembly?view=aspnetcore-3.1#rewrite-urls-for-correct-routing

I have installed the URL Rewrite module 2.1 but I still receive this error:

HTTP Error 500.19 - Internal Server Error
Error Code: 0x8007000d
Config File \\?\C:\MyProject\web.config 

I am pointing the Physical path to one step above wwwroot, i.e the root folder of my project after publish.

My web.config in root folder looks like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\MyProject.Server.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>

What am I missing? I have .NET Core 3.1.202 installed. My project is built upon the default template. Meaning an ASP.NET Core hosted Server part and WebAssembly-powered Client part. I am using port 81 for the IIS site.

Appreciate any guidance

ArturM
  • 133
  • 1
  • 10
  • 1
    Does this answer your question? [How do I configure a .net core API to work in IIS?](https://stackoverflow.com/questions/50612351/how-do-i-configure-a-net-core-api-to-work-in-iis) – Lex Li May 13 '20 at 04:03
  • That solved my problem! Thanks @LexLi – ArturM May 13 '20 at 13:11

2 Answers2

2

On IIS 10 I had to install additional module - URL Rewrite: https://www.iis.net/downloads/microsoft/url-rewrite

pawellipowczan
  • 380
  • 3
  • 10
1

Solved by installing the ASP NET Core hosting module: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-3.1

ArturM
  • 133
  • 1
  • 10