This operation requires IIS integrated pipeline mode. AntiForgeryToken

I am running IIS7, .NET 4.5 and have an MVC2 site.

I get the error "This operation requires IIS Integrated Pipeline Mode". when i go to a page (aspx View) with a form on it with AntiForgeryToken on it.

<%=Html.AntiForgeryToken() %>

      

I searched and saw the AddHeaders solution that fixes this error for other people (who are using IIS6), but I don't see how it would be.

The reason I mention AntiForgeryToken is because if I select this line the page works!

EDIT: I tried reinstalling .NET 4.5 - didn't help

EDIT: My AppPool is definitely set to "Integrated" Managed Pipeline Mode (ApplicationPoolIdentity). This is the only application in this application pool.

+3


source to share


2 answers


Run the application in IIS Express. This solved the same issue for me. Just right click on your project and select Properties and click Web, there under servers click use localIIS web server and click USE IIS express



+3


source


Upgrading to MVC3 with Upgrade Tool fixes the issue http://blogs.msdn.com/b/marcinon/archive/2011/01/13/mvc-3-project-upgrade-tool.aspx?Redirected=true



I realize this is not always a viable solution for everyone - so will leave this question open, hopefully someone else has an idea for fixing the MVC2 solution.

+1


source







All Articles