Possible Duplicate:
Classic ASP and ASP.NET Integration
I go开发者_如何学运维t 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.
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.
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
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.
精彩评论