I have an SQLite DB and I uploaded it to my server [hosted in azure]. But when I try to access it, It throws SQLiteException: unable to open database file.
My connection string is something like this -
string connectionString = "Data Source=https:\\mywebsite.azurewebsites.net\\DB\\persondb.db; Version=3"
I also tried this too -
string connectionString = "Data Source=~/DB/persondb.db; Version=3";
Here is my full method's code -
public static List<PersonDetails> GetPersons()
{
// string connectionString = "Data Source=https:\\mywebsite.com\\DB\\persondb.db; Version=3";
string connectionString = "Data Source=~/DB/persondb.db; Version=3";
using (IDbConnection cnn = new SQLiteConnection(connectionString))
{
var output = cnn.Query<PersonDetails>
("SELECT * FROM persons",
new DynamicParameters());
return output.ToList();
}
}
How can I resolve this issue?