asp.net-mvc-3 – 另一个数据库实例RavenDB MVC3已经使用的临时
发布时间:2020-12-16 04:28:31 所属栏目:asp.Net 来源:网络整理
导读:我正在运行 Windows 7 64位,RavenDB Embedded 1.0.701,MVC 3,C#,VS 2010 Pro. 按照RavenDB网站上的说明操作后,在asp.net页面的第一个RELOAD之后,我得到一个“无法打开事务存储:F:/ RavenDBDataStore / Data”内部异常“另一个数据库实例已经使用的临时路径
我正在运行
Windows 7 64位,RavenDB Embedded 1.0.701,MVC 3,C#,VS 2010 Pro.
按照RavenDB网站上的说明操作后,在asp.net页面的第一个RELOAD之后,我得到一个“无法打开事务存储:F:/ RavenDBDataStore / Data”内部异常“另一个数据库实例已经使用的临时路径”异常. 我尝试处理文档存储,但在我看来我得到了另一个例外. public ActionResult Index() { EmbeddableDocumentStore documentStore = new EmbeddableDocumentStore { DataDirectory = "F:/RavenDBDataStore/" }; documentStore.Initialize(); // <--- this is were I get the exception after reloading the page Dictionary<string,object> test = new Dictionary<string,object> { { "Name",0 },{ "Price",3.99M },{ "Expiry",new DateTime(2008,12,28) },{ "Sizes",new string[] { "Small","Medium","Large" }} }; var results = new Object(); using (IDocumentSession session = documentStore.OpenSession()) { // Operations against session session.Store(test); session.SaveChanges(); ViewBag.Display = session.Advanced.GetDocumentId(test); // Flush those changes session.SaveChanges(); results = from c in session.Query<Dictionary<string,object>>() select c; } return View(results); } 解决方法
尝试按照此处描述的步骤操作:
Using RavenDB in an ASP.NET MVC website 特别关注管理会议部分…… 如果您使用IIS Express调试应用程序,请在调试应用程序之前尝试将其删除… (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- ASP.NET sessionState SQLServer模式超时不起作用
- asp.net – 如何强制使用default.aspx而不是www.domain.com
- asp.net – 多个项目Visual Studio 2015 npm
- asp.net – Route属性上的RouteOrder属性在哪里?
- asp.net – 如何在页面加载时以“添加新”模式进行编程设置
- ASP.NET从内存而不是从文件中流内容
- asp.net-mvc – ModelState.IsValid是假的 – 但是哪一个 –
- 如何在ASP.NET中自定义发布?
- Asp.Net MVC 5 Framework(非核心)中的Angular 4服务器端渲染
- .net – 如何将变量传递给SqlDataSource的SelectCommand?
推荐文章
站长推荐
- asp.net-core – 加密ASP.Net Core中的连接字符串
- asp.net-mvc – 表达式树可能不包含动态操作 –
- asp.net-mvc-3 – 调整使用jquery的MVC3应用程序
- asp.net阻止表单提交两次
- 如何实现ASP.NET Web应用程序的自动错误/崩溃报告
- asp.net-web-api – 将属性注入Web API的`System
- asp.net – IIS 7 URL重写规则未应用
- 你如何正确使用UpdatePanel? (asp.net)
- asp.net-mvc – 是否有用于生成链接的通用ASP.NE
- asp.net-mvc-5 – MVC 5 – 向用户添加声明
热点阅读