On 18-9-2015 19:50, [email protected] [firebird-support] wrote: > 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
For reference error number 5 is access denied. Firebird writes the lock files for a database into C:\ProgramData\firebird but it isn't able to create the folder (you don't have enough rights). To redirect the lock files, you need to set the environment variable FIREBIRD_LOCK to the location where you can write. See also this discussion: http://firebird.1100200.n4.nabble.com/FB-Tracker-Created-CORE-3197-Firebird-inet-server-consumes-100-CPU-and-hangs-all-connections-td3013382.html Mark -- Mark Rotteveel
