- .NET is installed from https://dotnet.microsoft.com/download/dotnet/5.0 (cross platform) or with Visual Studio if you check the
.NET desktop environment
workload when installing. - Head on over to the web server and make sure you generated the
private.key
andpublic.key
- Copy this
public.key
from the web server and paste it inbin\Debug\net5.0
(if you don't see these folders you need to run the project at least once withdotnet run
) - Setup MongoDb
- Run the project with
dotnet run
- Install MongoDB Community Edition
- Install MongoSh
- Create database directory
cd C:\
md "\data\db"
- Start database with
"C:\Program Files\MongoDB\Server\5.0\bin\mongod.exe" --dbpath="c:\data\db" --bind_ip 127.0.0.1 --port 27017
- Open up a new connection to the database with MongoSh
mongosh.exe --port 27017
- Switch to admin
use admin
- Create a new auth user
db.createUser(
{
user: "Admin",
pwd: "nimda",
roles: [
{ role: "userAdminAnyDatabase", db: "admin" },
{ role: "readWriteAnyDatabase", db: "admin" }
]
}
)
- Optional: Connect as Admin user through shell
mongosh.exe --port 27017 -u "Admin" -p "nimda" --authenticationDatabase "admin"
- Create
auth.txt
inbin/Debug/net5.0
with the following contents
Admin
nimda