Re: [firebird-support] Firebird Embedded on web hosting

2015-09-19 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 18-9-2015 19:50, amigof...@gmail.com [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: Cant
> create directory C:\ProgramData\firebird\. OS errno is 5
> ---> FirebirdSql.Data.Common.IscException: Cant 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


Re: [firebird-support] Firebird Embedded on web hosting

2015-09-19 Thread hv...@users.sourceforge.net [firebird-support]
---In firebird-support@yahoogroups.com,  wrote :
 
 > On 18-9-2015 19:50, amigoface@... mailto:amigoface@... [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

...
 > 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).

  Correct. 

  One addition - process which hosts Firebird (web server, afaiu) should have 
privileges 
to create folder in "C:\ProgramData". Or you can create it by yourself and 
grant 
privileges to create\delete and read\write files at it 
("C:\ProgramData\firebird") to the account used for web server.

> To redirect the lock files, you need to set the environment variable 
> FIREBIRD_LOCK to the location where you can write.

  Never, never, never do it !!! At least until you 200% sure you really need it 
!

Regards,
Vlad



RE: [firebird-support] Firebird Embedded on web hosting

2015-09-19 Thread 'Louis van Alphen' lo...@nucleo.co.za [firebird-support]
Any reason why you use embedded and not server version of FB?

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: 19 September 2015 10:49 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Firebird Embedded on web hosting

 

  

---In firebird-support@yahoogroups.com,  wrote :

 

> On 18-9-2015 19:50, amigoface@...   [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

...



> 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).

  Correct. 

  One addition - process which hosts Firebird (web server, afaiu) should have 
privileges 
to create folder in "C:\ProgramData". Or you can create it by yourself and 
grant 
privileges to create\delete and read\write files at it 
("C:\ProgramData\firebird") to the account used for web server.

> To redirect the lock files, you need to set the environment variable 
> FIREBIRD_LOCK to the location where you can write.


  Never, never, never do it !!! At least until you 200% sure you really need it 
!

Regards,
Vlad





[Non-text portions of this message have been removed]



Re: [firebird-support] Firebird Embedded on web hosting

2015-09-19 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 19-9-2015 10:48, hv...@users.sourceforge.net [firebird-support] wrote:
> ---In firebird-support@yahoogroups.com,  wrote :
>
>  > On 18-9-2015 19:50, amigoface@... 
> [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
>
> ...
>
>  > 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).
>
>Correct.
>
>One addition - process which hosts Firebird (web server, afaiu)
> should have privileges
> to create folder in "C:\ProgramData". Or you can create it by yourself
> and grant
> privileges to create\delete and read\write files at it
> ("C:\ProgramData\firebird") to the account used for web server.
>
>  > To redirect the lock files, you need to set the environment variable
>  > FIREBIRD_LOCK to the location where you can write.
>
>Never, never, never do it !!! At least until you 200% sure you really
> need it !

I'd assume that on shared web hosting you will never be allowed to 
create a folder (or create files) in C:\ProgramData

Mark
-- 
Mark Rotteveel


RE: [firebird-support] Firebird Embedded on web hosting

2015-09-19 Thread amigof...@gmail.com [firebird-support]
i have to  do it, 

 my client have a firebird database that run with a local business software .
 

 and we want to have the same data on the web for read only access 
 so the simplest way is to upload the database to a web host and use firebird 
embedded to access it with an asp.net web application
 

 btw, thanks for the answer, i am investigating right now :)