|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Using FB Embedded in ASP.NET Web Application?
Hi,
Would it be possible/wise to use Firebird's embedded DLL engine in a ASP.NET web application? I know the embedded engine is for single user desktop applications but I still have to ask about this situation. Has anyone used Firebird's embedded DLL engine in a ASP/ASP.NET web application before? Thanks in advance! |
|
#2
|
|||
|
|||
|
download the embedded server at http://prdownloads.sourceforge.net/firebird/Firebird-1.5.2.4731_embed_win32.zip and copy fbembed.dll into the "bin" directory, in order to connect to the server you can use Firebird .net driver.
|
|
#3
|
|||
|
|||
|
I can find that information anywhere, but I have yet to actually hear anyone try it with success. I keep getting "Exception Details: System.DllNotFoundException: Unable to load DLL (fbembed)." no matter where I put the dll. I even put it in the /bin & / directory adding full aspnet priviledges.
This would be VERY cool to get working and use. I have many applications where embedding a database would be ideal to work around host limitations and have enterprise level db capabilities. |
|
#4
|
|||
|
|||
|
Quote:
Set the directory as an "IIS Application" |
|
#5
|
|||
|
|||
|
Do you happen to have an example solution? I set up the directory to grant full control to the ASPNET & the IIS Guest account, allow Scripts & Execute with Write access & even set the Application protection to Low (I would never find someone to host this app if this was all necessary). I copied all the files in the application root & bin directory. Still not working.
I know it's either not possible or something very very simple. I have zipped up my sample solution for anyone to play with. I would love to hear how someone got theirs to work. ![]() I'm using 1.7 RC1 connector along with embeded 1.5.2.4731 server. I used 1.6.3 connector (required hashtable connection string instead of using the FbConnectionStringBuilder) with same results. |
|
#6
|
|||
|
|||
|
I opened your zip file and I just changed the database string to this
Code:
fbConn.Database = "c:\\inetpub\\wwwroot\\samplefirebird\\sample.fbd" and it worked.... I think. At least it didn't give any errors, so I suppose it created the database .. and I didn't have to change any permissions in any directory |
|
#7
|
|||
|
|||
|
First I add to create a database(I used IBExpert). Then I gave the necessary write permissions and I used this code
Code:
Dim fb As New FirebirdSql.Data.Firebird.FbConnection
Dim fbConn As New FirebirdSql.Data.Firebird.FbConnectionStringBuilder
fbConn.ServerType = 1
fbConn.Database = "c:\\inetpub\\wwwroot\\samplefirebird\\DATA.FDB"
fbConn.DataSource = "localhost"
fbConn.UserID = "SYSDBA"
fbConn.Password = "masterkey"
fbConn.Dialect = 3
Dim fbcon As New FirebirdSql.Data.Firebird.FbConnection(fbConn.ToString())
fbcon.Open()
Dim fbc As New FirebirdSql.Data.Firebird.FbDataAdapter("select * from teste", fbcon)
Dim ds As New DataSet
fbc.Fill(ds)
DataGrid1.DataSource = ds
DataGrid1.DataBind()
and it worked ![]() |
|
#8
|
|||
|
|||
|
Finally, some answers!
I appreciate your contribution. You say you have set permissions to "write". Was that the directory /data? I added "write" to the directory through IS Manager and I am still receiving: "I/O error for file CreateFile (create) "C:\INETPUB\WWWROOT\SAMPLEFIREBIRD\DATA\SAMPLE.FBD" Error while trying to create file" The directory path is correct, just need to figure out the correct permissions.At least I know it is trying to do something now! ![]() |
|
#9
|
|||
|
|||
|
I gave permissions to the directory. Write permissions to the ASP.NET user. If it still doesnt work try giving write permssions to NETWORK SERVICE and IWAN_{...}.... and if still doesn't work, lol give full control to everyone, for testing purposes only
![]() |
|
#10
|
||||
|
||||
|
Quote:
On server is better to use superserver or classic (on machines with many real processors) |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Using FB Embedded in ASP.NET Web Application? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|