Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread IIS and ISAPI module
Thu, Aug 31 2017 8:40 AMPermanent Link

Allen Hunt

Should the TDatabase.LoadRows Method work with an IIS ISAPI.DLL or is there some special coding that needs to be done?

I'm getting an Application Error Missing "{" and I've traced it back to javascript $t.tdataset_fownerdatabase.tdatabase_fparser.initialize(rowdata); where rowdata is empty.

I've set Database.BaseURL := 'isapi/ewb_isapi.dll'; but I'm not sure whether or not this is correct.

Thank you!
Thu, Aug 31 2017 8:57 AMPermanent Link

Allen Hunt

BTW:  I'm using Delphi's TWebModule WebBroker ISAPI technology.
Thu, Aug 31 2017 10:00 AMPermanent Link

Ronald

aknapple wrote:

<BTW:  I'm using Delphi's TWebModule WebBroker ISAPI technology.>

I think IIS can not find your module, the returned result is empty and that is why EWB can not find {.
Try the full path of the dll, with http:// domain etc.

Ronald
Thu, Aug 31 2017 10:44 AMPermanent Link

Allen Hunt

Ronald wrote:

<< I think IIS can not find your module, the returned result is empty and that is why EWB can not find {.
Try the full path of the dll, with http:// domain etc. >>

Hi Ronald,

I've tried the full path and I still get the same message.  I am pretty sure it is finding the .dll because I can see the user session that is established on my ElevateDB Server.

Allen
Thu, Aug 31 2017 11:48 AMPermanent Link

Ronald

Allen W. Hunt wrote:

<I've tried the full path and I still get the same message.  I am pretty sure it is finding the .dll because I can see the user session that is established on my ElevateDB Server.>

Do you catch exceptions? Can you log errors? I sometimes use a "poor mans" debug method by adding a line after statements  like: AddToLog('1')  which dumps a number to a .txt file. Then I can easily see after which line something goes wrong. Not very elegant, but it does the job.

Ronald
Thu, Aug 31 2017 12:24 PMPermanent Link

Allen Hunt

Ronald wrote:

Allen W. Hunt wrote:

<< Do you catch exceptions? Can you log errors? I sometimes use a "poor mans" debug method by adding a line after statements  like: AddToLog('1')  which dumps a number to a .txt file. Then I can easily see after which line something goes wrong. Not very elegant, but it does the job.  >>

Yea, I'm not catching any exceptions.  I'll try it in the isapi.dll.  I'm a newbie so I'm not sure whether or not you can catch exceptions in EWB.  But I will check it out.

Do you happen to know if a TEWBModule module works with IIS?  I've been trying it too and I'm getting what appears to be a "Database Load Response Error."

Allen
Thu, Aug 31 2017 1:04 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Allen,

<< Should the TDatabase.LoadRows Method work with an IIS ISAPI.DLL or is there some special coding that needs to be done? >>

No, EWB does not provide automatic database API support for ISAPI.  You need to code that yourself, but you *can* use the TEWBDatabaseAdapter/TEWBDataSetAdapter components to ease the burden a bit.   These EWB components will allow you to consume/generate the EWB database API JSON:

https://www.elevatesoft.com/manual?action=viewcomp&id=ewb2mod&product=rsdelphiwin32&version=10T&comp=TEWBDatabaseAdapter

https://www.elevatesoft.com/manual?action=viewcomp&id=ewb2mod&product=rsdelphiwin32&version=10T&comp=TEWBDataSetAdapter

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Aug 31 2017 1:50 PMPermanent Link

Ronald

I think you are better off with the EWB webserver and not use IIS. It is not really easy to manage IIS, you must have quite some experience and knowledge to manage it. With EWB webserver you can keep being a developer in stead of an administrator and that is where all the fun is.   

I have used EWB webserver with the EWB modules and DBISam database. It works really great: I can read tables from the EWB server with the speed of 95 reads per second. And actually I am opening a table twice: once to check the permissions of the user that calls the server and once for the actual call. Very fast and reliable.

I read and write to the tables with queries with parameters on a standard TDBISamQuery (I do not use the database system in the EWB ide), maybe I should change this, but I am very used to it..

You need to be aware of concurrent acces of resources since the modules are .dll. Tim has some examples on how to open a database, session en a query with respect to multiple threads (concurrency).  

Ronald
Thu, Aug 31 2017 4:12 PMPermanent Link

Allen Hunt

Ronald wrote:

<< I think you are better off with the EWB webserver and not use IIS. It is not really easy to manage IIS, you must have quite some experience and knowledge to manage it. With EWB webserver you can keep being a developer instead of an administrator and that is where all the fun is.  >>

I was just a little concerned about how many users I'm going to have.  At the moment, I have no idea.  I thought if it wasn't too difficult I would develop for IIS.  I run multiple sites on an IIS server and I did figure out how to redirect stunnel to a different port (I keep this port hidden from outside traffic) so I can host these sites along with an EWB webserver all on the same server.  It seems to be working good so far.

<< I read and write to the tables with queries with parameters on a standard TDBISamQuery (I do not use the database system in the EWB ide), maybe I should change this, but I am very used to it. >>

I've been learning with the database system built into the EWB ide so I am familiar how awesome it is!  So easy to use.  And your right,  I would much rather be a developer than a system administrator.  I'm curious and sorry about all the questions but what is a TDBISamQuery?  It it a custom component you wrote?  (I gathered it wasn't a component in the IDE or a dataset in the IDE's Database Manager but I'm unsure.)

Thank you for the replies Tim and Ronald.  I greatly appreciate it!
Tue, Sep 5 2017 12:52 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Allen,

<< I was just a little concerned about how many users I'm going to have.  At the moment, I have no idea.  I thought if it wasn't too difficult I would develop for IIS.  I run multiple sites on an IIS server and I did figure out how to redirect stunnel to a different port (I keep this port hidden from outside traffic) so I can host these sites along with an EWB webserver all on the same server.  It seems to be working good so far. >>

There's not a lot of downside to using IIS, especially once you get your database API all straight in your ISAPI modules.   You can import dataset columns in the EWB IDE from any URL (click on the ... button to right of the Columns property in a TDataSet component, and use the Import Items from a URL tool button in the Columns Editor to populate the dataset columns.

Having said that, once 2.07 is out and there is the ability to use EWB code on the server-side in addition to the client-side, using the EWB Web Server will be a more compelling proposition.  Just something to consider...

<< I've been learning with the database system built into the EWB ide so I am familiar how awesome it is!  So easy to use.  And your right,  I would much rather be a developer than a system administrator.  I'm curious and sorry about all the questions but what is a TDBISamQuery?  It it a custom component you wrote?  (I gathered it wasn't a component in the IDE or a dataset in the IDE's Database Manager but I'm unsure.) >>

Ronald is using native EWB Web Server modules to implement his application's back-end functionality.  You can read more about them here:

https://www.elevatesoft.com/manual?action=topics&id=ewb2mod&product=rsdelphiwin32&version=10T&section=getting_started

The EWB Web Server module support is a separate download/install, and is completely free.

When using EWB Web Server modules, you can essentially use any non-UI component that you can use in native Delphi.  In Ronald's case, he's using the native DBISAM VCL components for DBISAM database access along with the TEWBDatabaseAdapter/TEWBDataSetAdapter components that are provided with the EWB Web Server module support to serve up the EWB JSON for datasets and to consume EWB JSON database transactions.

Thank you for the replies Tim and Ronald.  I greatly appreciate it!

Tim Young
Elevate Software
www.elevatesoft.com
Image