2011-12-28 39 views
2

使用Mono 2.10.8与RavenDB构建.NET4应用程序。当我试着使用OSX上嵌入文档店里做任何事情,我得到以下异常:OSX上的嵌入式ravendb(单声道)

System.NotSupportedException: This platform is not supported 
    at System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties() [0x00000] in <filename unknown>:0 
    at Raven.Database.Util.PortUtil.FindPort() [0x00000] in <filename unknown>:0 
    at Raven.Database.Util.PortUtil.GetPort (System.String portStr) [0x00000] in <filename unknown>:0 
    at Raven.Database.Config.InMemoryRavenConfiguration.Initialize() [0x00000] in <filename unknown>:0 
    at Raven.Database.Config.RavenConfiguration.LoadConfigurationAndInitialize (IEnumerable`1 values) [0x00000] in <filename unknown>:0 
    at Raven.Database.Config.RavenConfiguration..ctor() [0x00000] in <filename unknown>:0 
    at Raven.Client.Embedded.EmbeddableDocumentStore.get_Configuration() [0x00000] in <filename unknown>:0 

从第一名我尝试打开内嵌式存储和使用它的到来。我看了看源的单执行IPGlobalProperties.GetIPGlobalProperties()发现:

public static IPGlobalProperties GetIPGlobalProperties() 
{ 
    PlatformID platform = Environment.OSVersion.Platform; 
    if (platform != PlatformID.Unix) 
    { 
     return new Win32IPGlobalProperties(); 
    } 
    if (Directory.Exists ("/proc")) 
    { 
     MibIPGlobalProperties mibIPGlobalProperties = new MibIPGlobalProperties ("/proc"); 
     if (File.Exists (mibIPGlobalProperties.StatisticsFile)) 
     { 
      return mibIPGlobalProperties; 
     } 
    } 
    if (Directory.Exists ("/usr/compat/linux/proc")) 
    { 
     MibIPGlobalProperties mibIPGlobalProperties = new MibIPGlobalProperties ("/usr/compat/linux/proc"); 
     if (File.Exists (mibIPGlobalProperties.StatisticsFile)) 
     { 
      return mibIPGlobalProperties; 
     } 
    } 
    throw new NotSupportedException ("This platform is not supported"); 
} 

现在,我还在学习OSX系统配置的来龙去脉(我一直在Windows家伙我的一生) ,但我很确定我没有对我的系统配置做任何愚蠢的事情。这告诉我要么从来没有在当前Mono的实现OSX上工作,要么我有一个大的盲点。后者似乎更有可能,所以帮助我:)

+0

我认为这将有助于如果你不使用dmcs编译器。 http://stackoverflow.com/questions/3882590/why-are-there-four-mono-c-sharp-compilers – kenny 2011-12-28 04:03:41

+0

@kenny我不明白这是如何成为一个因素,即使有可能我可能会使用DMCS以外的其他程序来编译.NET4应用程序。 – 2011-12-28 04:15:54

回答

4

如果你明确指定一个端口,你将能够超出这个,默认端口是*,这意味着“找到我一个打开”。指定8080,看看这是否有帮助。请注意,我们不支持Mac上的RavenDB Embedded。 你可以在Mac上运行RavenDB客户端。

+1

不支持嵌入的内存,这就是为什么它正在初始化连接,即使我没有指定连接。 2个问题 - 有没有希望在某个时候增加这种支持;是否有一个原因,EmbeddableDocumentStore不会抢先在OSX上抛出不受支持的异常?谢谢! – 2011-12-28 15:29:36

相关问题