English 中文(简体)
无法与mongodb服务器连接
原标题:Unable to connect to mongodb server
  • 时间:2011-08-08 14:27:47
  •  标签:
  • c#
  • mongodb

Mongodb服务器没有专门配置,只是下载,并启用(Bbin/mongod.exe,数据库:测试——窗口7×64,东道方:当地东道方)

Then I created a .Net application:

var server = MongoDB.Driver.MongoServer.Create("mongodb://localhost");
var database = server.GetDatabase("test");

using (server.RequestStart(database)) // MongoConnectionException - Unable to connect to server

服务器:

server.RequestStart(databaseC:UsersGary BenattarDesktopUtilsMongoDbmongodb-win32-x86_64-1.0.0mongodb-

页: 1 - 帮助和启动方案

Mon Aug 08 16:12:02 Mongo DB : starting : pid = 0 port = 27017 dbpath = /data/db

master=0 奴隶=0 64-bit

Mon Aug 08 16:12:02 db edition v1.0.0, pdfile edition 4.4

Mon Aug 08 16:12:02 git version: dabf2ce54614c6de9d728af445eec47f39dde19f

Mon Aug 08 16:12:02 sys info: windows (6, 0, 6002, 2, Service Pack 2 )

Mon Aug 08 16:25:13 connection received from 1270.0.1:4847 #7

Mon Aug 08 16:25:13 end connection 1270.0.1:4847

Dll:

利用MongoDB。 Bson;

利用MongoDB。 司机;

我也试图不设任何防火墙——之前我又加上了下ongo布和VSstudio 2010的一条规则。

怎么办?

最佳回答

我安装了mongodb-win32-x86_64-1.8.2,而不是mongodb-win32-x86_64-1.0.0,然后,我创建了一个新的数据夹,并开始(作为窗口服务)—— 罚款......

问题回答

Try specifying the port

mongodb://localhost:27017 

如果这项工作不成功,你就应当检查一下阳台的原木产出,并确保你有正确的数据目录。 我不敢肯定的是,在我的机器上,它有<条码>c:数据db,我不记得发生了什么变化。 制作该名录并再次尝试。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签