Rolphy Reyes 0 Posted November 10 Hi! This is the first time I'm trying to make a deployment to IIS. Everything is working fine in my development machine (as always). When I'm trying to make the deployment to IIS, I'm getting this error: HTTP/1.1 500 Internal Server Error Server: Microsoft-IIS/10.0 Date: Sun, 10 Nov 2024 17:07:20 GMT Connection: close Access-Control-Allow-Origin: * Access-Control-Allow-Methods: HEAD,GET,PUT,POST,DELETE,OPTIONS Access-Control-Allow-Headers: X-Requested-With,Content-Type,Authorization Content-Encoding: UTF8 Content-Type: text/plain Content-Length: 12 HTTP/1.1 5 Server: Microsoft-IIS/10.0 Date: Sun, 10 Nov 2024 17:07:20 GMT Connection: close C<�h�t�m�l�>�<�t�i�t�l�e�>�I�n�t�e�r�n�a�l� �S�e�r�v�e�r� �E�r�r�o�r� �5�0�0�<�/�t�i�t�l�e�>� � �<�h�1�>�I�n�t�e�r�n�a�l� �S�e�r�v�e�r� �E�r�r�o�r� �5�0�0�<�/�h�1�>�<�h The call is: https://myserver/myAppPool/ApiLogin.dll/MyBase/security/helloworld Anyone can help me? Share this post Link to post
Olli73 5 Posted November 10 (edited) Your answer body in readable format: Quote <!DOCTYPE html> <html> <head> <title>Internal Server Error 500</title> </head> <body> <h1>Internal Server Error 500</h1> </body> </html> Could be an issue in your dll or other internal issues. Is your DLL 32 or 64 bit and it is propper configured in IIS? EDit: You must search / find a server log... Edited November 10 by Olli73 Share this post Link to post
Rolphy Reyes 0 Posted November 10 (edited) 7 minutes ago, Olli73 said: Your answer body in readable format: Could be an issue in your dll or other internal issues. Is your DLL 32 or 64 bit and it is propper configured in IIS? Hi! Thanks for your time. I've had compiled it for both 32 bit and 64 bit and I get the same error. In the Application Pool on the IIS, I had turn on/off in the enable 32-bit applications param. I don't really understand what's going on. And the sad part is that I have to delivery this ASAP. Edited November 10 by Rolphy Reyes Share this post Link to post
Olli73 5 Posted November 10 Servers mostly send only an "internal error", so that hackers have not much information about an issue (Vulnerability). So only a log on server can tell you more. Share this post Link to post
Olli73 5 Posted November 10 Are you loading DLL's or other files you expect in root folder? Share this post Link to post
Rolphy Reyes 0 Posted November 10 8 minutes ago, Olli73 said: Are you loading DLL's or other files you expect in root folder? I think it load only the INI file of the framework, so to speak. Share this post Link to post
Rolphy Reyes 0 Posted November 10 14 minutes ago, Olli73 said: Servers mostly send only an "internal error", so that hackers have not much information about an issue (Vulnerability). So only a log on server can tell you more. Where I can see this log? Share this post Link to post
Rolphy Reyes 0 Posted November 10 I have the INI file with this: [DefaultEngine] BasePath=/MyApi ;Port=0 ;PortSSL=0 ThreadPoolSize=100 Seguridad.JWT.Issuer=Bla Bla Seguridad.JWT.Secret=Bla Bla ;DefaultApp.JWT.CookieEnabled=true ;DefaultApp.JWT.CookieName=access_token ;CookieDomain default: hostname of the request ;DefaultApp.JWT.CookieDomain= ;CookiePath default: base path of the request ;DefaultApp.JWT.CookiePath= Seguridad.JWT.Duration=1 ;DefaultApp.JWT.CookieSecure=false Compression.Enabled=True CORS.Enabled=True CORS.Origin=* CORS.Methods=HEAD,GET,PUT,POST,DELETE,OPTIONS CORS.Headers=X-Requested-With,Content-Type,Authorization Share this post Link to post
Olli73 5 Posted November 10 1 minute ago, Rolphy Reyes said: Where I can see this log? Not sure, my experience with IIS is a long time ago, but it could be here: %SystemDrive%\inetpub\logs\LogFiles Share this post Link to post
Rolphy Reyes 0 Posted November 10 28 minutes ago, Olli73 said: Not sure, my experience with IIS is a long time ago, but it could be here: %SystemDrive%\inetpub\logs\LogFiles This is what I find (I have to "erase" some data): 2024-11-10 16:54:32 10.1.0.4 GET /api/security/helloworld - 443 - 00.000.00.000 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:132.0)+Gecko/20100101+Firefox/132.0 - 500 0 0 24 2024-11-10 16:54:52 10.1.0.4 GET /api/security/helloworld - 443 - 00.000.00.000 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:132.0)+Gecko/20100101+Firefox/132.0 - 500 0 0 23 2024-11-10 16:56:44 10.1.0.4 GET /api/security/helloworld - 443 - 00.000.00.000 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:132.0)+Gecko/20100101+Firefox/132.0 - 500 0 0 24 2024-11-10 16:59:21 10.1.0.4 GET /api/security/helloworld - 443 - 00.000.00.000 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:132.0)+Gecko/20100101+Firefox/132.0 - 500 0 0 18 2024-11-10 16:59:52 10.1.0.4 GET /api/security/helloworld - 443 - 00.000.00.000 PostmanRuntime/7.42.0 - 500 0 0 130 2024-11-10 17:00:05 10.1.0.4 GET /api/security/helloworld - 443 - 00.000.00.000 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:132.0)+Gecko/20100101+Firefox/132.0 - 500 0 0 75 2024-11-10 17:07:20 10.1.0.4 GET /favicon.ico - 443 - 00.000.00.000 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:132.0)+Gecko/20100101+Firefox/132.0 api/security/helloworld 404 0 64 2 2024-11-10 17:15:46 10.1.0.4 GET /api/security/helloworld - 443 - 00.000.00.000 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:132.0)+Gecko/20100101+Firefox/132.0 - 500 0 0 385 2024-11-10 17:18:06 10.1.0.4 GET /api/security/helloworld - 443 - 00.000.00.000 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:132.0)+Gecko/20100101+Firefox/132.0 - 500 0 0 84 2024-11-10 17:18:06 10.1.0.4 GET /favicon.ico - 443 - 00.000.00.000 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:132.0)+Gecko/20100101+Firefox/132.0 api/security/helloworld 404 0 64 0 2024-11-10 17:43:02 10.1.0.4 GET /api/security/helloworld - 443 - 00.000.00.000 PostmanRuntime/7.42.0 - 500 0 0 347 2024-11-10 17:50:55 10.1.0.4 GET /api/security/helloworld - 443 - 5.255.231.71 Mozilla/5.0+(compatible;+YandexBot/3.0;++http://yandex.com/bots) - 500 0 0 137 Share this post Link to post
Olli73 5 Posted November 10 Not much information. I would also create a logging in the ISAPI dll. Share this post Link to post
corneliusdavid 214 Posted November 10 Several things I'd check (it sounds like you already have some of these): Server - Handler Mappings: make sure ISAP-DLL is enabled for Execution Server - ISAPI and CGI Restrictions: Either "Allow unspecified ISAPI modules" or add your specific DLL to the list of allowed IIS extensions. Application Pool: Basic settings: No Managed Code; Advanced Settings: "Enable 32-bit Applications": default of False if compiling a 64-bit DLL, True otherwise. Create a new "site" and assign it your Application Pool Be sure the folder for your site (where your DLL will be placed) has permissions to run as IIS_IUSRS; you may also need "Modify" permission if it's going to write to files in that folder. To debug, use IIS, click on the site for your app, then in the right-side panel, click "Browse <mysite> on <myport>" which should give you some error details more than just "Internal server error". Share this post Link to post
stijnsanders 35 Posted November 10 (edited) Oh my god what happened to IIS! I knew it was fickle (It's one of the reasons I created xxm, just to get the install right just once (this is what it took way back) and then use its auto-update) but 32/64-bits and all the newer versions haven't made it easier. Apparently there's also a 'native module API', but it's for C++ only (and this unavailable for Delphi?) sad! Aside from David's suggestions, I would also advise to check the Application Pool settings, as you can make important changes there that affect the required permissions on the file system. Also that some errors end up in the Windows Event Logs, not a place you'll readily think about looking for errors! Edited November 10 by stijnsanders Share this post Link to post
bobprog72 1 Posted November 19 Hi, turn off Compression (compression.enabled=false) in you ini file. Bob Share this post Link to post