当我尝试将带有嵌入式RavenDB实例的MVC4站点部署到新的Azure网站预览功能时,我收到了拒绝访问的消息.该网站在本地工作正常.
以下是我配置Raven的方法:
//Initialize the RavenDB Data Store
Raven.Database.Server.NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(8887);
var documentStore = new EmbeddableDocumentStore()
{
DataDirectory = "~\\App_Data",
UseEmbeddedHttpServer = true,
Configuration = { Port = 8887 }
};
documentStore.Initialize();
Run Code Online (Sandbox Code Playgroud)
这是我浏览网站时的堆栈跟踪:
Access is denied
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: System.Net.NetworkInformation.NetworkInformationException: Access is denied
Source Error:
An unhandled exception was generated during the execution …Run Code Online (Sandbox Code Playgroud)