Server.Execute - render .ASP from MVC controller action
- by David Lively
I need to render an ASP page to a string from an MVC controller action. I can use Server.Execute() to render a .aspx page, but not a .asp page.
Here's what I'm using:
public ActionResult Index()
{
Server.Execute("/default.asp");
return new EmptyResult();
}
which returns
`No http handler was found for request type 'GET'`
Any suggestions? I can do something similar with with a web request, but I'd rather avoid the overhead of a loopback request.