0

I have created a new C# ASP.NET MVC application (for example MyNewNetMVC), which is integrated into IIS via web.config (as EXE).

I need to use part of the functionality of this MVC application in an old application written in ASP/VB, specifically methods of the ASPService class. I have read about .NET libraries using ComVisible. I don't know how to integrate ComVisible into my MyNewNetMVC application.

Or should I go the way of a second .NET project that will only provide functionality for the old ASP/VB?

How to use existing classes (ASPService) from the ASP.NET MVC application in this project? I need to call something like

Server.CreateObject("MyNewNetMVC.ASPService")

in the old ASP/VB application and then use the methods of the ASPService class to get the data. Thank you for your advice.

PS: Building a COM interop library for ASP Classic using 4.0 framework and Visual Studio 2010 is not a solution :-(

user1595465
  • 1,161
  • 4
  • 11
  • 16
  • Never been in a situation like this, but I am sure that you should forget about all this COM stuff. Try to reach your controller with simple requests from the ASP side. You can start with a search like [calling MVC controller from ASP classic code](https://www.bing.com/search?q=call%20mvc%20controller%20from%20asp%20classic%20code&qs=n&sk=&form=BDKTKB&pc=BDT1&shash=&BDParam=0000&mkt=en-US) – Steve Sep 05 '21 at 09:52
  • Can you rewrite the old logic in c# instead? That way, you don't have to worry about maintaining deprecated code – Camilo Terevinto Sep 05 '21 at 10:05

0 Answers0