1

Closed

Error While Executing the Application

description

I am getting the following error while executing the recent beta version.

"No valid exports were found that match the constraint '((exportDefinition.ContractName == "/") AndAlso (exportDefinition.Metadata.ContainsKey("ExportTypeIdentity") AndAlso "System.Web.Mvc.IController".Equals(exportDefinition.Metadata.get_Item("ExportTypeIdentity"))))', invalid exports may have been rejected"

I am not able resolve this. Please give solution for this.

No files are attached

Closed Dec 12 2011 at 8:46 PM by StephenRedd

comments

StephenRedd wrote Dec 6 2011 at 9:29 PM

There is not a lot of information here to go on, but it looks like a problem with either MVC configuration, or the web server. The problem appears to be that the system is trying to load a controller named "/". The asp.net routing engine should have routed requests for "/" (the root of the site) to the Home controller's Index action. For some reason this may not be happening for your install.

This could be caused by a server configuration problem, a .NET framework or MVC install problem, or a modification to the code that has broken the default route defined in global.asax.cs.

Also, I have heard of similar problems when trying to run MVC apps on IIS 6. I have no personal experience with that as I've not used IIS 6 in quite a few years, but there is some info available at http://haacked.com/archive/2010/12/22/asp-net-mvc-3-extensionless-urls-on-iis-6.aspx that details a solution for setups with MVC 3 on IIS 6 (though I'd recommend upgrading to a newer server). That article also links to others on the topic.