Subject | Firebird Embedded on web hosting |
---|---|
Author | |
Post date | 2015-09-18T17:50:29Z |
Hi,
i have problems on using firebird embedded on my asp.net web host .
everything work fine locally but on the web i have an exception
System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> FirebirdSql.Data.FirebirdClient.FbException: Can't create directory "C:\ProgramData\firebird\". OS errno is 5 ---> FirebirdSql.Data.Common.IscException: Can't create directory "C:\ProgramData\firebird\". OS errno is 5
what i have done :
- copy fbembed.dll and it's depencies in the Bin Folder
- copy also firebird config file in and change the root variable to absolue Bin path
- copy my database to app_data folder
i build my connectionstring dynamically like this
.
string p = "metadata=res://*/MyFBEmbedModel.csdl|res://*/MyFBEmbedModel.ssdl|res://*/MyFBEmbedModel.msl;provider=FirebirdSql.Data.FirebirdClient;provider connection string='client library=??fbembed??;initial catalog=|DataDirectory|D2015.gdb;user id=sysdba;password=masterkey;Connection lifetime = 0; Pooling = true; MinPoolSize = 0; MaxPoolSize = 500; Packet Size = 8192; ServerType = 1'";
string mslinepath = HttpContext.Current.Server.MapPath("Default.aspx");
mslinepath = Path.GetDirectoryName(mslinepath);
p = p.Replace("??fbembed??", mslinepath + @"\Bin\fbembed.dll");
context = new MyFBEntities(p);
.
.
.
.
any help is more than welcome
thanks