I set up an ISAPI DLL with only one component in it, a TSession. When
DLL is called from a web browser and if the code activates the Tsession,
then I get the following error:
Internal Server Error 500
Exception: EDBEngineError
Message: An error occurred while attempting to initialize the
Borland Database Engine (error $2B05)
If the Tsession is not activated, the DLL works fine. Note that if the
TSession is activated at design time, no errors occur then and I have no
trouble creating non-ISAPI DB applications.
Here is the code I used:
---------------------------------------------------------------------------------------------------------------
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, HTTPApp, DBTables;
type
TWebModule1 = class(TWebModule)
Session1: TSession;
procedure WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled:
Boolean);
procedure WebModule1WebActionItem2Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled:
Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
WebModule1: TWebModule1;
implementation
{$R *.DFM}
{ Session1.AutoSessionName = True here}
procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
{ Pathinfo = /noTsession (default) }
Response.content := 'No TSession activated.';
end;
procedure TWebModule1.WebModule1WebActionItem2Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
{ Pathinfo = /Tsession }
Response.content := 'TSession activated.';
Session1.Active := True;
end;
end.
------------------------------------------------------------------------------------------------------------------
Calling ..../scripts/project1.dll/noTsession from my browser works
fine. (i.e. returns, "No Tsession activated").
Calling ..../scripts/project1.dll/Tsession from my browser give the
above error message.
Help! I've heard rumors that these sorts of problems are related to
permissions issues ($2B05 is a "permission denied" error code), but I
can't find anyone who can say exactly what permissions need to be set.
I'm completely stymied by this problem and I need to get something up
and working in the next couple of days, so any help would be greatly
appreciated.
Thank you very much!
Stephen Wong
stephe...@oberlin.edu
If I run the DLL under the debugger, it works just fine! That is, I
stop the WWW service (I'm on an NT server 4.0 SP3), use the following
run parameters:
host application: d:\winnt\system32\inetsrv\inetinfo.exe
run parameters: -e w3svc
Now, when I call ..../scripts/project1.dll/Tsession from my browser, I
get back: "Tsession activated." just as I should.
Is this because the DLL under the debugger is running under different
permissions than the DLL by itself (when called by IIS)?
Arghh!!!!!
Thanks again,
Stephen Wong
stephe...@oberlin.edu
Stephen Wong wrote:
> This problem is driving me nuts! I can't seem to track down an answer
>
> anywhere, other than it seems that lots of other people are having
> similar problems. Here's the deal:
>
> I set up an ISAPI DLL with only one component in it, a TSession. When
>
> DLL is called from a web browser and if the code activates the
> Tsession,
> then I get the following error:
>
> Internal Server Error 500
>
> Exception: EDBEngineError
> Message: An error occurred while attempting to initialize the
> Borland Database Engine (error $2B05)
>
> If the Tsession is not activated, the DLL works fine. Note that if
> the
> TSession is activated at design time, no errors occur then and I have
> no
> trouble creating non-ISAPI DB applications.
>
> Here is the code I used:
> ------------------------
> --------------------------------------------------------------------------------------
>
>Here's another kicker about this problem I just discovered:
>
>If I run the DLL under the debugger, it works just fine!
>Is this because the DLL under the debugger is running under different
>permissions than the DLL by itself (when called by IIS)?
>
Yes
Enable audit logging for file and object access to see where the
problem lies.
John
I found out that the IUSR_XXXX account wants write access to the WINNT
directory. Not sure why, but it does. Setting that permission made
the "permission denied" BDE error go away. (Also found out that if
you log file and object accesses for all users, your system slows to a
crawl! I ended up just logging failures for the IUSR_XXX account.)
However, now I get the following error message:
Internal Server Error 500
Exception: EDBEngineError
Message: General SQL error. -2147221163 Table Alias: webDB
No failures show up on the file/object access audit. Borland's web site
has this problem in their FAQ, but with this rather cryptic answer:
Q: "General SQL Error -2147221164 Table: Alias:<Alias Name>" error:
I get this error when I try and open a
MSACCESS database. What is the problem?
A: This problem seems to be closely related to a DAO DLL versioning
problem. The easiest way to resolve this is to
un-install Office 97 from Control Panel | Add/Remove
Programs. There is information related to this problem in
Microsoft's knowledge base # Q141294.
Microsoft's knowledge base refers to fixing Registry problems for Office
95, not Office 97. I've also already done what MS suggested but to no
avail.
Anyone know of a clarification to this problem/solution?
P.S. On another note, I tried switching to the Acess ODBC driver
instead of the native MSACCESS driver (BDE 4.51), and it promptly shut
down all the services on my IIS 3.0. Ran fine under the debugger
though. sigh...
Try to use IDDAO32.DLL (for BDE's MSAccess driver file) with
Microsoft's DAO 3.0 driver.
---------------
DimDim
Stephen Wong
Stephen, have you tried letting Install Shield Express take care of the
alias and the registry entries ?
Yiorgos
> I set up an ISAPI DLL with only one component in it, a TSession. When
>
> DLL is called from a web browser and if the code activates the
> Tsession,
> then I get the following error:
>
> Internal Server Error 500
>
> Exception: EDBEngineError
> Message: An error occurred while attempting to initialize the
> Borland Database Engine (error $2B05)
This error has driven me crazy!!!! I have tried everything to fix it.
I blamed it on CGIExpertand when D3 came out I switch to the native CGI
controls. To no avail. I have found that
if I have any Delphi app open on the web server it causes this error. I
am in the process of
switching to TurboPower FlashFile BDE replacement. I have lost a lot
of good customers
because this problem.
-darryl
Darryl Wagoner 이(가) <351026E5...@sai.com> 메시지에서
작성하였습니다...