In my Asp.Net MVC5 Controller I am trying to run the following code to execute a classic asp script:
public ActionResult Index()
{
Server.Execute("~/classic/test.asp");
return new EmptyResult();
}
But get the said error message. I've tried changing the /classic/ folder both as it's own application (pool) and as a normal folder, but same error. I've also checked the HTTP Handler Mappings in IIS for the .net site, and .asp is a recognized handler, so, it's definitely in there. Maybe there is a way to do a URL Rewrite method that will let you execute any script in it's place? It appears there is no ASP.NET httpHandler configured for legacy .ASP pages, but maybe that can be changed?
Does anyone know how to run a classic asp script through a controller, without using a WebRequest? It's possible using a WebRequest but it's also more overhead than desired.
You would think Microsoft would give this type of feature for people trying to migrate, I sure hope so.
Server.TransferRequest()instead? - Rowan Freeman