0

I'm using .NET Framework 4.8 and tried to deployed my web app to IIS but it showed the 403.14 error.

HTTP Error 403.14 - Forbidden

The Web server is configured to not list the contents of this directory.

And then I enabled directory browsing. This time, it showed the directory listing instead. As I clicked the "Views" folder, it returned another error.

HTTP Error 500.21 - Internet Server Error
Handler "BlockViewHandler" has a bad module "ManagedPipelineHandler" in its module list

I have been finding solution for days but none of them worked...

EDIT: I started a new MVC project and tried to depoly it. It works perfectly. But it broke once I added new database using entity framework. Just guessing the problem comes from the database. Is there any configuration if I want to deploy a MVC app with db?

Nora
  • 15
  • 6
  • Have you set a homepage for your MVC web app? If not, get started from there please, https://stackoverflow.com/questions/1142003/set-homepage-in-asp-net-mvc Roll back all previous changes you made and you should never enable directory browsing. – Lex Li Jan 24 '23 at 01:44
  • @LexLi I have set it in web.config `Home/Index`. It works on localhost. – Nora Jan 24 '23 at 01:55
  • it mostly happens when the user has no proper permission. check your permissions on the served directory by IIS. sometimes you need to add `IIS_IUSR` to the security tab of the properties of the directory to let IIS manage the files. – Talkhak1313 Jan 24 '23 at 09:02

0 Answers0