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: NET ERROR: Attempt to Redirect from HTTP to HTTPS - correct the URL [http://sesi
« on: June 30, 2025, 02:55:59 PM »
I don't know, Mike.
I suppose you could either
1. specify https://
2. set OptionDontRedirectHTTPtoHTTPS to FALSE
But you do realize that Obi Wan is nagging you - and deliberately put that error onto line 1780 in NetWww.clw
There's code in the few lines preceding that where he decides how to deal with something that doesn't have http:// or https://
I suppose you could either
1. specify https://
2. set OptionDontRedirectHTTPtoHTTPS to FALSE
But you do realize that Obi Wan is nagging you - and deliberately put that error onto line 1780 in NetWww.clw

There's code in the few lines preceding that where he decides how to deal with something that doesn't have http:// or https://
2
Web Server - Ask For Help / Re: Gettinng Session Theme - get the default theme
« on: June 29, 2025, 11:10:24 AM »
The Themer example has code in the PageHeader xml to display the *current* theme using <!-- Net:s:_theme_ -->
But to get the default, you could try using p_web.WebServer._SitesQueue.Defaults.DefaultTheme
But to get the default, you could try using p_web.WebServer._SitesQueue.Defaults.DefaultTheme
4
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
5
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
6
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.
7
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?
8
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
9
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
10
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
11
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.
12
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.
13
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.
14
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
15
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.