Petrus Theron
Petrus Theron

Reputation: 28837

Deployed ASP.NET MVC 4 Project Won't Run

I deployed an ASP.NET MVC 4 project to my testing server, but it does not seem to run.

Attempting to access the project URL on IIS 7 after deployment attempts to list the directory contents. Checking the folders reveals that all assemblies have been deployed. Enabling directory browsing actually lists the files in the directory and can serve static files.

It's as if my .NET 4.0 application pool is not routing any requests to the controllers.

What could be causing this?

Upvotes: 16

Views: 15128

Answers (2)

Petrus Theron
Petrus Theron

Reputation: 28837

Solution

Found the solution out of sheer luck, which is setting runAllManagedModulesForAllRequests to true in web.config:

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    ...
</system.webServer>

Upvotes: 41

Nick Larsen
Nick Larsen

Reputation: 18877

I had this exact problem the other day when starting a new project on a new machine. Then I found this question and all of my wildest dreams came true.

Upvotes: 1

Related Questions