VBBRett
asked on
Need to connect to MonoDB on AWS server with user is and password
I am trying to connect to a MongoDB database with asp.net core in C# with a userid and password. Can anyone assist me in that respect?
All this is fairly straight forward, if you do this type of setup every day.
If it's you're first time, you might prefer to hire someone + have them document all the steps for you.
If it's you're first time, you might prefer to hire someone + have them document all the steps for you.
ASKER
Thank you David, but I was already past that point initially. I was able to access the MongoDB using Studio 3T and the Mongo Compass platform. What I'm looking for is how to access a remote MongoDB using crednetials(username and password) in C# with a non-local MongoDB.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
The following is a very terse explanation.
Summary: Make sure you can connect locally, then wrap your MongoDB remote connections in TLS, then retest.
1) ssh into your AWS instance.
2) Install the https://docs.mongodb.com/m
3) Ensure you can connect to your MongoDB instance, using user/pass you setup at installation time.
4) Open your MongoDB client port to public connections via your firewall system (usually iptables).
5) Setup your MongoDB instance using https://ianlondon.github.i
6) Test again with MongoDB client.
7) Use https://docs.mongodb.com/m
8) Add your public IP to #5 setup + force to only allow remote connections via TLS.
9) Now install the MongoDB command line client on a remote machine.
10) Test your remote TLS connections.