Answered Server Configuration

  • Thursday, July 22, 2010 6:35 AM
     
     

    I've already Installed the .net stock trader on a system and it is working,

    Now I want to install it on my other system both of my systems are conected via LAN now please tell me how to

    install it on the othe system and provide the SqlServer name which is on my other computer.

     

    Thanks.

     

All Replies

  • Thursday, July 22, 2010 10:13 PM
    Moderator
     
     Answered

    Cool.  It should be easy if you already have installed and working. The best setup is to have a dedicated SQL Server for clustered configs (not SQLExpress---use Developer Edition or for deployments one of the regular editions for SQL Server).

    So:

    1)  Install StockTrader MSI on a machine that will be machine 1 in your cluster.  In last step of setup, the DB config dialog pops up, and you should specify to create new databases, providing the sa login so the userids/logins canbe created along with the config databases for StockTrader. After install,  make sure to enable ports per the readme, and ensure you have followed post-installation steps for MS Distributed Transaction Coordinator network access, etc.  Firewalls must be configured for the specific ports you use or STockTrader uses, which are all listed in readme.  Make sure your single node setup works.  Also try switching to a remote config, following the step-by-step tutorial .NET StockTrader 2.0 (same for 4.0 version) Installation and COnfiguration, at least through first 17 pages.  Don't worry, its mostly screen shots of exactly what to do to get the web app talking to the remote business service tier via WCF servic invocation (no coding, you just use ConfigWeb).  Stop at page 17, bring up SOAMap (button on main page of ConfigWeb) and make sure everything comes up green (no red or yellow, which might indicate firewall issue.  At this point the web app is talking to a separate business service tier via WCF services, however both web app and business service tier are on same machine.

    2)  Next, run the MSI again on your second machine.  Except this time in last step of setup in the DB setup dialog that pops up, choose "Do not create new databases" and simply point at the same database server you used in step 1 (the dedicated DB).  Install will complete, and immediately the web app will be as you congfigured it in step 1, since its loading its settings from same config DB (as is business services).  So, this is all you need to do.  You can run the MSI on as many nodes as you want, choosing Do not create new databases and pointing all installs at the common SQL DB Server.

    3)  If you are using IIS-hosted business services (per tutorial used in step 1), a new business service tier (or web app tier node) only first gets activated when you explicitly activate the IIS worker process by hitting the check page on that server (http://hostname/TradeServiceWcf/TradeServiceWcf.svc). If you are using the self-hosted implementation of Business Services (which is an exe in the \stocktrader\builds\BusinessService directory), then you simply start the .exe on all the nodes you have installed to, and on startup they all joing the cluster participate in load balancing/failover with respect to web app client automatically.  On shutdown of the .EXE, they remove themselves from cluster automatically, and Web tier stops directing requests to this node.

    Let me know if this works for you.  You will find, per the documentation, you need to have proper DNS server setup for clusters to work properly.  The best bet is if your 2 (or more servers) are all in a domain with DHCP/DNS server resolution (and firewalls on all nodes have been configured to allow ports listed in readme). The SOAMAP view should show all running nodes, and immediately tell you if LAN is setup correctly so servers can resolve themselves by name via DNS.  If you are not in a domain with a DNS server (Workgroup mode for windows server); you can still get working, simply edit the \windows\system32\drivers\etc\hosts file and add for each server an entry (machine name and IP address) for the other server(s) in your workgroup so no DNS server is required. 

    -Greg

     


    Greg Leake, Microsoft
    • Marked As Answer by Smith010 Thursday, July 29, 2010 5:25 AM
    •