ER.Cons
ER.Cons

Reputation: 21

MVC 5.0 500 - Internal server error

I have created an MVC 5 website using Visual Studio 2015 on a Windows Server 2016 Machine.

I build and run the application from VS and it works great.

I published it locally, pointed IIS to the root folder.
The Application Pool is set to .Net CLR Version v4.0.30319.

When I try to access the page on the web, I get a generic error 500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.

There is nothing in the IIS logs.

Not sure how to get this error so I can see it...or if it is a more basic issue. Any ideas on the best way to proceed?

Upvotes: 1

Views: 1859

Answers (1)

Greg
Greg

Reputation: 11480

To configure within Microsoft Server 2016, do the following:

  • Make sure you've installed the feature set for Web Server & Hosting are installed.
  • If those are installed, create a directory such as: "C:\Program Files\Sample"
  • Publish your application to the directory
  • Open Internet Information System
  • Disable Default Site
  • Create a New Site
  • Create a Site Name "Sample" (Take note of the Application Pool Name)
  • Now link "C:\Program Files\Sample" in Physical Path
  • For now leave the binding defaulted, this will trigger wildcard
  • Uncheck Start Website Immediately
  • Navigate back to "C:\Program Files\Sample" (Accessible through IIS also)
  • Right-Click and go to Permissions
  • Choose add new user
  • Type in "IIS AppPool\Sample"
  • Choose access your application will require.
  • Apply those changes, then navigate and start your web-site.

If that doesn't work, you can check the following:


Application Pool:

  • Sample should of defaulted to integrated and 4.0, if not change it. If your utilizing .Net Core application, you want it to be Unmanaged Code

Programs and Features:

  • Make sure that you have .Net 3.5, 3.0, 2.0 enabled.
  • Hostable Web Core & Internet Information System (Under Web Server) for you.
  • World Wide Web Services Enabled, with the proper Application Development Features.

enter image description here

enter image description here

Dependencies:

Upvotes: 1

Related Questions