views:

342

answers:

1

Hello:

I have an extensive ASP.NET Sqlite driven application that will run through Apache with the help of Mono. For testing purposes, I created an application that has two textboxes and a button. When the textboxes are filled with text and the button is executed, a Sqlite table will receive the text within the textboxes. This test application works in Visual Studio.

I published the test application and placed it on the apache server. The Sqlite .db file sits in the bin folder, and my connection string points directly to this folder. When I run the application, the textboxes and button show up, but when I press the button I receive the following error:

Server Error in '/' Application System.Data.SQLite.DLL Description: HTTP 500. Error processing request.

Stack Trace:

System.DllNotFoundException: System.Data.SQLite.DLL at (wrapper managed-to-native) System.Data.SQLite.UnsafeNativeMethods:sqlite3_open_interop (byte[],int,intptr&) at System.Data.SQLite.SQLite3.Open (System.String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) [0x00000]

at System.Data.SQLite.SQLiteConnection.Open () [0x00000] at WebApplication1._Default.ExecuteQuery (System.String txtQuery) [0x00000] at WebApplication1._Default.Button1_Click (System.Object sender, System.EventArgs e) [0x00000]

at System.Web.UI.WebControls.Button.OnClick (System.EventArgs e) [0x00000] at System.Web.UI.WebControls.Button.RaisePostBackEvent (System.String eventArgument) [0x00000] at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (System.String eventArgument) [0x00000]

at System.Web.UI.Page.RaisePostBackEvent (IPostBackEventHandler sourceControl, System.String eventArgument) [0x00000] at System.Web.UI.Page.RaisePostBackEvents () [0x00000] at System.Web.UI.Page.ProcessRaiseEvents () [0x00000]

at System.Web.UI.Page.InternalProcessRequest () [0x00000] at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]

The system.data.sqlite.dll file is actually in the bin with the sqlite .db file. Does anyone know how to resolve this error?

Thank you,

DFM

+1  A: 

This managed version of the ADO.NET provider for SQLite requires the native sqlite3.dll or Linux shared library from http://www.sqlite.org It looks like the dll is missing: "DllNotFoundException"

andreas
Thanks Andreas - The .dll file is in the bin folder. That is how visual studio organized the published test app. Should I move it somewhere else? The only problem is that this app works well through visual studio, which means that it can see the .dll file.Thank you,DFM
DFM
Does the "apache server" run on a windows or linux machine?
andreas
Hello Andreas - The server runs on Linux.
DFM
Have you installed the shared library (ubuntu: apt-get install libsqlite3-0) ?
andreas
I have, and I still get this error. Any new thoughts?
Christopher Karper
@Christopher Karper: Linux is case sensitivity, so check if there is no typo "System.Data.SQLite.DLL"
andreas
@DFM: Linux is case sensitivity, so check if there is no typo "System.Data.SQLite.DLL"
andreas