尝试写入只读数据库 - System.Data.SQLite [英] Attempt to write a read-only database - System.Data.SQLite

查看:884
本文介绍了尝试写入只读数据库 - System.Data.SQLite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,一点点,我认为是有关安全,但是,事实证明也不能像我一样几乎所有的东西...

I'm having a little bit of a problem that I thought was related to Security but, turns out can't be as I did almost everything ...

大量的信息在这个网站,但没有上有一个答案来解决该问题。

Plenty of information on this on the web but nothing has an answer to fix the issue.

让我告诉我的步骤:

  • 在对VS2k8一个网站,当我调试或卡西尼号开始,一切工作正常,
  • 当设置IIS 7.5(Win7的)指向该网站,并增加我得到的错误IIS_IUSRS修改权后
  • 使用IIS 6.0!同样的事情

图:信息安全数据库文件从IIS 7.5

请注意,其他所有文件和文件夹拥有同样的权利,上述

完整的错误是:

Log: Executing query on SQLite Database

Message ***************************************
Attempt to write a read-only database
attempt to write a readonly database

Stack Trace ***********************************
at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
at soDatabaseManager.CommitPersonsToKitchenDatabase() in c:\Adwiza\Kitchen\App_Code\soDatabaseManager.cs:line 242


PS *的请注意的*,这与IIS 6(Windows 2003中),以及工作,IIS 7.5仅用于故障排除,因为我们有更多的控制在一切......


P.S. *Keep in mind* that this has to work with IIS 6 (windows 2003) as well, the IIS 7.5 is only for troubleshooting as we have more control in everything...

推荐答案

确认匿名网络用户帐户(网络服务或<一href="http://blogs.iis.net/webtopics/archive/2009/03/13/changes-to-application-pool-identities-in-iis-7-5-beta.aspx">maybe别的)下你的web应用程序执行具有读/写/创建/删除到SQLite数据库所在的文件夹的访问。

Make sure that the anonymous web user account (NETWORK SERVICE or maybe something else) under which your web application executes has read/write/create/delete access to the folder where the sqlite database resides.

这篇关于尝试写入只读数据库 - System.Data.SQLite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆