# Foundation Cloud Server (3/15/2015)
Nicholas Ventimiglia | http://unity3dfoundation.com
A Cloud host-able Asp.Net MVC solution specialized for Unity3d
Data tables are flat and normalized making a conversion to Redis, MongoDB or RavenDB fast !
The Server is a asp.net mvc solution. MVC is a world class open source web framework developed by Microsoft. I chose it because it is fast, scalable and written in C#. You should have a basic understanding of how to develop with this technology before you begin. I also recommend using at least Visual Studio 2013 as your IDE.
You will also need a webhost to host the solution on the world wide web. Most any host that supports windows and mssql will do. I have tested this package on cheap $2 a month hosting as well as Azure.
Lastly, the next iteration of MVC (vNext) will support hosting on Linux web servers. I will update the package when this is released.
The webserver has a number of dependencies. These must be loaded using nuget. Right click on the solution file in the solution view and select Manage Nuget Packages For This Solution. You will be prompted to restore missing packages. Once complete rebuild the package and any missing reference exceptions will be remedied.
In the root there are two sql generation scripts : Cloud.sql and Account.sql. Running these scripts will generate the sql tables. You may run these scripts together if you wish to use a single database.
There are a number of settings that must be configured in the web.config.
There are two connection strings AccountContext and CloudContext. You must set the connection string to reference your newly created database. These strings should be given by your host when you setup the database. In the comments below are two example connection strings.
There are a number of appSettings, most of which you may ignore. I will point out the important ones.
Information for logging into your host's outgoing smtp mail server. For hosting on Azure I recommend using http://sendgrid.com as an smtp provider.
Now the application is setup and you are good to run and/or deploy the app.
The email system allows for send users email when they sign up, request a token and when they update their account info. This allows for two-factor authentication and enables users to manage their accounts without any interaction on your part.
There are three emails sent from the system: Welcome when the user first signs up. Token will send a validation token for when the user requests a change to their account's email or password. Update notifying the user of any change to their account's details.
You may customize these emails by uploading Email Templates. These templates support RAZOR syntax. Razor syntax is an HTMLesq markup language with support for injecting 'Model Values'.
Once the package has been downloaded and your templates augmented, please upload them to your application using in the Dashboard/Files sub menu.