0

Possible Duplicate:
Classic ASP and ASP.NET Integration

I got to work on one application that is created in asp about 15 years ago. Now some functionalities are to be added into this application using .Net 4.0. This may sound silly but can .Net 4.0 be integrated with asp application? I understand asp was used before .Net came into existence and .Net came just 10 years ago. If it can be integrated, we could be saved from writing tons of code.

halfer
  • 19,824
  • 17
  • 99
  • 186
TCM
  • 16,780
  • 43
  • 156
  • 254
  • @Daniel: They are talking about much more advanced things. I am talking about basic things. – TCM Sep 19 '11 at 16:10

3 Answers3

1

What degree of integration are we talking about? They're fundamentally different technologies.

You can have both applications deployed on IIS. In fact, I maintain a ASP.NET2.0 application, with a ASP application inside within the same IIS server, although they sit in different application pools.

However only level of integration you have between the two is limited to HTTP calls. Even if you wanted to compile a dll for your ASP application, it has to be deployed in ASP.NET1.1

Daryl Teo
  • 5,394
  • 1
  • 31
  • 37
  • I don't even know asp :(. I was just 8 yrs old when that technology came. By integration I mean they should run smoothly sharing same session, may be even open in VS2010 ;) – TCM Sep 19 '11 at 16:07
  • Open ASP in VS2010 isn't out of the question. However, they cannot execute within the same application, and I am almost 100% confident you cannot share sessions between the two applications. ASP is just the platform. You will be coding in JScript or VBScript for most of it (just as you use VB and C# for ASP.NET) – Daryl Teo Sep 19 '11 at 16:10
1

You can't add functionality using .NET 4.0; but you can continue using ASP and add whatever functionality you need and serve it using IIS.

UPDATE: There's a way to integrate ASP.NET Security with classic ASPbut if you don't even need to authenticate the user (for whatever reason), you can just create a new ASP.NET app and redirect the user from the classic ASP app to the new ASP.NET back and forth depending on what needs to be done. Now, I wouldn't go for an approach like this since you will be mix and matching things and creating a mess that is going to be a nightmare to support as more features are added.

Icarus
  • 63,293
  • 14
  • 100
  • 115
  • Icarus: that too would be awesome. Can you let me know how can I do that? Any tutorial, links etc? specifically I want all the session data and urls to be consistent. – TCM Sep 19 '11 at 16:08
  • @Anthony: Google for ASP tutorials. I can't recommend anything in particular since I've never programmed in classic ASP. Only thing I can tell you is that you should be able to add functionality using classic ASP (if that's what you want) and serve it using IIS or Apache. I don't know how big is the app, but it seems to me that if you will continue to support it and enhance it, makes sense to just start migrating to a new technology and something that you know better and is more current. – Icarus Sep 19 '11 at 16:17
  • @Anthony just posted a link that may be helpful. Check my update. – Icarus Sep 19 '11 at 16:25
1

There is no reason why you cannot have .asp and .aspx pages within the same application. The only difficulty you will run into is sharing session variables between the two types of web pages. For that, you'll need to either use a third party solution, SQL Server, or a trick like the one I used in this old article: http://www.eggheadcafe.com/articles/20021207.asp

Additionally, you'll need to debug your site under IIS as the web development server in Visual Studio does not support classic asp.

Peter Bromberg
  • 1,498
  • 8
  • 11