This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
16
Web Server - Ask For Help / Re: Problem applying new certificate for a 9.15 webserver
« on: November 13, 2019, 02:37:01 AM »
Hi Bruce,
I think it was the password ... got a new set of files placed them and now it works!
(and yeah, I should upgrade for the reason you come up with ... but I like stability too every once in a while :-) )
Thanks!
regards,
Ton
I think it was the password ... got a new set of files placed them and now it works!
(and yeah, I should upgrade for the reason you come up with ... but I like stability too every once in a while :-) )
Thanks!
regards,
Ton
17
Web Server - Ask For Help / Problem applying new certificate for a 9.15 webserver
« on: November 12, 2019, 12:55:23 PM »
Hi all,
a nettalk 9.15 webserver needs a new certificate and the tech. guy provided me one, but after replacing the old one the server doesn't work any longer. In the browser I get a "SSL_ERROR_NO_CYPHER_OVERLAP" error ...
I'm a little reluctant to upgrade to the latest and greatest (regressions), so really would like to get the certificate to work
Does anybody know what can be wrong here or what should be a next logical step?
Can I check the provided files (.crt and .key) somehow?
I've attached a .log file which indeed indicates something is wrong with SSL ...
TIA
regards,
Ton
a nettalk 9.15 webserver needs a new certificate and the tech. guy provided me one, but after replacing the old one the server doesn't work any longer. In the browser I get a "SSL_ERROR_NO_CYPHER_OVERLAP" error ...
I'm a little reluctant to upgrade to the latest and greatest (regressions), so really would like to get the certificate to work
Does anybody know what can be wrong here or what should be a next logical step?
Can I check the provided files (.crt and .key) somehow?
I've attached a .log file which indeed indicates something is wrong with SSL ...
TIA
regards,
Ton
18
Web Server - Ask For Help / Re: JFiles : some questions
« on: December 12, 2017, 07:11:35 AM »
Hi Bruce,
>>you'd embed in Start I think.
as I use it in a handcoded context, this won't work I guess. Modifying the constructor will stay my preferred method then
with regard to the "MaxPrefixLengthInJSON" property: I still don't get why you want to remove some prefixes of a certain length only, Why do you want to keep the prefix -only- when it's longer than 4 characters, for example?
I'll try to improve the class if I have some extra spare time during the holidays ... no guarantee though :-)
>>you'd embed in Start I think.
as I use it in a handcoded context, this won't work I guess. Modifying the constructor will stay my preferred method then
with regard to the "MaxPrefixLengthInJSON" property: I still don't get why you want to remove some prefixes of a certain length only, Why do you want to keep the prefix -only- when it's longer than 4 characters, for example?
I'll try to improve the class if I have some extra spare time during the holidays ... no guarantee though :-)
19
Web Server - Ask For Help / JFiles : some questions
« on: December 12, 2017, 05:52:09 AM »
Hi Bruce,
I have some questions about jFiles:
- can I override the jFiles class somehow. Currently when I override it, the compiler starts complaining when I use methods that use "JSONClass" in the prototype, I guess I have to override all these method too?
- how can easily override the default properties of the constructor/start method globally. I currently hack the constructor to fill my needs (in jFiles.clw), but that's not the way it should work
- what is "MaxPrefixLengthInJSON" actually used for. Now it only deletes prefixes when the the prefix length is smaller than 4 characters and that gave some unexpected results when importing to a Queue with a prefix that is longer than 4 characters ...
- in the latest release there are tons of calls to .GetFieldName(A) and .AdjustFieldname that slow down considerablly when there is more than 2 records to import. Can this be resolved without hacking the jFiles.clw?
TIA,
Ton
I have some questions about jFiles:
- can I override the jFiles class somehow. Currently when I override it, the compiler starts complaining when I use methods that use "JSONClass" in the prototype, I guess I have to override all these method too?
- how can easily override the default properties of the constructor/start method globally. I currently hack the constructor to fill my needs (in jFiles.clw), but that's not the way it should work
- what is "MaxPrefixLengthInJSON" actually used for. Now it only deletes prefixes when the the prefix length is smaller than 4 characters and that gave some unexpected results when importing to a Queue with a prefix that is longer than 4 characters ...
- in the latest release there are tons of calls to .GetFieldName(A) and .AdjustFieldname that slow down considerablly when there is more than 2 records to import. Can this be resolved without hacking the jFiles.clw?
TIA,
Ton
20
Web Server - Ask For Help / Re: JFiles : having troube importing into Queues
« on: December 11, 2017, 02:19:06 PM »
Hi all,
solved : upgrading to the latest and greatest does fix this thing :-)
sorry for the inconvenience !!
regards,
Ton
solved : upgrading to the latest and greatest does fix this thing :-)
sorry for the inconvenience !!
regards,
Ton
21
Web Server - Ask For Help / JFiles : having troube importing into Queues
« on: December 11, 2017, 09:44:33 AM »
I'm probably not understanding something about JFiles:
I try to import two nodes ("P_docidQ" and "ids" both on the top level) into two queues ("P_docidQ" and "SELF.PrQ"), but the second one always is empty ... (I've attached a .json file as a .txt file)
Now If I don't load the first Q, the second will load ... I found out that the during the load of second Q it tries to map to the fields of the first Q ...
(I noticed that in jFiles.clw in the JSONClass._GetFieldName method, that the
names cstring(50),dim(100),static,thread
might be why the second Q keeps looking at the fields of the first Q ...]
I probably need to clear/free something first, but I haven't got a clue what
Any help is most welcome!
TIA
The follwing is the code I use:
I try to import two nodes ("P_docidQ" and "ids" both on the top level) into two queues ("P_docidQ" and "SELF.PrQ"), but the second one always is empty ... (I've attached a .json file as a .txt file)
Now If I don't load the first Q, the second will load ... I found out that the during the load of second Q it tries to map to the fields of the first Q ...
(I noticed that in jFiles.clw in the JSONClass._GetFieldName method, that the
names cstring(50),dim(100),static,thread
might be why the second Q keeps looking at the fields of the first Q ...]
I probably need to clear/free something first, but I haven't got a clue what
Any help is most welcome!
TIA
The follwing is the code I use:
Code: [Select]
! data
lJSON JSONClass
jsonItem &JSONClass
lJP &JSONClass
lJP_PdocidQ &JSONClass
lJP_PrQ &JSONClass
CODE
! ....
lJSON.LoadFile(lFn)
lJP &= lJSON.GetByName('doctype', 1)
IF ~lJP &= NULL
SELF.Doctype = lJP.GetValue()
END
! First Q
FREE(P_DocidQ)
CLEAR(P_DocidQ)
lJP_PdocidQ &= lJSON.GetByName('P_docidQ', 1)
IF ~lJP_PdocidQ &= NULL
lJP_PdocidQ.Load(P_DocidQ)
END
! Second Q
FREE(SELF.PrQ)
CLEAR(SELF.PrQ)
lJP_PrQ &= lJSON.GetByName('ids', 1)
IF ~lJP_PrQ &= NULL
lJP_PrQ.Load(SELF.PrQ)
END
ods('records SELF.PrQ : ' & RECORDS(SELF.PrQ) )
22
Web Server - Ask For Help / Re: Webserver run as Service but shutdown without errors
« on: December 02, 2016, 05:30:06 AM »
Hi Johan,
just some shots in the dark:
- maybe you can turn on driver tracing (trace.exe) and see wether it freezes on the some spot every time
- maybe refine a lttle by adding an OutputDebugView command here and there (does it actually "reach" the form procedure?, if so, to what point?)
don't know what back end and Clarion version you're using, but sql/odbc is a little flaky in recent versions of c10 (but then it shouldn't make any difference wether it runs as a service ...)
regards,
Ton
just some shots in the dark:
- maybe you can turn on driver tracing (trace.exe) and see wether it freezes on the some spot every time
- maybe refine a lttle by adding an OutputDebugView command here and there (does it actually "reach" the form procedure?, if so, to what point?)
don't know what back end and Clarion version you're using, but sql/odbc is a little flaky in recent versions of c10 (but then it shouldn't make any difference wether it runs as a service ...)
regards,
Ton
23
Web Server - Ask For Help / webservices : file upload and download though methods
« on: December 01, 2016, 12:59:37 PM »
Hi All,
I need to features added to my webservices:
1 a method to upload files:
client can send in files, currently one at a time (per request), I validate some key. and place this file in a folder on the server (I don't care where it as long as serving the file is possible via method two)
2 a method to download the most recent uploaded file (via method 1)
From all files updloaded (by method 1) I want the most recent one to be served to the client. So Client simply call GET wsGlobal\MostRecentFile and my application serves this (
File uploading/downloading is only allowed via these methods (client has to provide an api-key, that's the easy part ...), the uploading is not a problem either, I got that covered. But I'm not sure where to store the files (inside the web folder or not) and how to serve (not determine which file it is ...) a file via a webservice method, without introducing security risks.
- should I store these files inside the "\web" folder? Best not to I guess, because I can't protect folders in there. If someone guesses the foldername and filename they can fetch it with a browser (and without an api-key), right?
- how can I return a file (just as if it was fetched like any other file directly from the \web folder "below" the app) to a http(s) client via a service method. Is this what the "stringtheory" return parameter is used for? Should I "encode" this object first before it is return to the client?
Thanks in advance,
regards,
Ton
I need to features added to my webservices:
1 a method to upload files:
client can send in files, currently one at a time (per request), I validate some key. and place this file in a folder on the server (I don't care where it as long as serving the file is possible via method two)
2 a method to download the most recent uploaded file (via method 1)
From all files updloaded (by method 1) I want the most recent one to be served to the client. So Client simply call GET wsGlobal\MostRecentFile and my application serves this (
File uploading/downloading is only allowed via these methods (client has to provide an api-key, that's the easy part ...), the uploading is not a problem either, I got that covered. But I'm not sure where to store the files (inside the web folder or not) and how to serve (not determine which file it is ...) a file via a webservice method, without introducing security risks.
- should I store these files inside the "\web" folder? Best not to I guess, because I can't protect folders in there. If someone guesses the foldername and filename they can fetch it with a browser (and without an api-key), right?
- how can I return a file (just as if it was fetched like any other file directly from the \web folder "below" the app) to a http(s) client via a service method. Is this what the "stringtheory" return parameter is used for? Should I "encode" this object first before it is return to the client?
Thanks in advance,
regards,
Ton
24
Web Server - Ask For Help / Re: Certificates part two (hopefully last)
« on: December 01, 2016, 03:14:31 AM »
Finally SOLVED!
turned out traffic over that port wasn't getting at the server with the same ip, something with redirections and firewalls ...
But still : now that I got it working, my last two question still puzzle me (and might save a lot of time for someone in the future ...):
1 - when I on purpose specify wrong .key en .crt filenames and or paths, the server doesn't give me an error ...
How can I check what file (full path) the nettalk server is looking for?
2 - is there a way I can check wether request (from outside the domain) actually reach the nettalk server? Should I actualy see something in the webserver console (the screen where the GET and POST's are shown in the two textboxes?), or will the GETs/POSTs only be shown after unencrypting ...?
If we can somehow "see" what the server is doing (if anything at all), we might find the solution much faster ...
Just thinking out loud and thanks for thinking along!
Regards,
Ton
turned out traffic over that port wasn't getting at the server with the same ip, something with redirections and firewalls ...
But still : now that I got it working, my last two question still puzzle me (and might save a lot of time for someone in the future ...):
1 - when I on purpose specify wrong .key en .crt filenames and or paths, the server doesn't give me an error ...
How can I check what file (full path) the nettalk server is looking for?
2 - is there a way I can check wether request (from outside the domain) actually reach the nettalk server? Should I actualy see something in the webserver console (the screen where the GET and POST's are shown in the two textboxes?), or will the GETs/POSTs only be shown after unencrypting ...?
If we can somehow "see" what the server is doing (if anything at all), we might find the solution much faster ...
Just thinking out loud and thanks for thinking along!
Regards,
Ton
25
Web Server - Ask For Help / Re: Certificates part two (hopefully last)
« on: November 30, 2016, 12:49:18 PM »
Stil not working,
but I learned a lot the last couple of hours (stuff I don't want to know ..) :
- there are tools to validate, the .crt against the .key (tricky...) and the .crt agains the .csr file.
The three files that I have all match. I've also reverted the .csr file and the domain mentioned in there matches the domain I have in the ThisWebserver.SSLCertificateOptions.ServerName property
So contents of the files should be ok, so now it can only be me, not filling in the right values ...
What bothers me:
1 - when I on purpose specify wrong .key en .crt filenames and or paths, the server doesn't give me an error ...
How can I check what file (full path) the nettalk server is looking for?
2 - is there a way I can check wether request (from outside the domain) actually reach the nettalk server? Should I actualy see something in the webserver console (the screen where the GET and POST's are shown in the two textboxes?), or will the GETs/POSTs only be shown after unencrypting ...?
TIA,
Ton
but I learned a lot the last couple of hours (stuff I don't want to know ..) :
- there are tools to validate, the .crt against the .key (tricky...) and the .crt agains the .csr file.
The three files that I have all match. I've also reverted the .csr file and the domain mentioned in there matches the domain I have in the ThisWebserver.SSLCertificateOptions.ServerName property
So contents of the files should be ok, so now it can only be me, not filling in the right values ...
What bothers me:
1 - when I on purpose specify wrong .key en .crt filenames and or paths, the server doesn't give me an error ...
How can I check what file (full path) the nettalk server is looking for?
2 - is there a way I can check wether request (from outside the domain) actually reach the nettalk server? Should I actualy see something in the webserver console (the screen where the GET and POST's are shown in the two textboxes?), or will the GETs/POSTs only be shown after unencrypting ...?
TIA,
Ton
26
Web Server - Ask For Help / Re: Certificates part two (hopefully last)
« on: November 30, 2016, 07:52:30 AM »
Hi
(I've taken a terrible amount of baby steps, but can't get it to work)
I've got the "certificates" folder below the exe folder with both files (a.crt and a.key) present. Now I got the following properties set
ThisWebserver.SSLCertificateOptions.CertificateFile = 'certificates\a.crt'
ThisWebserver.SSLCertificateOptions.PrivateKeyFile = 'certificates\a.key'
ThisWebserver.SSLCertificateOptions.ServerName = 'api.a.nl'
as far as I can tell this should be ok. But I keep getting the "connection refused by the server"
Questions:
- Is there a way to get the server to tell me why it actually refuses (can't find .crt file?, can't find .key file?, certificate doesn't match domain? What's the domain according to certificate, what's the domain the server is on). I can 't find any code to add some debug stuff to ... so I'm totally in the dark here ...
- is it actually nettalk webserver refusing the connection or some other library/software?
- can it be that the certificate is wrong? Is there a way to validate the certificate or "see" what's in the .crt .key files?
- are there multiple types of certificates (I had the network guys set up the domainname and arrange me the certificate files for https) and can it be that I have the wrong type ?
thanks again!
regards,
Ton
(I've taken a terrible amount of baby steps, but can't get it to work)
I've got the "certificates" folder below the exe folder with both files (a.crt and a.key) present. Now I got the following properties set
ThisWebserver.SSLCertificateOptions.CertificateFile = 'certificates\a.crt'
ThisWebserver.SSLCertificateOptions.PrivateKeyFile = 'certificates\a.key'
ThisWebserver.SSLCertificateOptions.ServerName = 'api.a.nl'
as far as I can tell this should be ok. But I keep getting the "connection refused by the server"
Questions:
- Is there a way to get the server to tell me why it actually refuses (can't find .crt file?, can't find .key file?, certificate doesn't match domain? What's the domain according to certificate, what's the domain the server is on). I can 't find any code to add some debug stuff to ... so I'm totally in the dark here ...
- is it actually nettalk webserver refusing the connection or some other library/software?
- can it be that the certificate is wrong? Is there a way to validate the certificate or "see" what's in the .crt .key files?
- are there multiple types of certificates (I had the network guys set up the domainname and arrange me the certificate files for https) and can it be that I have the wrong type ?
thanks again!
regards,
Ton
27
Web Server - Ask For Help / Certificates part two (hopefully last)
« on: November 29, 2016, 09:36:12 AM »
Hi All,
I thought I try to get the production server working with a certicate (without ever getting test environment correct), but that's working very well either:
- when I fetch "myself" (through "netclient"), I get the following error :
The open command timed out or failed to connect: The error number was -53 which means Open Timeout or Failure error - [WinSock Error = 10061 : (WSAECONNREFUSED) Connection refused. No connection could be made because the target machine actively refused it
- the browse is much less verbose and simply says "cannot connect to ...."
- I've installed my .crt en .pk files in the "certificates" folder below the webfolder, but I think the nettalk server moves them upwards (so it is able to find these ...). Is this intended?
- whenever I place files in there that don't mach the properties I fill in in the server settings for the .crt en .pk file. I get no errrors on the serverside .... Shouldn't I get one?
- I'm running with the "s_web.SuppressErrorMsg = 0" line generated, but I can't find any errormessages serverside ...
- additional question : I can rename the .crt and .pk file to anything I want to as long as it matches the two corresponding prompts in the webserver setting, right?
What I can I do to find out where things go wrong?
TIA,
Ton
I thought I try to get the production server working with a certicate (without ever getting test environment correct), but that's working very well either:
- when I fetch "myself" (through "netclient"), I get the following error :
The open command timed out or failed to connect: The error number was -53 which means Open Timeout or Failure error - [WinSock Error = 10061 : (WSAECONNREFUSED) Connection refused. No connection could be made because the target machine actively refused it
- the browse is much less verbose and simply says "cannot connect to ...."
- I've installed my .crt en .pk files in the "certificates" folder below the webfolder, but I think the nettalk server moves them upwards (so it is able to find these ...). Is this intended?
- whenever I place files in there that don't mach the properties I fill in in the server settings for the .crt en .pk file. I get no errrors on the serverside .... Shouldn't I get one?
- I'm running with the "s_web.SuppressErrorMsg = 0" line generated, but I can't find any errormessages serverside ...
- additional question : I can rename the .crt and .pk file to anything I want to as long as it matches the two corresponding prompts in the webserver setting, right?
What I can I do to find out where things go wrong?
TIA,
Ton
28
Web Server - Ask For Help / UTF encoding in xFiles?
« on: November 29, 2016, 07:27:12 AM »
Hi all,
for my webservices I've written a class to handle JSON and I'm using xFiles to handle the XML output. I noticed that the xFiles produces "other" utf-8 than the json class.
for json I'm using StringTheory.ToUnicode method and I see that xFiles uses code in the ._WriteCurrentField procedure somewhere at the following comment line (around line 3010):
! -- Do UTF-8 Encoding ---
I think the StringTheory .ToUnicode method produces better UTF-8 output, as far as I can tell xFiles doesn't take into account what codepage it's originating from, but I'm not entirely sure and by all means not an export with regard to encoding ...
Either way : one must be wrong ...
regards,
Ton
for my webservices I've written a class to handle JSON and I'm using xFiles to handle the XML output. I noticed that the xFiles produces "other" utf-8 than the json class.
for json I'm using StringTheory.ToUnicode method and I see that xFiles uses code in the ._WriteCurrentField procedure somewhere at the following comment line (around line 3010):
! -- Do UTF-8 Encoding ---
I think the StringTheory .ToUnicode method produces better UTF-8 output, as far as I can tell xFiles doesn't take into account what codepage it's originating from, but I'm not entirely sure and by all means not an export with regard to encoding ...
Either way : one must be wrong ...
regards,
Ton
29
Web Server - Ask For Help / Re: automatic webserver restart
« on: November 21, 2016, 11:17:31 AM »
Hi (Kevin)
I've found finally the cause of the "crashing": most likely c10 has problems with threading and the (sql/anywhere) file drivers.
Some questions with regard to the ConnectionChecker:
- is it supposed to have a win32 UI or a web interface? I see a window defined in the "main" procedure, but also a webserver extension and I can access it through the browser, but there is no way I can "save" the properties (for example : the e-mail address). Looking from the code, it tries to save when the window (server) closes, but there is no way for me to nicely close the server (I can't find the console)
- does it work on services too? I guess the used Shellexecute, only works for normal exe's right?
I also tried GPF's reporters feature to "auto restart after GFP" which is a really nice feature i didn't know of (Bruce, next time you add these niceties let me know :-), but in my case the exe not actually gpf's. I seem to have 3 situations:
- Sometimes it's unresponsive for a while and the exe first returns the crashdump in the errorcode/fileerror() functions, but afterwards dies and becomes totally unresponsive, but there is no gpf signalled (so no restart) and I manually have to kill the process
- Sometimes it does seem to "gpf" but several "messageboxes" with crashdumps open (but I've configured GPFReporter to close quietly and restart automatic) and I have to click on a "close" button first
- Sometimes a little windows messagebox pops up, which only can brings me to Visual Studio when I choose to debug ...
Haven't tried "restart on crash" though ... will investigate tomorrow ...
regards,
Ton
I've found finally the cause of the "crashing": most likely c10 has problems with threading and the (sql/anywhere) file drivers.
Some questions with regard to the ConnectionChecker:
- is it supposed to have a win32 UI or a web interface? I see a window defined in the "main" procedure, but also a webserver extension and I can access it through the browser, but there is no way I can "save" the properties (for example : the e-mail address). Looking from the code, it tries to save when the window (server) closes, but there is no way for me to nicely close the server (I can't find the console)
- does it work on services too? I guess the used Shellexecute, only works for normal exe's right?
I also tried GPF's reporters feature to "auto restart after GFP" which is a really nice feature i didn't know of (Bruce, next time you add these niceties let me know :-), but in my case the exe not actually gpf's. I seem to have 3 situations:
- Sometimes it's unresponsive for a while and the exe first returns the crashdump in the errorcode/fileerror() functions, but afterwards dies and becomes totally unresponsive, but there is no gpf signalled (so no restart) and I manually have to kill the process
- Sometimes it does seem to "gpf" but several "messageboxes" with crashdumps open (but I've configured GPFReporter to close quietly and restart automatic) and I have to click on a "close" button first
- Sometimes a little windows messagebox pops up, which only can brings me to Visual Studio when I choose to debug ...
Haven't tried "restart on crash" though ... will investigate tomorrow ...
regards,
Ton
30
Web Server - Ask For Help / Re: Getting certificates working (in test environment)
« on: November 16, 2016, 01:57:50 PM »
Hi Bruce,
by "turning on errortrapping", do you mean : "suppress error messages" in the NetWebServer extension properties?
(although my focus currently is on getting the webservice running without crashes :-), though Nettalk is not the cause of this! )
regards,
Ton
by "turning on errortrapping", do you mean : "suppress error messages" in the NetWebServer extension properties?
(although my focus currently is on getting the webservice running without crashes :-), though Nettalk is not the cause of this! )
regards,
Ton