0
votes

Background

I am working on an integration project where our webapp will talk to a 3rd party desktop application developed in .Net. The third party application exposes .Net API(as well as ActiveX component) for integration. one of our option is to consume their ActiveX components from JavaScript. Since the user is interacting with our web app and the third party desktop app simultaneously, there is no scope of using a web service here.

Based on the POC tests, using the ActiveX from webapp is very slow when compared to a native .Net app calling the 3rd party native API. Legacy architecture and client commitments rules out rewriting our app in .Net. This leaves us with the option of calling the 3rd party API from JavaScript.

Legacy also restricts our Browser to IE.

Question

This is where I got the wild idea, if its possible to call the .Net API directly from JavasScript. in my few hours of research, I haven't found anything concrete. The closest I came was this question. but even here the accepted answer is to use COM

I imagine that this would require loading .Net framework in IE.

Has anyone called .Net API natively from JavsScript? If yes, please help me on how this can be achieved.

1

1 Answers

0
votes

My question is "What are you integrating from .NET?. If is just business and data logic with little to no user interface involved then a web service would do the trick.

.NETAPI -> Webservice -> javascript

The problem I have had with this type of project is the differences in architectures between desktop and web. When you are on a desktop api paging is taken care of for you but on the web you have to write logic to do paging. Web services are not designed to send 50K records and when it passes thru a web service layer it will slow it down considerably.