views:

37

answers:

2

I am using StructureMap with ASP.NET MVC. I have a requirement where I need to show a ReportViewer and for that I am using a classic ASP.NET page. The problem is when I am trying to redirect from the action I am getting following issue:

The IControllerFactory 'StructureMapControllerFactory' did not return a controller for the name 'Reports.aspx'.

Can someone please guide me on how do I call a classic asp.net page from an action and get rid of this error?

+3  A: 

You need to map a route for your classic page so that the MVC engine skips it.

Petar Kabashki
A: 

If you are looking to redirect the request to a 'classic' ASP.NET web form from the controller action, you might call HttpContext.Response.Redirect("URL"). The routing engine by default will resolve files that exist on the disk. No need to map new routes.

Jay Shanker