Login

Recover Your Password

Return to Home > Documentation > How to Setup a Server and Add a Web Application

How to Setup a Server and Add a Web Application

The server environment is a Windows server (or laptop) with IIS and Sql Server (including express) installed. There are several scenarios with slightly different requirements. We have focused documentation primary on these use cases.

  1. Create an Amazon EC2 server instance with Windows Server 2019+ and iis web server. For details see the article How to Create an Amazon Windows 2019 Server for Contensive
     
  2. Download and install the Configuration Tool from http://contensive.io/downloads.
    This installs two features, the command line configuration utility and a windows service for managing background tasks.

  3. Use the configuration tool to first configure a Server Group, then to create an Application in the Server Group. 
    The Server Group holds the settings for resources used by all applications in the group, like connection strings for Db servers, the file system, etc. A Server Group can contain one or more applications, and is can manage one or more servers to execute the application(s)

    Start a command prompt as administrator and change directory to c:\Program Files (x86)\kma\contensive5. For help using cc.exe, run cc with no arguments. For status of the current Server Group, run >cc --status . To change a Server Group configuration, you can re-run this command at any time.

    run >cc --configure

    >> Enter the Server Group Name: (This should be the name of this server, like staging, or myCustomer)

    >> Production Server (y/n)?: ( this property can read by applications to enable/disable features. Type y for production servers, else n)

    >> Enable Logging  (y/n)?: ( always y )

    >> Local File System (y/n)?: ( answer y for this example. Answer n and all application files will be stored in an Amazon S3 bucket )

    >> Enter the drive letter for data storage: ( "c", "d", etc. Where you want your file storage for the application )

    >> SQl Server Endpoint: ( For a local server on this machine, use (local). For a remote server like RDS, use the RDS endpoint. Include the port if not default. )

    >> native sqlserver userId: ( the user login for this server group. )

    >> native sqlserver password: ( the password )

    >> Use (l)ocal cache or (m)emcached server?: ( for this example, use local cache "l")
      
  4. Create an application in the Server Group.
    An application is the solution you are creating. It might be a website with one or with 100 servers, or it might be a database program that processes data periodically.


    run >cc -n

    You will be prompted for the following:
    1. Application Name
      The name of your application, like MyApp
    2. Admin Route
      If your application is online, this will be the path you use for the administration site (where you edit data). The default is "admin"
    3. Primary Domain Name
      Enter a domain name that will be used to reach the application if applicable. You can change this or add many more later
    4. app Files
      This is the file folder where the website files like scripts will run, typically wwwRoot. Enter to accept the default local path.
    5. cdn Files
      This is the file path where uploaded files will be stored if they will be available online. ( In non-local Server Groups this is remote AWS S3 bucket )
    6. private Files
      This is the file path where the application will store files that should not be mapped to the webserver. Enter to accept the default local path
    7. temp Files
      This is the file path used for files that are only used temporarily. Enter to accept the default local path

    8. files url
      This is the prefix added programmatically to cdn files to make them available on the webserver. For a local filesystem, this path is mapped into IIS
        
  5. Download the default sample website zip file from http://contensive.io/downloads and import it into the new IIS site using IIS Web Deploy 3.6+

    You may choose later to develop your own IIS application that calls the Contensive library although that isn't necessary. The default IIS application supports endpoints for the administration site and for all remote methods addons you create.

    You will need to install Microsoft Web Deploy

    To install the default application zip file, Open IIS Manager to the site created. Right click on the site and select Deploy >> Import

    Select the downloaded default website and complete the import.
      
  6. Open Windows Services and start the Contensive Task Service, installed with the configuration tool.
      
  7. Go to the admin site http:// + your application name + /admin. The default username/password is root/contensive