NetTalk Central

Recent Posts

Pages: 1 ... 8 9 [10]
91
Hi Johan,
Again, I ask the same question that Jane asked.  What are you trying to do?
I am doing some file upload and manipulation and then save.  The code runs several times but I only wanted it to run ONCE.   So, I looked at the stage number for the stuff I wanted to do and found that it would run only ONCE if I limited it to a certain stage - there are equates for the stage numbers in a form. So, looking at the stage number when your code fires might help you limit it to only a certain stage.
Ron
92
What are you trying to do, Johan?

A session value is going to be tied to a particular session ID, so it will only be "global" for that one session.

I use a number of regular global variables in web apps that are set at startup and then read-only thereafter.

If you don't want to use global variables, you can set host values in the web server procedure when it starts (maybe in ThisWindow.init).  (Since pweb does not exist in the web server, you would use s_web.SetHostValue).



93
Hi All,

by accident I discovered that sometimes in the Webserver procedure, the following code (generated in legacy in: "before closing window"), has the following order

      s_web.iSession.Save()
    ThisWebserver.Kill()                              ! Generated by NetTalk Extension

but sometimes these lines are generated like this:

    ThisWebserver.Kill()                              ! Generated by NetTalk Extension
      s_web.iSession.Save()

I really don't know wether this is a problem or not (I didn't notice anything weird ...), but I think that for legacy this is cause by the following template code snippets that use the same priority() (see "nettalk.tpl"):

#AT(%BeforeWindowClosing),Priority(4500)
  #If((%NoNetTalk=0) and (%NoThisObj=0) and (%Family='cw20'))
%ThisObjectName.Kill()                      ! Generated by NetTalk Extension
  #EndIf
#ENDAT

#AT(%BeforeWindowClosing),Priority(4500)
  #If(%NoNetTalk=0 and %NoThisObj=0 and (%ABCBaseClass='NetWebServer' or sub(%ABCBaseClass,1,13)='NetWebServer_') and %Family='cw20')
    #IF(%FirstWebServer=%ActiveTemplateInstance)
#Insert(%ServerStateKillStuff)
    #endIf
  #EndIf
#ENDAT

Regards,
Ton
94
Hi,

I need to set some p_web.SSV('xx',YY) variables when the Web Server starts.
It must/need run this once and not on any subsequent requests.

The p_web.GSV('xx') will be used in various browses and forms.
It will be treated as some global variables.

I looked and put a lot or Trace statements in various embeds but all of them runs every time some fields, buttons, option or variable is clicked.

Any help would be appreciated.

Regards

Johan de Klerk
95
Web Server - Ask For Help / Re: netwebclient : IPv6 addresses and port
« Last post by AtoB on August 19, 2026, 11:46:45 PM »
Hi Bruce,

hmm ...

I tried the brackets around het ::1 part, but then the "server" becomes "[" (which is expected with current Stringtheory code as far as I can tell as there is no code that accounts for the brackets per se and it looks for the ":" from left to right).

Both "::1:port" and "[::1]:port" don't seem to work.

I've attached a screenshot of some debugview (in yellow the original request and the server part netwebclient resolves to)

Am I missing something still?

Regards,
Ton
96
Web Server - Ask For Help / Re: NT CLient for updating DDNS for DNSSIMPLE
« Last post by Jane on August 16, 2026, 08:09:11 PM »
Ron,
After you get it working in CURL, you can also do some testing with the web client that's in the NetDemo app in the NetTalk examples.
It's useful because you can see what's sent and received and figure out how to make things work.
97
Web Server - Ask For Help / Re: NT CLient for updating DDNS for DNSSIMPLE
« Last post by rjolda on August 16, 2026, 03:11:24 PM »
HI Bruce,
This is new to me as I rely on Net Talk products to do the work for me!  I did not know that I could run curl from command line.  That is a great way to test the login authorization.  Will give it a go. Thanks for the info.
Ron
98
Web Server - Ask For Help / Re: NT CLient for updating DDNS for DNSSIMPLE
« Last post by Bruce on August 16, 2026, 03:25:21 AM »
If you run the CURL command in a command window (aka DOS prompt), does it work?
99
Web Server - Ask For Help / Re: NT CLient for updating DDNS for DNSSIMPLE
« Last post by rjolda on August 14, 2026, 07:58:20 AM »
HI Jane,
I did re-look at DNS stuff. Indeed, it is the FULL API for DNSSIMPLE.  However, DNS Simple has  their own lightweight Dynamic DNS (DDNS) implementation, available at ddns.horse.
They provide a Curl example:  Here is an example using curl: curl -i "https://ddns.horse/nic/update?hostname=example.com&myip=1.2.3.4&myipv6=2001:db8::8a2e:370:7334" -u "accountid:token"
On capesoft I got the conversion
  net.Start()
  net.Authorization = net.CreateAuthorizationString ('accountid','token', Net:WebBasicAuthentication,true)
  net.Get('https://ddns.horse/nic/update?hostname=example.com&myip=1.2.3.4&myipv6=2001:db8::8a2e:370:7334')
I am using my Account ID for the authorization string "accountid"  and my OAuthToken for the 'token' part of it.

However, I am getting authorization failure. 
So, I can't get past the authorization with my credentials.  I did double check my credentials and they are correct. 
That is where I am at,
Ron
100
Web Server - Ask For Help / Re: NT CLient for updating DDNS for DNSSIMPLE
« Last post by Jane on August 13, 2026, 05:13:16 PM »
No, I haven't.
Have you tried the examples in the nettalk\NetDns folder?
Pages: 1 ... 8 9 [10]