0

As the title states, I am unable to host my .NET 2.0 web app when publishing to an Azure Virtual Machine running the Windows 2016 data center image.

The app is similar to the one found on the following link:

These are the list of steps that I've taken:

  • Provision the creation of an Azure Virtual Machine with the Windows 2016 data center image
  • Using Server Manager, add roles and features in below screenshot: enter image description here enter image description here
  • In the Azure portal I have configured to allow inbound traffic over port 80 (http) and 8172 (WebDeploy)
  • In my VM I have created two rules in the firewall to allow traffic over the same ports (80 & 8172)
  • I then installed Web Deploy
  • I can now Publish a .NET core 3.0 application to my Azure Virtual machine
  • When navigating to my web app it is showing the 500.19 0x8007000d error
  • After installing the latest .NET hosting bundle my .NET 3.0 web app is hosting without issue

Now my problem occurs when trying to host my .NET Core 2.0 web app. On my local development machine it runs without any issues, but when I publish to my Azure VM I am greeted with the following error message

HTTP Error 500.21 - Internal Server Error

Handler "aspNetCore" has a bad module "AspNetCoreModule" in its module list

See screenshot below: enter image description here

It seems to me that I need to configure IIS to be able to host a .NET Core 2.0 web app. But so far I have been unsuccessful. Any pointers/tips would be greatly appreciated.

Sam
  • 99
  • 2
  • 7
  • I guess you may not install the right asp.net core module for 2.0. I suggest you could try to re-install the 2.0 module and try again. Download [link](https://dotnet.microsoft.com/download/dotnet-core/2.0). – Brando Zhang Jan 10 '20 at 02:41
  • Does this answer your question? [IIS Server & ASP.Net Core - page cannot be accessed because the related configuration data for the page is invalid](https://stackoverflow.com/questions/37948865/iis-server-asp-net-core-page-cannot-be-accessed-because-the-related-configur) – Lex Li Jan 10 '20 at 13:05
  • Thanks for answering guys, I tarted over. This time I installed the .NET framework 3.5 features the recommended alternate sourcepath. After configuring the rest of the VM I was able to publish my .NET 2.0 Web App and it is now hosting correctly! Which is great! – Sam Jan 10 '20 at 14:26

0 Answers0