Marco Trova's weblog

Italian .NET life

Execute ASP code from ASP.NET: my weird idea results

Last week I wrote about my simple weird idea on executing ASP in an environment built with a VB COM object that execute a asp file through an Asp.net HttpHandler.

I added the necessary basic features to execute the old-classic DNA sample application: FMStocks 2000 SP2.

The asp extension is mapped on then aspnet_isapi.dll, a simple entry on my web.config, a simple HttpHandler receives all requests for asp files, passing Form, QueryString, ServerVariables, Session and Cookies collections and, after the execution of ASP code, reading some of them modified by ASP execution.

Most of the problems I have encountered were in parsing ASP code adapting it to the new execution environment: some words such as Clear, End and Write are reserved words in VB6.

I found that executing ASP code through my code is only about 5-10% slower than in normal ASP mode, but the "Average time to last byte" was about 200% slower, due the simulated environment.

I have demonstrated myself that executing and sharing state (Session and Cookies) between ASP and ASP.NET is possible, however my solution is not ready for a production site. I did not developed all possible ASP objects nor tested the solution with a lot of ASP applications.

But I am satisfied of the work done.

Depending of the feedback I would like share the code..

Comments

Jon Galloway said:

This is great news! I've been working on a large intranet with 5000+ ASP pages that is slowly being migrated to ASP.NET using frames and database session storage, and it's been a huge pain in the neck. This would be a really clean solution.
# April 15, 2004 12:45 PM

Marco Trova said:

Yes, probably the right approach is a mix of the two ways.. I admit I prefer a pure managed approach, like yours..

What do you mean with the proxy class? A web service to off-load execution of the asp code?

Regarding sharing, seems we are in three interested in this weird idea.. ;-)


# April 16, 2004 5:04 PM

Bertrand Le Roy said:

Read my paper. It's at the end. It's a proxy class that looks like those we use for web-services, except that it doesn't execute a web service but a classic-ASP function, from managed code. Very useful in a migration scenario where you have a lot of legacy non-UI code written in classic ASP classes.
# April 16, 2004 5:38 PM

Bertrand Le Roy said:

Kiliman: this is a very good point, but I don't think exposing the context to COM+ hosted components is impossible. For example, if you relay the Server.CreateObject method to the managed part, you should probably get the ASP.NET context. Of course, this would hurt performance. But perhaps it is possible to set the context object another way. I could speak to some COM+ people here.
# April 19, 2004 3:10 PM

TrackBack said:

^_^,Pretty Good!
# April 9, 2005 11:28 PM

ragothaman said:

hi..

how to run pure asp coding in asp.net

# September 21, 2007 8:11 AM

Pavan Said said:

Is Migration Required ??,

why we go for to Develop Communication btn

ASP and ASP.NET....

# December 13, 2007 8:42 AM

Jose said:

the links are not working at all...

:(

# October 11, 2010 12:35 PM

google plus hangouts said:

yzShwc Very neat blog article.Much thanks again. Much obliged.

# March 22, 2012 12:09 PM

buy arcoxia said:

Im obliged for the blog post.Really looking forward to read more. Fantastic.

# March 26, 2012 7:08 AM

buy motrin cheap said:

I value the blog post.Thanks Again.

# April 3, 2012 7:41 AM

slap watch said:

Im grateful for the blog.

# April 3, 2012 8:14 AM

property investor europe said:

Fantastic blog article.Thanks Again.

# April 3, 2012 9:03 AM

Little Ticket To Wealth said:

Hey, thanks for the blog post.Really looking forward to read more. Really Cool.

# April 6, 2012 7:11 AM

www.programmeimmobilierneuf.info/lyon/ said:

Hey, thanks for the blog article.Much thanks again. Want more.

# April 9, 2012 9:40 AM

computer support said:

This is the right blog for anybody who needs to find out about this topic. You realize a lot its nearly onerous to argue with you (not that I truly would need…HaHa). You undoubtedly put a new spin on a topic thats been written about for years. Great stuff, just great!

# June 27, 2012 5:17 AM

Clemente said:

May I just say what a relief to find a person

that really understands what they're discussing on the web. You certainly understand how to bring an issue to light and make it important. More people should read this and understand this side of the story. I was surprised that you are not more popular given that you definitely possess the gift.

# April 7, 2013 4:30 PM

Small said:

I believe that is one of the so much important information for me.

And i'm happy reading your article. However want to observation on some general things, The web site style is perfect, the articles is truly nice : D. Just right job, cheers

# April 15, 2013 5:00 PM