Skip to content
robertszabobv edited this page Nov 29, 2018 · 15 revisions

Setting up the Web Ui application with IIS

  • Open IIS Manager and create a new Web Site with the following settings:
    • Site Name: ChessInfo;
    • Application Pool: DefaultAppPool
    • Physical Path: [project folder]\WebUI\app
    • Binding: http, port 80;
    • Host name: localhost
    • In IIS Manager left pane, right-click on the newly created ChessInfo web application and select 'Add Application...'
    • Set the Alias to 'api' and physical path to [project folder]\ChessIno.Api
    • Make sure both the ChessInfo and api applications use the same application pool (created and set by default). It should be named 'ChessInfo';
    • In IIS Manager, left pane, Application Pools node, make sure Chess info uses the 'ApplicationPoolIdentity' identity

Setitng up the Database on a local Sql Server instance(**)

  • Open Sql Server Management Studio and create a new database 'ChessInfo' with default settings;
  • From the application folder, open 'LoginAndUserCreation.sql' in Sql Server Management Studio and execute it;
  • Once the script has run successfully, in Sql Management Studio, expand Databases/ChessInfo/Security/Users;
  • Right click IIS APPPOOL\ChessInfo -> Properties -> Membership and select db_owner;

** For details, or if you are setting up the database on a remote server instead of local, please check this article: https://blogs.msdn.microsoft.com/ericparvin/2015/04/14/how-to-add-the-applicationpoolidentity-to-a-sql-server-login/

Setting up the Visual Studio solution

  • Open the [project folder]\ChessIno.Api\ChessIno.Api.sln in Visual Studio 2017
  • In the following files, locate and update the connection string accordingly to your environment (if you were following the steps by now on the local machine, the connection strings should be fine):
    • ChessInfo.Api -> appsettings.json
    • ChessInfo.Repository.Tests -> appsettings.json
  • Compile the solution and make sure there are no compilation errors;
  • In order to validate the entire setup, run all the unit tests in the solution and make sure all passed.
  • In Sql Management Studio, open ClearData.sql file from the application root folder and execute the script. This will clear all the data inserted by the integration tests, so you can start the application clean.

Running the application

  • Open a web browser and type http://localhost in the addressbar; or
  • In IIS Manager, on the left pane, select the 'ChessInfo' site under the 'Sites' node; from the right pane, click on "Browse localhost on *:80 (http)"

Recommended coding tools:

  • Visual Studio 2017 (any edition) for the ChessIno.Api.sln solution;
  • Visual Studio Code for the Web UI (open [project folder]\WebUI\app folder)