Have you thought about using an httpHandler
for this?
In your web.config, register the handler:
<system.web>
<httpHandlers>
<add verb="*" path="PageBuilder.ashx" type="YourNamespace.ClassName, YourNamespace"/>
</httpHandlers>
...
You can put whatever logic you currently have for building the aspx in your handler:
//use the IRequiresSessionState if your handler requires access to the session
public class PageBuilder : IHttpHandler, IRequiresSessionState
{
public void ProcessRequest(HttpContext context)
{
//logic to build your page
}
}
Simply point your redirects to PageBuilder.ashx and pass the data either using querystring variables or with the Session
object.
You can learn more about handlers here:
What is an HttpHandler in ASP.NET