Sunday, November 16, 2014

Thoth Gateway 1.4.0 beta release 1 available

As mentioned in my previous post about the Thoth Gateway, a mod_plsql and Apex Listener alternative that runs on IIS, the goal for the next release of the gateway (tentatively called version 1.4.0) is to change the Oracle Data Provider for .NET (ODP.NET) from the "Unmanaged" to the "Managed" driver. By using the Managed (pure .NET) driver, the installation of the Thoth Gateway becomes even simpler, because it removes the need to have the full Oracle client (or even the Instant Client) on the system. Note that this will change the minimum system requirements from .NET Framework 3.5 to 4.0 (the version that the managed driver requires).

There's now a beta version of Thoth Gateway 1.4.0 available for download here. I've tested it myself successfully on Windows Server 2012 with IIS 8.5 and .NET Framework 4.5. I would appreciate feedback from those who want to download and test it out on the same, or other, configurations.

Please note the following:
  • The gateway no longer requires an Oracle client installed on the same machine (the web server). Similar to the way the "Thin JDBC" driver works, the "Managed ODP.NET" driver is just a single file (Oracle.ManagedDataAccess.dll) that is placed in the same "bin" folder as the gateway.
  • The supplied web.config file includes a configSections/SectionGroup with the .NET 4.0 sections. If upgrading from an earlier framework version running the gateway, you probably need to update the config file.
  • The "requestValidationMode" attribute of the "httpRuntime" node should be set to "2.0" to avoid problems when Apex passes HTML markup in the querystring (for success messages and the like).
 Please leave a comment here, or in the Google Code issue log, if you had any problems or indeed if you were able to install and run it successfully.

13 comments:

Roland said...

Works like a charm on our Windows Server 2012 R2 Standard (.NET 4.0) on VMWare with managed Oracle Driver.

Many thanks!

Anonymous said...

OK, sounds GREAT! How do I deploy it? Is it just copying these files to a directory?

Morten Braten said...

@Anonymous: Download the latest full version (1.3.7), there are installation instructions in that package. Then just replace the files in the /bin folder with the new files for the 1.4.0 beta release.

- Morten

Richard said...

Hey Morten,

I am trying to use Thoth on with IIS 7 on Win 8.1, Oracle XE 11g with Apex upgraded to 5.0.1.
I actually had to change nothing in the web.config. I just needed to unlock the apex_public_user account and set its password. I also added a virtual directory "\i\" in iis so that it points to C:\apex\images, where apex' static files are stored in my case.

However, when I access the default URL (in my case http://127.0.0.1/pls/apex), i get the following browser message:
---------------------------
Message from webpage
---------------------------
There are issues with the configuration of the Static Files in your environment. Please consult the "Configuring Static File Support" section in the Application Express Installation Guide.
---------------------------
OK
---------------------------

Interestingly after that message, apex and all its workspaces/applications works as expected, with integrated authentication et al.

Do you have a hint from where this comes from or how I can track this down further?

Than you very much for any help!

Greetings - Richie

Morten Braten said...

@Richie: The error message itself directs you to the the Apex 5 installation guide, which notes that for mod_plsql, you must set the PlsqlPathAlias and PlsqlPathAliasProcedure config settings in the dad.conf for the new Static Files feature to work.

See https://docs.oracle.com/cd/E59726_01/install.50/e39144/http_server.htm#HTMIG29474 and https://docs.oracle.com/cd/E59726_01/install.50/e39144/http_server.htm#HTMIG29263

On the Thoth Gateway, this corresponds to the PathAlias and PathAliasProcedure settings in the DAD section of the web.config. When these are set, the warning from Apex will go away and the Static Files will work.

- Morten

Unknown said...

Hi Morten,
I apologize for the long post, I really appreciate your help on this. Here is my environment..

I've Apex 4.2 on 11.2 Database and Windows 2012 R2 server with IIS 8. I've followed you instructions on this post and instructions from 1.3.7.
Added a virtual directory called "thoth" in IIS default web sites pointing to C:\inetpub\wwwroot\thoth.
Copied directories "i" and "pls" from thoth 1.3.7 into C:\inetpub\wwwroot\thoth and converted "pls" to application. Replaced the .ddl files in bin with newer 1.4.1 .dll files.
Copied we.config from 1.4.1 and edited only the dad part (host,port,sid and password) as in the instructions.
I'm getting 404 errors, when I try to access with the following URLS
http://myhost/pls/apex/apex
http://myhost/thoth/pls/apex
Am I using the wrong URL?
I've changed log4net level to "DEBUG" and here is what I've in the log file..
-----------------------
2015-11-17 14:00:34,941 [13] DEBUG PLSQLGatewayModule.PLSQLHttpModule DAD not specified in URL, or specified DAD not defined in configuration file. Redirecting to default DAD and default procedure: /thoth/apex/apex
[Footer]\r\n[Header]\r\n[Footer]\r\n[Header]\r\n2015-11-17 14:07:47,867 [8] INFO PLSQLGatewayModule.PLSQLHttpModule Request: GET /thoth/pls/apex
--------------------------

What am I doing wrong?

Thank you so much for your time.
Sam

Morten Braten said...

@Sam G: You write that you added a virtual directory called "thoth" to the default website... but that adds an extra level to the hierarchy, which won't work. What I usually do is disable (or delete) the default website, and make a new website that points to c:\inetpub\wwwroot\thoth.

So: If the root directory of the website is "c:\inetpub\wwwroot\thoth", and you have placed the "pls" folder into that root, and there is a DAD called "apex" defined in the web.config, then the URL should be http://yourhost/pls/apex (and http://yourhost/pls/apex/f?p=100 for a specific application).

Hope this helps,

- Morten

Unknown said...

Hi Morten

Thanks for the wonderful application. I'm following this application and using it since 1.3.x. I must say that configuring and running this is a breeze. One quick question. Will this run in Linux/ASP.NET5 combination. Is there any code modification required.

Thanks
Haris

Morten Braten said...

@Haris: Thanks, glad you found it useful. Regarding running on Linux with the .NET Core libraries, it's not something I have looked into yet, but I wrote some thoughts about it in my reply to one of the comments here: http://ora-00001.blogspot.com/2015/04/thoth-gateway-moved-to-github-now-supports-apex-5.html?showComment=1467671812290#c4482305983856558169

- Morten

Anonymous said...

Does the new beta version still have the ODP dependency? In other words, is it now a single package drop-in solution?

Morten Braten said...

@Anonymous: As per the announcement starting with version 1.4.0, "The gateway no longer requires an Oracle client installed on the same machine (the web server). Similar to the way the "Thin JDBC" driver works, the "Managed ODP.NET" driver is just a single file (Oracle.ManagedDataAccess.dll) that is placed in the same "bin" folder as the gateway."

- Morten

Anonymous said...

This looks like exactly what I was looking for!
OS is Windows 2012
These are the steps I followed:

1) Unzipped the three .dll files in the 1.4.0 beta to c:\inetpub\wwwroot\thoth\pls\bin
2) Created the website (using port 7777) called 'ThothGateway' pointing to the "c:\inetpub\wwwroot\thoth" directory, along with the /i/ virtual directory containing the Apex images. I also converted the /pls to an application according to the instructions. Note: There is no option to change to a 32 bit application.
3) Edited the c:\inetpub\wwwroot\thoth\pls\web.config (from the beta zip) file to
3.1 supply the connect string values for the dad name="apex" section
3.1a These are the same values that I use to connect via sqlplus.
3.2 set the ErrorStyle value to "DebugStyle"
3.3 set the RequestValidationFunction value to "2.0" per the beta instructions
3.4 set the log4net File Value to "c:\inetpub\wwwroot\thoth\pls\bin\PLSQLGatewayModule.log" (for my ease) and the level Value to "DEBUG" - again per the beta instructions.

When accessing the site (directly from the server) http://localhost:7777/pls/apex/apex/
I get the Error: 500.19; with detailed information stating that there is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section. The web page error points to line 9 of the web.config file.
There are four entries in the Security Event Log that appear to show a successful authentication logon with special privileges assigned. There is nothing in the PLSQLGatewayModule.log file.
Ideas?

Morten Braten said...

@Anonymous: To resolve the error of a "duplicate 'system.web.extensions/scripting/scriptResourceHandler' section", refer to the following links:

https://blogs.msdn.microsoft.com/gaurav/2013/10/01/there-is-a-duplicate-scriptresourcehandler-section-defined/

http://stackoverflow.com/questions/3387322/iis7-deployment-duplicate-system-web-extensions-scripting-scriptresourcehandl

Basically, you probably have .NET Framework 2.0 and 4.0 installed on the server, but not .NET Framework 3.5. Either use the Add/Remove IIS components to install .NET Framework 3.5 (and ASP.NET 3.5), or simply switch the application pool for the gateway to use .NET 2.0.

- Morten