简体   繁体   English

我如何使用 IIS 使 MongoDB 工作(MERN APP)

[英]How do i make MongoDB work (MERN APP) using IIS

I hosted my build folder on IIS and i want to connect to my Database locally as a service and i get:我在 IIS 上托管了我的构建文件夹,我想作为服务在本地连接到我的数据库,我得到:

 You have failed to connect to a MongoDB Atlas cluster. Please ensure that your IP whitelist allows connections from your network.

I also did this:我也这样做了:

and go to your MongoDB Atlas -> NetworkAccess-> Edit- > and add Current IP address.和 go 到您的MongoDB Atlas -> NetworkAccess-> Edit- > 并添加当前 IP 地址。

I added it still getting the same Error.我添加它仍然得到相同的错误。 Maybe i'm doing something wrong.也许我做错了什么。

The question is when i reference my build folder from IIS, how do i make mongoDB work locally?问题是当我从 IIS 引用我的构建文件夹时,我如何使 mongoDB 在本地工作?

First please check if your IP address is correct, then you can refer to this link about how to whitelist IP addresses on MongoDB Atlas .首先请检查您的 IP 地址是否正确,然后您可以参考此链接了解如何在 MongoDB Atlas 上将 IP 地址列入白名单

Note: You need to use your MongoDB Atlas login credentials, open your account and find the cluster that is triggering the error message.注意:您需要使用您的 MongoDB Atlas 登录凭据,打开您的帐户并找到触发错误消息的集群。

If it still doesn't work, you can tryadd your connection IP address to IP access list .如果还是不行,您可以尝试将您的连接 IP 地址添加到 IP 访问列表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM