I have to call a method of a complex .dll C# library when I get a "request". Since I don't want to program the network part (socket, protocol, etc.), I'm thinking of using an existing Web server (IIS or Apache) to handle this part (and use HTTP as protocol).
- Is it possible to load the .dll in memory and call a method of it from a web server? How to do it?
- If yes, is it better to use IIS on Windows, Apache or Windows, or Apache on Linux?
- Is it mandatory to call this method of the C# .dll using C#/ASP? Or can it be with PHP?
It has to be very scalable, and the .dll library uses the .NET Framework.
Of course I'm thinking of exec
function in PHP, but this would start a C# program again and again for each single request, which is not very good.
I would like to load the C# .dll once in memory, and have it running on the web server directly if possible, so that only "calls" to a method happen when I get a specific HTTP request.
My question has similarities to this one, however I don't believe our problems are the same.