Mynt.AspNetCore.Host local installation on Windows
The Core.Host will be in the near futur the first Mynt UI and will let give you visual output instead of log files. We will work hard on it to make it easy to use for everyone.
This is a step-by-step instruction for installing all the needed software for running mynt local on windows client or server with sql express and iis express. If you don't get it there is a very good youtube video which explains it maybe a little bit more detailed. Youtube
Microsoft did also a very good article for publishing on iis you can find it here Microsoft.
Prepare solution for SQL Server
In your solution you have to change the bindings of the Mynt.AspNetCore.Host project.
After you changed the bindings you have to change the used database in your startup.cs.
Remove:
.AddSingleton<IDataStore, AzureTableStorageDataStore>() .AddSingleton(i => Configuration.GetSection("AzureTableStorageOptions").Get<AzureTableStorageOptions>())
And add:
.AddSingleton<IDataStore, SqlServerDataStore>() .AddSingleton(i => Configuration.GetSection("SqlServerOptions").Get<SqlServerOptions>())
Publishing
Since in the project is the Mynt.AspNetCore.Host you can choose between two modes.
<TargetFrameworks>netcoreapp2.0;net471</TargetFrameworks>
To edit this you have right click on the Mynt.AspNetCore.Host project and then click on Mynt.AspNetCore.Host edit.
Choose on of them but you can run both target frameworks on Windows.
Right click on the Mynt.AspNetCore.Host and click Publish (check picture 1). Select the target folder maybe you have first to create a profile which includes the target folder.
Install IIS express and SQL express
Download the latest versions from the links and install all of them. Most of the time you just can click next.. next.. next.
On Windows Server operating systems it is a little bit different you have to enable the Web Server (IIS) server role and establish role services.
Use the Add Roles and Features wizard from the Manage menu or the link in Server Manager. On the Server Roles step, check the box for Web Server (IIS).
After the Features step, the Role services step loads for Web Server (IIS). Select the IIS role services desired or accept the default role services provided.
Install .Net Core or .Net471
It depends on what you choosed but there are the links for both of them. You just have to install what you need.
You also can install it directly in windows just goto:
Start>Control Panel>Windows features activate or deactivate
Select .Net Framework 4.7 Advanced Services
and Internet information services
Create site in IIS
As note the physical path has to be your folder with the publish output.
On the hosting system, create a folder to contain the app's published folders and files. An app's deployment layout is described in the Directory Structure topic.
Within the new folder, create a logs folder to hold ASP.NET Core Module stdout logs when stdout logging is enabled. If the app is deployed with a logs folder in the payload, skip this step. For instructions on how to enable MSBuild to create the logs folder automatically when the project is built locally, see the Directory structure topic.
In IIS Manager, open the server's node in the Connections panel. Right-click the Sites folder. Select Add Website from the contextual menu.
Provide a Site name and set the Physical path to the app's deployment folder. Provide the Binding configuration and create the website by selecting OK:
Very important if your ip is set to localhost you have to place a adress into hostname as example mynt.bot.com in case of this you have to edit you local host file. for this goto and open the host file.
C:\Windows\System32\drivers\etc
In the host file you have to add now this line.
127.0.0.1 mynt.bot.com
Prepare SQL express
Just add an empty database named as you want as example Mynt.
Add Connection string to your configs
Add now the connection string in the appsettings.json
Mynt/src/Mynt.AspNetCore.Host/appsettings.json
It should look like this
"SqlServerOptions": { "SqlServerConnectionString": "Data Source=.\\YOUR_SQL_SERVER_NAME;Initial Catalog=Mynt;Integrated Security=True;MultipleActiveResultSets=True" },
Replace YOUR_SQL_SERVER_NAME with your sql express server name
Start the game
Now you can run the site in IIS just with start page. Have fun :)
Error Solving
Just go to the log file and check the errors. ;)
If anything is wrong or not understandable you are welcome to edit this small description. :-)
Mynt.AspNetCore.Host local installation on Windows
The Core.Host will be in the near futur the first Mynt UI and will let give you visual output instead of log files. We will work hard on it to make it easy to use for everyone.
This is a step-by-step instruction for installing all the needed software for running mynt local on windows client or server with sql express and iis express. If you don't get it there is a very good youtube video which explains it maybe a little bit more detailed. Youtube Microsoft did also a very good article for publishing on iis you can find it here Microsoft.
Prepare solution for SQL Server
In your solution you have to change the bindings of the Mynt.AspNetCore.Host project.
After you changed the bindings you have to change the used database in your startup.cs. Remove:
.AddSingleton<IDataStore, AzureTableStorageDataStore>() .AddSingleton(i => Configuration.GetSection("AzureTableStorageOptions").Get<AzureTableStorageOptions>())
And add:
.AddSingleton<IDataStore, SqlServerDataStore>() .AddSingleton(i => Configuration.GetSection("SqlServerOptions").Get<SqlServerOptions>())
Publishing
Since in the project is the Mynt.AspNetCore.Host you can choose between two modes.
<TargetFrameworks>netcoreapp2.0;net471</TargetFrameworks>
To edit this you have right click on the Mynt.AspNetCore.Host project and then click on Mynt.AspNetCore.Host edit.
Choose on of them but you can run both target frameworks on Windows.
Right click on the Mynt.AspNetCore.Host and click Publish (check picture 1). Select the target folder maybe you have first to create a profile which includes the target folder.
Install IIS express and SQL express
Download the latest versions from the links and install all of them. Most of the time you just can click next.. next.. next.
IIS Server
On Windows Server operating systems it is a little bit different you have to enable the Web Server (IIS) server role and establish role services.
Use the Add Roles and Features wizard from the Manage menu or the link in Server Manager. On the Server Roles step, check the box for Web Server (IIS).
After the Features step, the Role services step loads for Web Server (IIS). Select the IIS role services desired or accept the default role services provided.
Install .Net Core or .Net471
It depends on what you choosed but there are the links for both of them. You just have to install what you need.
Quick and dirty (Only .Net47)
You also can install it directly in windows just goto:
Create site in IIS
On the hosting system, create a folder to contain the app's published folders and files. An app's deployment layout is described in the Directory Structure topic.
Within the new folder, create a logs folder to hold ASP.NET Core Module stdout logs when stdout logging is enabled. If the app is deployed with a logs folder in the payload, skip this step. For instructions on how to enable MSBuild to create the logs folder automatically when the project is built locally, see the Directory structure topic.
In IIS Manager, open the server's node in the Connections panel. Right-click the Sites folder. Select Add Website from the contextual menu.
Provide a Site name and set the Physical path to the app's deployment folder. Provide the Binding configuration and create the website by selecting OK:
Prepare SQL express
Just add an empty database named as you want as example Mynt.
Add Connection string to your configs
Add now the connection string in the appsettings.json
Mynt/src/Mynt.AspNetCore.Host/appsettings.json
It should look like this
"SqlServerOptions": { "SqlServerConnectionString": "Data Source=.\\YOUR_SQL_SERVER_NAME;Initial Catalog=Mynt;Integrated Security=True;MultipleActiveResultSets=True" },
Replace YOUR_SQL_SERVER_NAME with your sql express server nameStart the game
Now you can run the site in IIS just with start page. Have fun :)
Error Solving
Just go to the log file and check the errors. ;)
If anything is wrong or not understandable you are welcome to edit this small description. :-)