First blazor deployment on IIS

-- -- 872 Reputation points
2021-01-15T19:52:30.793+00:00

Hi

This is my first blazor deployment. I am using the standard 'hello world' blazor app created by vs 2019 (not https enabled). I have not made any changes to the default app except setting configuration to x86 debug. App works fine within vs 2019 with IIS Express.

The server is a Windows Server 2012 R2 and has the following;

  • WebSockets enabled on IIS.
  • url rewrite 2.1 extension installed.
  • Latest releases of 3.1 Core hosting bundle (3.1.11) and x86 SDK (3.1.405) packages installed.

I have configured the IIS site and published the project to the relevant site folder. When I browse the site using the domain http://myapp.mydomain.com I get the error page below at the end. I looked up error 0x8007000d and it seems to suggest there is an issue with the web.config file. My web.config file is as below which is created by the vs 2019 by default.

<?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=".\BlazorApp1.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: 86c5f0a6-4ea7-49fa-8d68-18952a2fb9b3-->

What am I doing wrong and how can I get the blazor app to run?

Thanks

Regards

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

Detailed Error Information:
Module    IIS Web Core
Notification    Unknown
Handler    Not yet determined
Error Code    0x8007000d
Config Error    
Config File    \\?\E:\myapp\web.config
Requested URL    http://myapp.mydomain.com:80/
Physical Path    
Logon Method    Not yet determined
Logon User    Not yet determined

Config Source:
   -1: 
    0: 
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,162 questions
0 comments No comments
{count} vote

Accepted answer
  1. Sam Wu-MSFT 7,036 Reputation points Microsoft Vendor
    2021-01-21T03:32:45.487+00:00

    Hi @-- -- ,

    Error Code 0x8007000d

    This error occurs because the ApplicationHost.config or Web.config file contains a malformed XML element, normally we can solve this problem by installing the ASP NET Core hosting module, but it doesn’t seem to work on your side. how do you deploy the blazor application on IIS? you can refer to this link about how to Deploying A Blazor Application On IIS.

    This link has the same problem, you can use it as a reference, compare your web.config and applicationHost.config file, If it still doesn't work, please post your applicationHost.config file. Error Code 0x8007000d

    Best regards,
    Sam


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful