版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wangyinlon/article/details/82155204
首先web.config添加
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
</configuration>
接下来可能报错:
无法识别的属性“targetFramework”。请注意属性名称区分大小写。错误解决办法
参考文章
https://www.cnblogs.com/dongchi/p/4940053.html
因为我用的sqlite数据库,又报了下面的错误,- -
System.BadImageFormatException: 试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)
在 System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op)
在 System.Data.SQLite.SQLite3.StaticIsInitialized()
在 System.Data.SQLite.SQLiteLog.Initialize()
在 System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework)
在 QQShop.FrontWeb.Controllers.HomeController.Index(Int32 id, String type)
解决方法
最后一个错误了,不容易.
attempt to write a readonly database\r\nattempt to write a readonly database
解决办法:控制面板->文件夹选项-> 使用简单文件共享(推荐),把前面的勾去掉。找到SQLite数据库所在的文件夹,单击右键,属性->安全,为Users用户组添加写入权限。再试一下,问题解决。