Server.Execute - render .ASP from MVC controller action
Posted
by David Lively
on Stack Overflow
See other posts from Stack Overflow
or by David Lively
Published on 2010-06-09T16:21:04Z
Indexed on
2010/06/09
17:22 UTC
Read the original article
Hit count: 235
asp.net-mvc
|asp-classic
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.
© Stack Overflow or respective owner