2013-05-21 32 views
6

我正在Windows Azure上运行MVC网站并使用RavenDB嵌入式。如果网站是“冷”(从Azure的情况下卸载),我得到先打到网站出现以下错误信息:在Windows Azure上使用RavenDB Embedded写入日志文件失败

Server Error in '/' Application.

Failure writing to log file

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.Isam.Esent.Interop.EsentLogWriteFailException: Failure writing to log file

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[EsentLogWriteFailException: Failure writing to log file]
Microsoft.Isam.Esent.Interop.Api.Check(Int32 err) +21
Microsoft.Isam.Esent.Interop.Api.JetInit(JET_INSTANCE& instance) +23
Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator, OrderedPartCollection`1 documentCodecs) +309

[InvalidOperationException: Could not open transactional storage: C:\DWASFiles\Sites\reflix\VirtualDirectory0\site\wwwroot\App_Data\Data] Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator, OrderedPartCollection`1 documentCodecs) +443
Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configuration) +994
Raven.Client.Embedded.EmbeddableDocumentStore.InitializeInternal() +313 Raven.Client.Document.DocumentStore.Initialize() +463 Reflix.MvcApplication.InitializeRavenDB(String dataDirectory, Boolean rethrowException) +135 Reflix.MvcApplication.Application_Start() +131

[HttpException (0x80004005): Could not open transactional storage: C:\DWASFiles\Sites\reflix\VirtualDirectory0\site\wwwroot\App_Data\Data] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9859441
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Could not open transactional storage: C:\DWASFiles\Sites\reflix\VirtualDirectory0\site\wwwroot\App_Data\Data] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873784 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18033

如果我等待一两分钟,该网站来很好。很明显,这是一个首要问题。任何人有任何想法如何解决这个问题?

我的配置:

  • MVC 4
  • .NET 4.5
  • RavenDB 2.0.2360

更新:的Azure团队正在研究这个作为Azure网站可能存在的缺陷。只要我听到任何消息,就会有更新。

+0

您使用** Azure网站**或** Azure Web Role **吗? – SliverNinja

+1

Azure网站。 – mgnoonan

+0

加一个这个问题,遇到同样的问题! – Fore

回答

1

证实了这一点,如天青网站的错误,它现在已经推出出。我没有任何额外的细节,但该网站现在可行(2013年8月30日),并且我没有对代码做任何结构性更改。

0

看看事件日志,它会给你更多的信息。 它看起来像东西是防止日志适当写入,检查权限,特别是,你可能有CREATE_FILE权限,但不能写权限

+0

后续问题:如何在嵌入模式下运行时查看日志? – mgnoonan

+0

我的意思是,我知道有一个'logs'文件夹,但是那里只有一些二进制'RVN.log'文件和一些'jrs'文件,这些文件在文本编辑器中看起来不可读。我必须将它们放到本地服务器并复制到'logs'文件夹吗? – mgnoonan