Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

Running VB6 application as a ASP.NET application

Is there any easy way for me to run a Visual Basic 6 application ( sql server database ) as an ASP.NET application without me having to rewrite the entire code

Dolphus Pereira
Tuesday, October 26, 2004

If you find a way, please let the rest of us know...

...I reckon this would qualify for a killer app!

Tuesday, October 26, 2004

"Visual Basic 6 application ( sql server database )"

Wow, I didn't know SQL Server was written in VB6 ;-)

The answer is, as always, it depends.

If you have a layered (tiered) VB6 application, you might be able to put lots of the classes into a COM DLL and use Interop to call them. This might save some time in re-writing.

However, your biggest issue will probably be that ASP.NET is not stateful, whereas your VB6 app probably is.

There are lots of ways to cheat APS.NET into being pseudo-stateful, but they all have tradeoffs. The Session object is the most obvious.

While +='s comment may seem a little flippant it is in fact correct. Let's face it, if it was easy to do properly, Microsoft would have bundled it.

If you are really familiar with the VB app code, you may be able to write a toolkit that helps to migrate some, or even most, of it, but there is no silver bullet here.

Perhaps you could post some more details of your VB app, then we might be able to offer more specific advice.

Tuesday, October 26, 2004

Use the basic design of your app as a starting point for the new one. COM interop works, but is a kluge. I have a few ASP.Net web apps that use it, and every time the COM developer re-compiles his object, I have to re-reference and re-build mine.

I've also seen COM interop fail miserably and bring down the entire web server.

Nick Ruisi
Tuesday, November 16, 2004

*  Recent Topics

*  Fog Creek Home