An ASP.NET Core CMS/Blog Platform
Development Environment: (develop banch)
Dev/Test Site: https://blogn.azurewebsites.net/
Before getting started working with Blog-n locally you will need to create a secrets file. To do this:
- Open the source in Visual Studio 2019
- Right-Click on the Blogn project (in the src folder).
- Select "Manage User Secrets" (A secrets.json file will be created and opened in Visual Studio)
- Add the following to the file and save it.
{
"BlognConnectionString": "Server=LOCALHOST;Database=Blogn;User Id=USERNAME;Password=PASSWORD;",
"Migrations": {
"DefaultAdminUserName": "blog.admin@example.com",
"DefaultAdminPassword": "AdminPassword123"
}
}
The connection string will be used by the application for your blog data. You can set the values to anything you like, but:
- The User must have rights to create a new database, OR
- You must create an empty database with the same name.
Either way the account will need rights to create and modify the schema of the database if you run with migrations enabled.
DefaultAdminUserName & DefaultAdminPassword will be used to create an initial administrator account for your site so you can log in and make changes. It is highly recommended that you change the password on this account on your first login! (This will only be done if there are no accounts in your database.)
If you are not using Visual Studio (For example if you prefer to use Visual Studio Code), you can achieve the same thing from the command line. See the documentation for detailed instructions.
ex.
dotnet user-secrets set "Migrations:DefaultAdminPassword" "AdminPassword123" --project PATH\TO\PROJECT\DIRECTORY
Note: If values are not provided for DefaultAdminUserName & DefaultAdminPassword, they will default to the above values.