views:

707

answers:

1

We migrated from MVC 2 Preview 1 to MVC 2 Preview 2 to using multi-project areas. Everything works perfectly on local dev machine (Visual Studio 2008 SP1/IIS 7), however, it's does not work after I publish it to the server (Windows Server 2003/IIS 6).

The deployment is done through the Build->Publish option in the VS2008 menu. I had also added the Wildcard mapping in IIS.

IIS server was functioning properly in the past when it was MVC 2 Preview 1 project.

It seems that the IIS should be configured differently to handle multi-areas MVC routing?

One more observation, the views\areas\*.* directories in the main area are not copied to the IIS server during deployment.

Has anybody deployed and configured multi-project areas solution to IIS 6 successfully?

UPDATE: We needed to add an additional line to the Web.config for the WebResource.axd

<httpHandlers>
                <remove verb="*" path="*.asmx" />
                <add path="WebResource.axd" verb="GET" validate="True" />
…
</httpHandlers>

You can read further here: http://forums.asp.net/t/1483430.aspx

+3  A: 

The deployment feature of Visual Studio is not aware of the hidden files copied by the Areas build task because they are not added to the main area's VS project.

The multi-project areas feature of ASP.NET MVC 2 is no longer supported and has been moved to the "MVC Futures" project. It is unsupported for a number of reasons, including the issue you're having in particular.

In ASP.NET MVC 2 Beta we instead added support for single-project areas where you can have areas in a folder called "Areas/Admin", "Areas/Shop", and so forth. There is also VS support for it by right-clicking on the project and selecting the "Add Area" menu option.

Eilon
Thanks. We migrated our project to MVC 2 RC and it's all goodness these days.
Ozzie Perez