Jukka Puranen
Jukka Puranen

Reputation: 8106

Can Raven Db run on Winhost?

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. :-)

Upvotes: 3

Views: 542

Answers (3)

Ray
Ray

Reputation: 67

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.

Upvotes: 1

Leniel Maccaferri
Leniel Maccaferri

Reputation: 102428

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... :-)

Upvotes: 1

Ayende Rahien
Ayende Rahien

Reputation: 22956

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

Upvotes: 2

Related Questions