How to pass and revieve variables from dll to web server

Timmy 1 Reputation point
2021-07-18T10:35:58.053+00:00

How to pass and revieve variables from dll to web server

I am fairly new at programming, especially with .NET so please bear with me. I am trying to create a .NET .dll file that passes some floating point and string variables to a private server to perform sensitive calculations and algorithms. Then I would like the private server to pass back some output variables to the dll, and the dll finishes the rest of the calculations which are less sensitive.

What's the simplest way to approach this and what libraries/packages are needed? How do I ensure the dll waits to receive the server's output before continuing further calculations?

Thanks

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,399 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,194 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,277 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Albert Kallal 4,731 Reputation points
    2021-07-19T23:33:19.55+00:00

    Ok, we going to need more context.

    > to create a .NET .dll file that passes some floating point and string variables to a private server to perform sensitive calculations and algorithms.

    Ok, is this .dll for the desktop program, or where/when how do you want to use this .dll? The .dll library code has to be used and exist in some context.

    In other words, do you want the web site to use + consume and interface to that .dll? (and in this context that would mean it is some kind of .net assembly).

    So can the web site use + consume + interact with that .dll? yes, it most certainly can.

    However, the next question then is what kind of client software are you meaning to use here?

    Is the client software a desktop program?

    Is the client software maybe a web browser?

    And we might need more details as to what kind of .dll you are talking about here?

    But in general, the answer is yes if you need/want/expect the web site to consume + use that .dll

    You would as a general rule create a web service on the web site, and the client software (which we don't know what you plan to use) can then pass values to the web site. The web site can then take those values, process them with that .dll, and then return the results to the client side.

    So, the main remain questions are:

    What kind of .dll is this?
    (it is a .net .dll, or some 3rd party code). If it is NOT a .net .dll, then it can be used, but in most cases it would have to be a x64 bit .dll if this is to be hosted on the web site.

    And next, we need to know what client side software you want to use to interact with the web site that has use of that .dll.

    Perhaps you mean a desktop program, or maybe you mean a browser based client? (but, both a web browser, and a desktop program are able to talk to the web server which has that one .dll you wish to use.

    For example, I use GhostScript .dll on one web site. It is a .dll, and I am able thus to convert a up-load PDF file to a image thumb nail for display on the site. The client side software in this example is a regular plane jane web browser.

    so, in most cases, you would build a web service on the web site, but, that may well not be required if the client side software is to be a browser - in that case? If the .dll is a .net one, or even not, the .net code on the web site can interact with that .dll if need be.

    As long as that .dll is a standard windows .dll, then you can do this. If it is a .net assembly .dll, then for sure you can do this. But, even non .net .dll's can in most cases be consumed and used by the web site. However, for non .net ones, then you REALLY want to have a x64 bit version of that .dll.

    Regards,
    Albert D. Kallal (Access MVP 2003-2017)
    Edmonton, Alberta Canada