In magic you had the option to use an Enterprise server that allowed you to run code on the server.
To do that you had to configure a server, run a broker on it and run magic engined to service requests that the server received.
Let's call it the
To call that server, you would have used
In .NET the application server is
IIS. IIS replaces the Broker and the engines that you would have run on the server.
In the migration, such application will also have a project called
.Server for example
In that project you would find a file called
Services.aspx that manages all of this.
That project is then mapped to a virtual directory on the IIS. See the IIS configuration article
Once you navigate to the Services.aspx URL on the web browser you'll get a small monitor application that allows you to follow up on the server information.
For every Service that was defined in the migrated application you'll find a class in `...Shared.Remoting'
Here's it's code:
As you can see - this class goes to the
UserSettings class to get the Server's URL based on the Service name from the ini file.
If you'll look into the code of
GetApplicationServerUrl you'll see that there are two ways to configure the server URL.
TemporaryRemoteUrlwith the URL of the services.aspx file.
2. For more complex cases where you have multiple services, you can add a section in the ini called
ApplicationServers and add entries based on the Service Name set in the cs file under the
Calling the service is simply done by Creating a new instance of the
Service class and calling it's run method:
new Shared.Remoting.DefaultService().Run("PrintService", "SomeArgument", "Another Argument");
The first argument is the
PublicName of the controller as defined in the
ApplicationPrograms class. The other arguments are simply sent to that controller.
For more call variations see Call Remote article
You can also call a remote controller using a command line, the CMDL.exe file. See Running cmdl.exe article
You can also call a remote controlling using simple HTTP - which is very useful for some scenarios. The syntax is similar to calling a web request.