Can Raven Db run on Winhost?

强颜欢笑 提交于 2019-12-10 21:07:52

问题


I'm trying to run Raven Db in embeddedmode on Winhost, but I get a securityexception with following stacktrace:

   System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
   System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +31
   System.Security.CodeAccessPermission.Demand() +46
   System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties() +53
   Raven.Database.Util.PortUtil.FindPort() in PortUtil.cs:34
   Raven.Database.Util.PortUtil.GetPort(String portStr) in PortUtil.cs:17
   Raven.Database.Config.InMemoryRavenConfiguration.Initialize() in InMemoryRavenConfiguration.cs:109
   Raven.Database.Config.RavenConfiguration.LoadConfigurationAndInitialize(IEnumerable`1 values) in RavenConfiguration.cs:30
   Raven.Database.Config.RavenConfiguration..ctor() in RavenConfiguration.cs:19
   Raven.Client.Embedded.EmbeddableDocumentStore.get_Configuration() in EmbeddableDocumentStore.cs:45
   Raven.Client.Embedded.EmbeddableDocumentStore.set_DataDirectory(String value) in EmbeddableDocumentStore.cs:69
   StingyPrice.MvcApplication.Application_Start() in Global.asax.cs:42

My application is running in full trust (internal) mode but judging from that exception I'm making a bold assumption that Raven will never run unless they loosen their security policies.

Am I wrong or is it possible to run Raven Db at Winhost? Also if it's not possible, a list of shared web hosting providers that can run Raven Db would be much appreciated. :-)


回答1:


You can try www.winhost.com as described here:

How can I run RavenDB in a shared hosting environment?

It has the so desired Full Trust Allowed which is something one should look for in the case of RavenDB to avoid the current security permissions problems...

NOTE: I just tried this host and can confirm that it works great with RavenDB in Full Trust... :-)




回答2:


RavenDB requires full trust to run in server / embedded mode.




回答3:


Yes, you can run RavenDB on Winhost. You will need to change the web.config file, set the correct Raven/WorkingDir and enable Full trust.

When running, you will get an error regarding WebSockets. You can open up a support ticket to have it enabled and have “Overlapped Recycle” disabled.

I (employee of Winhost) wrote an official startup guide here if you want to try out RavenDb on Winhost.



来源:https://stackoverflow.com/questions/6995947/can-raven-db-run-on-winhost

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!