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.
1
Web Server - Ask For Help / Re: Webclient with certificat
« on: May 09, 2025, 04:48:09 PM »
ACK!
Sorry, Niels. I thought I had edited those question-marks-that-should-be-dashes.
I pasted text from a PDF I did for a ClarionLive webinar some years back and the rogue question marks blossomed.
Anyway, I hope you got it working.
Cheers,
Jane
Sorry, Niels. I thought I had edited those question-marks-that-should-be-dashes.
I pasted text from a PDF I did for a ClarionLive webinar some years back and the rogue question marks blossomed.
Anyway, I hope you got it working.
Cheers,
Jane
2
Web Server - Ask For Help / Re: Webclient with certificat
« on: May 08, 2025, 08:44:44 PM »
Net demo web client is great for testing.
I don't think you'll be able to make it work with the PFX, though.
A PFX contains both the certificate (with its public key) and your secret private key. And it's password-protected.
To split apart a PFX for use with NetTalk, use openssl (it's installed automatically with any of your netweb server projects).
When you use openssl, the first private key file you'll get will be password-protected.
You can also run one more openssl command to produce an unencrypted private key file.
I don't think you'll be able to make it work with the PFX, though.
A PFX contains both the certificate (with its public key) and your secret private key. And it's password-protected.
To split apart a PFX for use with NetTalk, use openssl (it's installed automatically with any of your netweb server projects).
When you use openssl, the first private key file you'll get will be password-protected.
You can also run one more openssl command to produce an unencrypted private key file.
Code: [Select]
Openssl pkcs12 -in MyDomain.pfx -nocerts -out MyDomainEncrypted.key
Openssl rsa -in MyDomainEncrypted.key -out MyUnencryptedDomain.key
Openssl pkcs12 -in MyDomain.pfx -clcerts -nokeys -out MyDomain.crt
3
Web Server - Ask For Help / Re: How to adjust font size NT Variable
« on: May 04, 2025, 03:52:45 PM »
Hi, Ron,
Variables were the heart of themes and the "themer" app that Bruce introduced in (NT12??).
The idea being that you can set something (a color, font size, button radius, etc.) in one place and have the entire web app use those settings.
Variables were the heart of themes and the "themer" app that Bruce introduced in (NT12??).
The idea being that you can set something (a color, font size, button radius, etc.) in one place and have the entire web app use those settings.
4
Web Server - Ask For Help / Re: NetWebServiceMethod as REST - HOW?
« on: May 04, 2025, 03:51:07 PM »
Are you making an API client or API server?
Can you post the exact spec of what you're trying to do?
Can you post the exact spec of what you're trying to do?
5
Web Server - Ask For Help / Re: NetWebServiceMethod as REST - HOW?
« on: May 03, 2025, 12:03:39 PM »
You can do a REST API without relying on a single REST ID to call it, Niels.
There are plenty of REST APIs I call with multiple parameters, such as
api.whatever.com/v2/appointments/booked?showpatientdetail=false&patientid=1&showcancelled=true&providerid=162
There are plenty of REST APIs I call with multiple parameters, such as
api.whatever.com/v2/appointments/booked?showpatientdetail=false&patientid=1&showcancelled=true&providerid=162
6
Web Server - Ask For Help / Re: How to adjust font size NT Variable
« on: May 03, 2025, 11:57:50 AM »
1. Generally easier to make and verify changes when not in "performance" mode, i.e. when each css and js file is loaded singly into the browser.
2. When you make a change, either do Ctrl+F5 in the browser or increment the Resource version on the Performance tab of the ThisWebServer extension. (I normally set that to my own LOC:ResourceVersion variable, and read that variable from an INI file when the server starts. That way, I can bump the version without recompiling). That appends a different whatever.css?c=blahblah which forces the browser to refresh its cache.
3. Note that the resourceVersion only works when the "Auto-check cached files" on the webServer template Performance tab is set to TRUE. By default, Development mode sets that to FALSE, so I always remember to change it back to TRUE.
4. Leaving aside the above fluff, where are you making the change? (You mention seeing the size setting in two files.)
I normally do that in my own custom CSS file (which I also do not include in the gzip stuff - untick the "Is included in THEME.CSS checkbox.)
In my custom CSS file will be a :root section to either override some of Bruce's defaults and/or to add any of my own variables that I'll use in my custom CSS. Something like:
My own trial-and-error. HTH.
Jane
2. When you make a change, either do Ctrl+F5 in the browser or increment the Resource version on the Performance tab of the ThisWebServer extension. (I normally set that to my own LOC:ResourceVersion variable, and read that variable from an INI file when the server starts. That way, I can bump the version without recompiling). That appends a different whatever.css?c=blahblah which forces the browser to refresh its cache.
3. Note that the resourceVersion only works when the "Auto-check cached files" on the webServer template Performance tab is set to TRUE. By default, Development mode sets that to FALSE, so I always remember to change it back to TRUE.
4. Leaving aside the above fluff, where are you making the change? (You mention seeing the size setting in two files.)
I normally do that in my own custom CSS file (which I also do not include in the gzip stuff - untick the "Is included in THEME.CSS checkbox.)
In my custom CSS file will be a :root section to either override some of Bruce's defaults and/or to add any of my own variables that I'll use in my custom CSS. Something like:
Code: [Select]
:root{
--softFontColor:#707070;
--leftBarColor:#FF5A87;
--leftBar:var(--leftBarColor) 6px solid ;
--darkTitleFont:"DarkTitle"; /* "DarkTitle" */
--normalTitleFont:"RegularTitle";
--font-family:"Open Sans","Segoe UI",Tahoma, Verdana, Arial, Helvetica, sans-serif;
--label-floating-top:calc(var(--entry-height)*.24);
--font-size:10pt;
}
My own trial-and-error. HTH.
Jane
7
The Rest - Share Knowledge / Re: Posting a file to a web site
« on: April 28, 2025, 09:24:17 AM »
Verifying the server name is obviously a security concern.
But if you're certain of the server, you can turn off the name checking.
Use the DontVerifyRemoteCertificateCommonName property:
https://www.capesoft.com/docs/NetTalk14/NetTalkWebClient.Htm#TLS
But if you're certain of the server, you can turn off the name checking.
Use the DontVerifyRemoteCertificateCommonName property:
https://www.capesoft.com/docs/NetTalk14/NetTalkWebClient.Htm#TLS
8
Web Server - Ask For Help / Re: Refresh NWB Header
« on: April 22, 2025, 10:10:23 AM »
Check the web34 "Calculator" example app.
The Performance procedure has stats updated with websockets. (It's not on the menu so you need to enter the URL manually in your web browser.)
On the fields in the template, notice the "Live via WebSocket" checkbox ticked.
Check out this: https://www.capesoft.com/docs/NetTalk14/NetTalkWebBasic.htm#WebSockets
And search for "socket" on this page: https://www.capesoft.com/docs/NetTalk14/NetTalkWebFunctionality.htm#NetWebForm
If you have Bruce's book "Developing Web Applications with NetTalk - Fourth Edition" you can read the chapter on Web Sockets.
The Performance procedure has stats updated with websockets. (It's not on the menu so you need to enter the URL manually in your web browser.)
On the fields in the template, notice the "Live via WebSocket" checkbox ticked.
Check out this: https://www.capesoft.com/docs/NetTalk14/NetTalkWebBasic.htm#WebSockets
And search for "socket" on this page: https://www.capesoft.com/docs/NetTalk14/NetTalkWebFunctionality.htm#NetWebForm
If you have Bruce's book "Developing Web Applications with NetTalk - Fourth Edition" you can read the chapter on Web Sockets.
9
Web Server - Ask For Help / Re: Changing theme has no effect (RESOLVED)
« on: April 19, 2025, 11:01:13 AM »
OK.
But with data tables, the threaded connection strings you use need to be set on each thread. Hence the suggestion to set them in ProcessLink each time a thread runs.
My point was that once you set a theme, you do not need to set it again each thread. It's sticky to the session, not to a thread.
That said, the one time that you set the theme can be with the rest of the stuff you're doing in ProcessLink - no need to have separate code to do it in PageHeaderTag.
Set the theme once in ProcessLink, and set the threaded connection strings there each time.
But with data tables, the threaded connection strings you use need to be set on each thread. Hence the suggestion to set them in ProcessLink each time a thread runs.
My point was that once you set a theme, you do not need to set it again each thread. It's sticky to the session, not to a thread.
That said, the one time that you set the theme can be with the rest of the stuff you're doing in ProcessLink - no need to have separate code to do it in PageHeaderTag.
Set the theme once in ProcessLink, and set the threaded connection strings there each time.
10
Web Server - Ask For Help / Re: Changing theme has no effect
« on: April 18, 2025, 08:52:47 AM »
Why don't you post the exact code you're trying to use?
What you just posted isn't consistent - if the variable is GloTheme then it should be p_web.GSV('GloTheme') rather than what you wrote.
And what does ParseRequestHeader have to do with getting a theme name from an INI file?
And you should only have to set the user's theme once for a session. Are you really reading and setting that each time in ProcessLink?
On second thought, maybe worth asking for help on Bruce's Thursday webinar.
What you just posted isn't consistent - if the variable is GloTheme then it should be p_web.GSV('GloTheme') rather than what you wrote.
And what does ParseRequestHeader have to do with getting a theme name from an INI file?
And you should only have to set the user's theme once for a session. Are you really reading and setting that each time in ProcessLink?
On second thought, maybe worth asking for help on Bruce's Thursday webinar.
11
Web Server - Ask For Help / Re: Changing theme has no effect
« on: April 17, 2025, 10:53:23 AM »
Spelling counts.
Using exactly what you see in debugview, can you use that exact text value and change the theme from the URL?
i.e.
http://127.0.0.1:88/?_theme_=palmtree
Using exactly what you see in debugview, can you use that exact text value and change the theme from the URL?
i.e.
http://127.0.0.1:88/?_theme_=palmtree
12
Web Server - Ask For Help / Re: Pass parameter in servercall?
« on: April 16, 2025, 03:22:59 PM »
Works for me, Poul.
How are you storing the parameter? If you're putting it into a sessionValue, it should be sticky and persist through the login and beyond.
You'll need to set your filename variables EACH TIME your code runs through p_web.ProcessLink in the webhandler (because each pass through there is happening on a new thread), so set the session values the first time (when they're sent as parameters) then use those session values to set the filename variables EACH TIME.
How are you storing the parameter? If you're putting it into a sessionValue, it should be sticky and persist through the login and beyond.
You'll need to set your filename variables EACH TIME your code runs through p_web.ProcessLink in the webhandler (because each pass through there is happening on a new thread), so set the session values the first time (when they're sent as parameters) then use those session values to set the filename variables EACH TIME.
13
Web Server - Ask For Help / Re: web26 example File Upload
« on: March 17, 2025, 05:35:55 PM »
WOMM isn't much help, Richard.
But FWIW, I'm working on an in-house web app. The part that's finished has the user select an Excel file, upload it to the uploads folder, from which it's parsed and uploaded to a SQL server and then manipulated there into several tables.
I didn't do anything fancy. It just works. (On localhost on my dev machine, which is not TLS).
Don't know if it's any use, but attached is a TXA for the Excel upload proc (but not the fileProcess proc that does the parsing and SQL stuff after it's uploaded to the web\uploads folder).
Maybe useful for some clue? (Although there's a good bit of code in it related to my using the progress control in conjunction with my subsequent file-processing steps.)
jf
But FWIW, I'm working on an in-house web app. The part that's finished has the user select an Excel file, upload it to the uploads folder, from which it's parsed and uploaded to a SQL server and then manipulated there into several tables.
I didn't do anything fancy. It just works. (On localhost on my dev machine, which is not TLS).
Don't know if it's any use, but attached is a TXA for the Excel upload proc (but not the fileProcess proc that does the parsing and SQL stuff after it's uploaded to the web\uploads folder).
Maybe useful for some clue? (Although there's a good bit of code in it related to my using the progress control in conjunction with my subsequent file-processing steps.)
jf
14
Web Server - Ask For Help / Re: Global template: Secret 1 / 2
« on: March 07, 2025, 12:14:49 PM »
Search for set:secret in the webserver procedure.
It's made up from those fields in the template and then set:secret is used for things like storing the encryption password for TLS certificates.
It's made up from those fields in the template and then set:secret is used for things like storing the encryption password for TLS certificates.
15
Web Server - Ask For Help / Re: Error in Site Javascript Flash at the top of the page
« on: March 04, 2025, 10:45:46 AM »
No Javascript Check