Wylan Osorio
Wylan Osorio

Reputation: 1166

Mongodb Remote Server with C#

I wanted to know a connection format to connect to a local server using an IP. I used the following but no luck

mongodb//x.x.x.x:27017

And also do I need to have configuration in my server to allow connection from remote machines? Thanks. I really aprecciate your help.

Upvotes: 0

Views: 1773

Answers (1)

Ian Mercer
Ian Mercer

Reputation: 39277

You are missing the colon. It's mongodb://x.x.x.x:27017. 27017 is the default port so you can omit that if you wish. And, of course you need to open port 27017 on the other side.

Upvotes: 1

Related Questions