Server Error in '/' Application.

attempt to write a readonly database
attempt to write a readonly database

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.Data.SQLite.SQLiteException: attempt to write a readonly database
attempt to write a readonly database

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:


[SQLiteException (0x8): attempt to write a readonly database
attempt to write a readonly database]
   System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt) +392
   System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt) +215
   System.Data.SQLite.SQLiteDataReader.NextResult() +358
   System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave) +113
   System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior) +45
   System.Data.SQLite.SQLiteCommand.ExecuteNonQuery() +44
   System.Data.SQLite.SQLiteTransaction..ctor(SQLiteConnection connection, Boolean deferredLock) +292
   System.Data.SQLite.SQLiteConnection.BeginDbTransaction(IsolationLevel isolationLevel) +73
   System.Data.SQLite.SQLiteConnection.BeginTransaction() +25
   B2B.DBO.SerialNumber_DBO.Update(I_Bean inBean) +90
   B2B.Model.DataManager.GenerateSerialNumber(String serialName) +10376
   B2B.Model.DataManager.CreateShoppingCart(String sessionId, String dataLanguage, String marketTaiwanRid, String marketTaiwanClickId) +82
   ShoppingCart.BindSearchData() +1030
   ShoppingCart.PreparePageData() +378
   ShoppingCart.ProcessPageData(PageData& pageData) +370
   ShoppingCart.Page_Load(Object sender, EventArgs e) +11
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4690.0