Configure custom Morfik app with IIS6 and Firebird

Here are some notes for configuring a Morfik application (DLL) which was in this case compiled with Embarcadero Delphi and using a Firebird SQL database.

IIS6 Configuration

IIS6 needs a web site for each project

I will assume you know how to make a webiste. Point the home directory to the folder containing the .DLL file.  In these examples, yes, that is in the ROOT of the web site rather than in a subdirectory.

The site will need Read and Execute permission.

2 AppPool choices

1 - Morfik Frequent Recycle which reloads every N requests so that you can upload a new DLL and have it take effect quickly
2 - Ordinary - could use the default or a separate one if you want to tweak a few settings.


IIS6 needs to have the DLL allowed to run

Every built-with-Morfik extension DLL must be explicitly granted permission to execute.


IIS web site directory security

If you get an http error 404.1 when requesting the DLL, as in this picture:


then you need to reset the Directory Security such that the IUSR knows the current password.  When transfering from one machine to another, it is easy for the IUSR password to become invalid.  Be careful! If you set a new password using Windows Users and Groups, then you have to reset it for every single web site.

You go into Properties for the Web Site, on the Directory Security tab.  Click the top button so you can edit the name of the account and set the password.  When you click [Ok], you are asked to enter the password a second time, as shown below.


Firebird SQL Configuration

Once: copy shared Morfik DLL to Firebird UDF folder

MFKUDF.dll must be copied to the Firebird\Firebird_2_5\UDF folder.

Firebird.conf should include path to database

Assuming you want to protect your server from inappropriate use, Firebird.conf would be customized to include only those paths that should contain database files.



Aliases.conf should have an alias for each database/project

To make it easy to work on the development database and the live database without having to change Firebird connection details, use a Firebird Alias for each database (presumably one per project).

The alias keyword is arbitrary. It needs to be unique on the machine.


Suitable fbclient.dll is required

Here you need to appropriate 32- or 64-bit fbclient.dll to match up with how you compiled your custom Morfik application in Delphi.  You will need that fbclient.dll either in the same folder as your custom DLL or in a folder that is on the PATH.  If you have multiple projects, the latter is better.


If (and only if) your custom app is 32/64 the same as your Windows is 32/64, then you can copy the fbclient.dll from the Firebird\bin folder.  Otherwise you need to download the appropriate one from elsewhere.   In some cases there is flexibility in the version of client and server, but as a general rule, it is best to match them up.


Windows

NETWORK SERVICE needs full permission on the database folder

Morfik advised that its applications should run under the Network Service account. Therefore this account must have full control of the folder containing the database file (MXD file).


Remap / of web site

Finally if you want the root of your web domain to go directly and immediately into your Morfik application, then you need to use remap / to /yourfile.dll or use a default document (index.html or otherwise) with a META REFRESH that redirects to /yourfile.dll.

If you have the StreamCatcher ISAPI filter available, then that provides an easy way to do the remap.



Advertisement - Morfik Site Hosting

Web and Firebird Database Hosting with HREF Tools



Comments

Blogger said…
DreamHost is definitely one of the best hosting provider for any hosting services you need.

Popular Posts