I have an ASP.NET MVC 2 application running fine on both IIS7 and the VS Web Development server. I recently added areas to the site and these too work fine on IIS7 and the VS Web Development server.
However when I deploy this site to an IIS6 test server running win2k3, the areas no longer work. All of the paths using the default routes for the rest of the site work fine (eg. /Home/Index/), however when I navigate to an area (for example /Admin/Users/Index/) i get an HttpException:
System.Web.HttpException: Server cannot access application directory 'C:\InetPub\MobileWeb\Admin\'. The directory does not exist or is not accessible because of security settings.
C:\InetPub\MobileWeb\
is the root directory of my site. If I add an Admin directory to the file system, I then get various assembly loading errors, but I'm pretty sure this won't happen if I can get the areas to work correctly.
All I did (and have done many times before) to enable ASP.NET MVC on IIS6 was to add a wildcard handler that maps to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
and unchecked "verify that file exists"
Our build server automatically deploys this code by compiling a VS 2008 Deployment Project, and then copying the output to our test server. I found this article that has a similar problem, but if i'm understanding the resolution correctly, it did not working me.
Is there something unique that i need to do get areas working on IIS6?
Update - Here's the full stack trace:
[HttpException (0x80004005): Server cannot access application directory 'C:\InetPub\MobileWeb\'. The directory does not exist or is not accessible because of security settings.]
System.Web.HttpRuntime.EnsureAccessToApplicationDirectory() +8932031
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +87
[HttpException (0x80004005): Server cannot access application directory 'C:\InetPub\MobileWeb\'. The directory does not exist or is not accessible because of security settings.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8894095
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259
Update I've tried publishing to the test server using both the VS2008 publish website and VS2008 Web Deployment project (and manually copying files over) - both have the same issue.