IIS - IIS 7 - ASP.Net - MVC - Deployment Problem

Asked By Ryan on 17-May-10 01:09 PM
I have written a very nice quick little application using the MVC architecture asp.net. It runs just fine locally. 

I'm trying to deploy it on a newly created IIS 7, windows 2008 server and all I can seem to get is a 404 error stating 
"The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

I'm very new to IIS 7, however I have been working with IIS 6 for years and years so I do know my way around. I'm very confused to the problem because any research I do on this problem just states that the MVC and the route mapping is all native to IIS 7 and that you don't have to do any configuration at all. 

Yet, I still can't seem to get it working. Any help at all would GREATLY appreciated. 

If you direct me to a setting to change an IIS 7, the more verbose you are the better and I'm still finding my way around in there!

Thanks, Ryan 
Phivos Stylianides replied to Ryan on 17-May-10 01:27 PM
Is your web app folder configured as an application? Check IIS -> Sites -> Default Web Site -> right click your app -> Convert to Application. Restart IIS. Does that solve your problem?
Anoop S replied to Ryan on 17-May-10 01:28 PM
can you post full error code, like this way

Description: The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Error Code: 0x80070002
Notification: MapRequestHandler
Module: IIS Web Core
Requested URL: http://minihobbs:80/test1.php

-----
---
----

did you using any report viewer?
Ryan replied to Anoop S on 17-May-10 02:09 PM
I have configured the web site as an application. Unforunately, that didn't solve the problem.

The error in the event is the following....

Event code: 3008
Event message: A configuration error has occurred.
Event time: 5/17/2010 11:13:48 AM
Event time (UTC): 5/17/2010 6:13:48 PM
Event ID: cd3201a3da704ef0b2f2896432d5335f
Event sequence: 1
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/4/ROOT-2-129185936284322677
    Trust level: Full
    Application Virtual Path: /
    Application Path: E:\MyCart_Root\Popcarts-Admin\
    Machine name: S10-WIN2008R2
 
Process information:
    Process ID: 2332
    Process name: w3wp.exe
    Account name: IIS APPPOOL\admin.popcarts.com-84
 
Exception information:
    Exception type: HttpException
    Exception message: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (E:\MyCart_Root\Popcarts-Admin\web.config line 44)
 
Request information:
    Request URL: http://admin.popcarts.com:84/
    Request path: /
    User host address: 10.1.254.47
    User:  
    Is authenticated: False
    Authentication Type:  
    Thread account name: IIS APPPOOL\admin.popcarts.com-84
 
Thread information:
    Thread ID: 5
    Thread account name: IIS APPPOOL\admin.popcarts.com-84
    Is impersonating: False
    Stack trace:    at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
   at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)
 
 
Custom event details:
Phivos Stylianides replied to Ryan on 17-May-10 02:53 PM
It seems that IIS cannot find the MVC assembly on your system, try these steps and the problem may go away:
Ryan replied to Phivos Stylianides on 17-May-10 04:40 PM
Thank you! That was the problem. I tracked down and installed the missing files and how everything is up and working just fine.

Thanks again for everyone's help. I really appreciate it.
- Ryan
ayan bhattacharjee replied to Ryan on 23-Sep-10 03:12 AM
you can try the procedure written in the following link
Deploy Asp.net website on IIS 7.0 (Windows 7)