Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3 errors with FIreDAC
#7
I responded via email, but here it goes:

1) When the user gets a timeout. Intraweb shows a error 500. (works perfectly in SA)

Please check the item 8 in this document: https://docs.atozed.com/Docs.dll/deployment/isapi/Deploying%20ISAPI%20using%20IIS.html

From that document:



Quote:When deploying ISAPI applications in Windows servers and a time-out error occurs, you will probably get an error page like this:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
This happens because IIS replaces any content with HTTP status code bigger than 400 with its own content (a useless error message, by the way). When the timeout error occurs, IntraWeb answers with an error code 500. There is no easy - if any - way to programmatically change this behavior from within an ISAPI extension. You need to create (or edit) a web.config file for your application, like this:
<?xml version="1.0" encoding="UTF-8"?>
  <configuration>
      <system.webServer>
        <handlers accessPolicy="Read, Execute, Script" />
        <httpErrors existingResponse="PassThrough" />
      </system.webServer>
  </configuration>
Then save this file in the same folder where your ISAPI DLL is located and you are done.


2) I have tried to build a 64bit version of my application. But it only shows a white webpage instead of Login page.

Does this work when building as SA? Is this specific when you deploy to IIS? 

IntraWeb has no issues when building as 64 bits.

If this is specific to IIS, it may be related to the configuration of the application pool when deploying it. That same document above has detailed information on how to deploy it to IIS. If not, can you please try a simple test case application built from scratch using the IntraWeb application wizard? Put a single TIWButton on it and build it as 64 bits. See how it behaves.


3) I always used the UserSession for my database components (FireDac). Is this not correct?

There is nothing wrong in putting your FireDac Database components in the UserSession. What we recommend is not putting *everything* related to the data access (i.e. all queries and other datasets) in the same place (or the UserSession). It makes things harder to maintain and also the memory consumption is higher (because every component instance is "alive" all the time). On the other hand, splitting the components into DataModules makes things more manageable and if you create and destroy them as needed, you make your application lighter (i.e. it will use less memory). Of course this needs to be considered on a case-by-case basis.

These two demos show the concept of using DataMoudules to organize the data access components (queries, etc). Please have in mind that not everything in these demos is a rigid recipe to  create IW DB applications. But they show some concepts that can be useful to your application. 

https://github.com/Atozed/IntraWeb/tree/master/15/Delphi/Database/IWADODBDemo

https://github.com/Atozed/IntraWeb/tree/master/XIV/Delphi/Database/IWADOPool/source
Reply


Messages In This Thread
3 errors with FIreDAC - by raulevm - 03-16-2023, 01:42 PM
RE: 3 errors with FIreDAC - by Mikael Nilsson - 03-16-2023, 02:02 PM
RE: 3 errors with FIreDAC - by raulevm - 03-16-2023, 02:17 PM
RE: 3 errors with FIreDAC - by DanBarclay - 03-18-2023, 03:35 AM
RE: 3 errors with FIreDAC - by Mikael Nilsson - 03-18-2023, 12:52 PM
RE: 3 errors with FIreDAC - by DanBarclay - 03-20-2023, 02:24 AM
RE: 3 errors with FIreDAC - by Alexandre Machado - 03-21-2023, 06:31 AM
RE: 3 errors with FIreDAC - by raulevm - 03-26-2023, 07:05 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)