In this walk through we'll show you how to use a simple utility provided with the DevForce installation, the "N-Tier Configuration Starter".
If you've developed your desktop application in 2-tier mode, you may be confused how to deploy it n-tier.
The Deployment N-Tier Configuration Starter Tool is a simple utility which can help get you started. You can use this utility to have DevForce create separate Client and Server folders containing the necessary files for an n-tier deployment using the ServerConsole.
You’ll see a dialog like the following:
The data grid on the lower half of the dialog is of some interest: it shows you exactly what files will be deployed to the Client and Server parts of your application.
The contents of the Client folder might be as follows (here we used the QueryExplorer sample from the code samples as our startup project):
The Client gets the main application executable, its config file, the entity model assemblies, and other assemblies referenced by the application. (The TraceViewer.exe is shown here because the applciation referenced it.) The <objectServer section in the config file is also updated to point to the server. (The utility does not currently modify the <connectionStrings>, but this information is not needed on the client.)
The contents of the Server folder contain the following (again for the QueryExplorer application):
The Server also gets the entity model assemblies, and assemblies to which references are set, but it also gets several files not deployed to the Client. These include the ServerConsole.exe and the ServerConsole.exe.config.
This dialog defaults to a selection of the ServerConsole. Just click the <Launch Exe> button to launch it. (Alternatively, you could just double-click the ServerConsole.exe application in the Server folder.) You’ll probably need to tell Windows that it’s okay to let the application through the firewall by clicking <Unblock> in response to the security alert:
As you can see, the ServerConsole is a console application. The window is held open, and the EntityServer kept active, until the window is closed. You can press ENTER in the command window to shutdown the ServerConsole, but don’t do that just yet.
You now have an n-tier EntityServer running, hosted by the ServerConsole.
Using the <Launch Exe> button again, launch your executable. (If you were following along with the QueryExplorer you can launch both the TraceViewer.exe and then the SampleQueries.exe.)
The tool should only be used with Windows or console client applications which are not already configured with a web project to host the EntityServer. If you used the DevForce templates for an n-tier application then you do not need to use this tool. It also cannot be used with a Silverlight application.