Print Thread
Page 1 of 2 1 2
Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
#50876 02/25/15 02:10 PM
Joined: Feb 2015
Posts: 8
F
Member
OP Offline
Member
F
Joined: Feb 2015
Posts: 8
Hi there,

I am trying to create an ISAPI dll to run on a fully 64-bit machine, IIS 7 64-bit and Oracle 64-bit client.

The dll it self works fine, loads nicely in the browser etc..

There are several calls available and every call create a session, tries to connect and do some small database stuff.

The Logon of the session keeps returning an empty OracleExecption.
My code looks something like this:

Code

dtmSession:=TdtmSession.Create(nil);
dtmSession.OracleSession.LogonDatabase:=OracleDatabase;
dtmSession.OracleSession.LogonUsername:=OracleSchema;
dtmSession.OracleSession.LogonPassword:=OracleWachtWoord
try
  try dtmSession.OracleSession.LogOn(errorMessage);
  except
    on E: Exception do
      LogIt(E.Message); //Returns Not Logged On
  end;
finally
   //Save a record to db
  FreeAndNil(dtmSession);
end;

I added some extra code to the LogOn procedure to return the real error message giving by Oracle but this is empty.

I am using XE6 with DOA 4.1.3.5

Any help is appreciated.

Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
F van Schaik #50878 02/25/15 04:35 PM
Joined: Feb 2015
Posts: 8
F
Member
OP Offline
Member
F
Joined: Feb 2015
Posts: 8
A small addition, i debugged the Oracle.pas en found out that the error occured on the code below.

Code
if IsolationLevel <> ilUnchanged then
begin
  NewIsolationLevel := IsolationLevel;
  FIsolationLevel   := ilUnchanged;
  IsolationLevel    := NewIsolationLevel;
end;


More specific it crashes on the following line
Code
 IsolationLevel    := NewIsolationLevel; 

Setting my session IsolationLevel to ilUnchanged made the connection work, but why?

Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
F van Schaik #50888 02/26/15 10:06 AM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
Setting the isolation level will lead to the execution of an "alter session" query. I'm not sure why that would lead to an exception with an empty message. Furthermore you would expect a similar exception for the next query that is executed. This is not the case?


Marco Kalter
Allround Automations
Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
Marco Kalter #50905 02/26/15 01:25 PM
Joined: Feb 2015
Posts: 8
F
Member
OP Offline
Member
F
Joined: Feb 2015
Posts: 8
Yes it does, the next step is opening a dataset with the open option and it gives an AV aswell.

Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
F van Schaik #50906 02/26/15 02:48 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
Okay. Can you let me know your Oracle Client version?


Marco Kalter
Allround Automations
Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
Marco Kalter #50907 02/26/15 02:59 PM
Joined: Feb 2015
Posts: 8
F
Member
OP Offline
Member
F
Joined: Feb 2015
Posts: 8
Release 11.2.0.4.0

Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
F van Schaik #50911 02/27/15 07:59 AM
Joined: Feb 2015
Posts: 8
F
Member
OP Offline
Member
F
Joined: Feb 2015
Posts: 8
It seems all works well until an actual query on the database is done. That would explain why changing the IsolationLevel on the Session componenent to ilUnchanged, prevents an earlier AV because the alter session query isn't triggered.

Last edited by F van Schaik; 02/27/15 07:59 AM.
Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
F van Schaik #50939 03/04/15 03:58 PM
Joined: Feb 2015
Posts: 8
F
Member
OP Offline
Member
F
Joined: Feb 2015
Posts: 8
Dear Marco,

Do you have any time frame for me in which i can receive an answer about this issue?


Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
F van Schaik #50945 03/05/15 10:35 AM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
I'm not sure what could cause this. It is most likely an environment issue though. Perhaps you can verify that the NLS_LANG environment variable is set correctly and that the correct OCI.DLL has been loaded?



Marco Kalter
Allround Automations
Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
Marco Kalter #50961 03/06/15 08:25 AM
Joined: Feb 2015
Posts: 8
F
Member
OP Offline
Member
F
Joined: Feb 2015
Posts: 8
Any tips on how to check this?

When i let the application perform a tnsping i can see it uses a 64-bit client (result = 11.2.0.4.0 (64-bit) )

My path settings look like this:
c:\oracle\x64-client\bin;c:\oracle\x32-client\bin

NLS_LANG = DUTCH_THE NETHERLANDS.WE8MSWIN1252 (from the registry)

As you can see i am really at a dead end atm.

Last edited by F van Schaik; 03/06/15 08:32 AM.
Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
F van Schaik #51026 03/17/15 03:13 PM
Joined: Feb 2015
Posts: 8
F
Member
OP Offline
Member
F
Joined: Feb 2015
Posts: 8
Seems the be a faulty Oracle 64-bit installation.
Post can be closed

Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
F van Schaik #59995 05/07/19 07:54 AM
Joined: Feb 2005
Posts: 49
A
Member
Offline
Member
A
Joined: Feb 2005
Posts: 49
Hello F van Schaik,
we're facing the same problem as you in these days.
Could you please remember what was wrong with the previous Oracle installation? And what was the soution you found?
Thanks

Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
Alberto Pilat #60012 05/10/19 12:23 PM
Joined: Feb 2005
Posts: 49
A
Member
Offline
Member
A
Joined: Feb 2005
Posts: 49
Hi Marco,
I checked in depth the behavior and it seems to belong to DOA components.

I tried a simple application with a DOA Connection (TOracleSession) and a FireDAC connection (TFDCOnnection) against the same database.
The application is compiled in 64bit, Oracle Client 64bit is also correctly installed.

The DOA Connection works fine if the application is a dekstop exe. while it doesn't work if it is compiled as ISAPI library.
FireDAC connection works fine in both situations.
The class exception is EOracleError with an empty message.

I also verified that DOA connection works fine in IIS 7.x (Windows7) while doesn't work in IIS 8 and above (Windows10, Windows 2012, etc...).

Could you please verify it?

Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
Alberto Pilat #60013 05/11/19 08:15 AM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
Can you send me your test project?


Marco Kalter
Allround Automations
Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
Marco Kalter #60015 05/13/19 07:51 AM
Joined: Feb 2005
Posts: 49
A
Member
Offline
Member
A
Joined: Feb 2005
Posts: 49
You can download a test project from
http://www.mondoedp.com/uploads/media/irisftp/download/Test_ISAPI_DO64.zip

Delphi 10.2.3 - It needs IntraWEB 15.
In Unit3 you have to assign the correct connection parameters.

Project1SA is the stand-alone exe version that woeks fine.
ProjectISAPI is the IIS-dll version that can't connect with TOracleSession.

Note: for some reason FDConnection must be connected first then DOA, I didn't investigate but it doesn't matter in this case.

Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
Alberto Pilat #60035 05/16/19 09:10 AM
Joined: Feb 2005
Posts: 49
A
Member
Offline
Member
A
Joined: Feb 2005
Posts: 49
Hello Marco,
was you able to see the test-project? Or you need something else?

Thanks

Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
Alberto Pilat #60039 05/17/19 09:13 AM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
We will get to this shortly. I will post the results here.


Marco Kalter
Allround Automations
Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
Marco Kalter #60196 06/18/19 10:12 AM
Joined: Feb 2005
Posts: 49
A
Member
Offline
Member
A
Joined: Feb 2005
Posts: 49
Hi Marco,
any news about the problem with IIS 64bit?

Thank you

Re: Creating a 64-bit ISAPI dll; Session.Logon keeps returning an empty exception and doesn't connect
Marco Kalter #60369 08/01/19 10:46 AM
Joined: Feb 2005
Posts: 49
A
Member
Offline
Member
A
Joined: Feb 2005
Posts: 49
Excuse me Marco,
we really need to use our application in 64-bit IIS environment...
Could you please let me know?

I'm waiting for your reply.
Best regards.

Page 1 of 2 1 2

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.026s Queries: 14 (0.005s) Memory: 2.6081 MB (Peak: 3.0438 MB) Data Comp: Off Server Time: 2024-05-20 22:15:47 UTC
Valid HTML 5 and Valid CSS