2013-05-21 50 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