NetTalk Central

Show Posts

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.


Messages - Jane

Pages: [1] 2 3 ... 6
1
Web Server - Ask For Help / Re: header-back.png??
« on: September 25, 2019, 04:21:41 PM »
Here's the one Bruce is using on the CIDC mobile app. 

2
Web Server - Ask For Help / Re: programatically restart the service
« on: September 25, 2019, 06:39:17 AM »
Richard,

Be aware that your user will need to be running whatever has that button "asAdministrator" in order to start the service.

If you're using SetupBuilder for your upgrade installer, that includes functionality to start and stop services.

If you're coding your own (whether launching a batch file to do "NET START MyService" or using OddJob to do the same thing), your app will need to have an asAdministrator manifest (and preferably be code-signed so as not to flash an "unknown publisher" warning).

But if you've managed to code the stopping of the service, it sounds as if you've got that stuff sorted out.

Cheers,

Jane

3
Web Server - Ask For Help / Re: programatically restart the service
« on: September 24, 2019, 08:38:46 AM »
I'm not sure exactly what you're wanting to do.

From an admin command prompt, you can type
net stop MyServicename
net start MyServicename

You can find MyServiceName from services.msc.  (You have to open the properties page to find the service name.  For example, the service name for "print spooler" is actually Spooler.  You need to use that for the command, not the display name. )

What I typically do with services is to have some kind of "watchdog" app (also running as a service).

If for some reason it needs to restart a service, it uses oddjob to send the commands
net stop MyServiceName
job.KillProcess(AppName,true,true) ! in case it's hung and net stop doesn't work, get brutal
ds_sleep(2000) ! winevent
job.KillProcess(AppName,true,true) ! again.. because I can
ds_sleep(2000)
net start MyServiceName



4
Web Server - Ask For Help / Re: Compile error NT11.22
« on: September 20, 2019, 10:50:15 AM »
Pasting from the third party newsgroup:
Quote
Hi Poul,

I'm on the road, so not easy to track - but you can just comment out that
line in nethttp for now if you like.
You won't need it yet.

cheers
Bruce



"Poul Jensen"  wrote in message
news:A921.1568822325.389@discuss.softvelocity.com...

Hi,

Just upgraded to NT 11.22 and are getting this error in a simple one
procedure email send app:
Unresolved External NetSignToken in NetHttp.obj

Other app's with NT compile ok.

Have generated all but to no avail.

Any clues most welcome.

Cheers
/Poul

Additional post from Bruce:
Quote
nethttp.clw
Comment out:
Sig.SetValue(NetSignToken(jwtInfo.GetValue(),jwtData.GetValue(),PrivateKey.GetValue()))

5
Web Server - Ask For Help / Re: cURL - FileUpload to a NT-(SOAP)Server
« on: September 06, 2019, 08:25:16 PM »
the best part is that if you use a NetWebServiceMethod it'll come with a CURL example already in the docs for you. !

Hmmm, where is that?

I did a grep and all I found was the Multisite- and PHP-example. One fined was calcUrl, the other was php_curl.dll.


In the generated documentation for the service ??


6
Web Server - Ask For Help / Re: customt.css to modify a theme
« on: July 24, 2019, 11:52:43 AM »
Alberto,

You have two options for custom CSS files, as shown in your screen shot.

If you're modifying a theme, you would use the top box ("Theme Files"), specify one or more CSS files.  Then you could put a different CSS file (with the same filename) in each theme folder and tweak each theme individually.

If you just want something that applies to the website regardless of what theme you're using, then use the custom.css file in the bottom box in your screen shot.  That will live in the web/styles folder and will apply to all themes.

Jane

7
Web Server - Ask For Help / Re: customt.css to modify a theme
« on: July 24, 2019, 08:27:03 AM »
Is your web server set to debug on the Performance tab, Alberto?

If not, have you run copyall and gzipall ?

If you look at the page source for your web page, do you see the customt.CSS being linked in? 

Just some thoughts...

Jane


8
Do you know how high the Threads count is  on the Performance tab when it hangs?

Not helpful to your finding the cause, but as an aside...

I have several NT webserver/API service apps running as services.  They also contain netclient procedures running on separate threads that connect to an outside system.

Occasionally, one of my services will hang. 

In two of those services I've included a timer window (running on its own thread) that writes an "I'm alive" heartbeat timestamp to an INI file every minute or so.

I have another service running on that machine that checks the INI files from the services it's monitoring.
If there's no heartbeat for a set amount of time (4 minutes or whatever), then it uses OddJob to kill the stalled process then stop and restart the service. 

This has been solid for me for the past 8 or 9 months.  The watchdog service writes a text log to disk and I can see what it's done.  My NetTalk services also write a text log to disk showing startup timestamps. 
Between the two services it monitors, the watchdog log shows that it has done 7 restarts since the beginning of March. 

May not be the best solution, but has saved me some headaches.

Jane

9
Web Server - Ask For Help / Re: Let's Encrypt - Renewal - port 80
« on: July 18, 2019, 06:42:19 PM »
Casey,

According to the docs, it needs to be port 80:
https://www.capesoft.com/docs/NetTalk11/NetTalkWebSecure.htm#RuntimeSettings

As for closing insecure access to other traffic... take a look at (roughly) lines 86 through 114 of netweb.clw.  He's making an exception for LetsEncrypt and redirecting everything else.  Magic!

Jane

10
You can put in a snippet of code in xml.SaveCurrentFieldToXML or json.FormatValue to format the returned XML or JSON field the way you want.

https://www.capesoft.com/docs/NetTalk11/NetTalkWebServices.htm#FormattingFields

Jane

11
Web Server - Ask For Help / Re: How to format fields on a NT Web Form
« on: July 07, 2019, 03:19:36 PM »
Johan,

If I might suggest... it would be well worth your while (i.e., virtually essential) to invest a few hours learning the basics of CSS if you are planning on doing ANY web development.

CSS stands for Cascading Style Sheets.

These are text files that determine how your web stuff will look.

First the "style" part of the name.

Various elements on your web page (header, text, background, any entry field, button, etc.) can have hidden tags attached to them.

When the browser is creating the web page on the user's computer, it looks at those tags and then looks into any style sheet text file(s) linked in your page header to see whether there is information matching the tag(s) for each element as it renders it.

So for example, your header may have a particular tag named johan1.  The style sheet has information saying that johan1 means to use a bold font colored red.  So your header will be bold and red.

As for the cascading part... 

Your web page may include multiple style sheets. 
There may be conflicting information in those sheets as to the details for particular tags.

For example, the basic NetTalk style sheet may say that the johan1 tag is red and bold.

But if you add an ADDITIONAL style sheet which is loaded AFTER the first one (i.e., further down the header) and that style sheet says that johan1 should be blue, then the header will be blue and bold. 
It still gets the bold from the original NetTalk style sheet.
But the additional style sheet that you added "wins" for the color attribute (blue instead of red) and that's how the element will be rendered.

The "cascade" part of the name refers to how these competing bits of information are evaluated:  https://developer.mozilla.org/en-US/docs/Web/CSS/Cascade

In a NetTalk web server, virtually anything on a form or browse can have custom CSS applied to it.

There is a trick specific to NetTalk.
If you want the style you're putting on a particular element to be the ONLY style applied, then you put it in directly in the template, like 'johan1'
If you want the style you're putting in to be IN ADDITION to whatever NetTalk will be applying to the element, then you need to leave a space in front of your tag when entering it in the template, like ' johan1'
(If you're just overriding an existing NetTalk style element, you don't need to add anything in the template - just add the style to your custom CSS style sheet.)

For what Don is suggesting, I'd add a custom style sheet with a few width tags.  Then experiment to see what makes your date field look the way you'd like.

A style might look like

.my8em{width:8em;}

And then on the NetTalk template's CSS tab for your date field, in the Entry Class you could put ' my8em'

Again, if you're planning on doing any web apps, you'll save yourself a lot of grief if you take the time to learn the basics of this.

IMHO...

Cheers,

Jane

12
Hey, Sean, I haven't watched them but the show notes for webinars 128 and 129 appear to have some discussion of that method:  https://www.capesoft.com/accessories/NetTalkUserGroup.htm

Cheers,

Jane

13
From a Clarion mindset, Jorge, I would agree with you.  An update "should" only be updating the changed fields.

But from the standpoint of the web, it makes sense.  And the more so in a world of disconnected/synchronized apps... particularly RESTful ones.

The section on wikipedia describing REST includes:
Quote
"
Statelessness
See also: Stateless protocol
The client-server communication is constrained by no client context being stored on the server between requests. Each request from any client contains all the information necessary to service the request, and the session state is held in the client.

"

Even in the world of Clarion/TPS, we'll do a "set blah = blah; access:mytable.tryupdate()"
Which writes the entire record. 
We as a client are not consciously taking responsibility for writing all the unchanged fields of the table but they are all being written from the buffer that we as a client have fetched and "owned" up until the write back to the database. 

Cheers,

Jane

14
This brings back some vague memories of having chased something similar once.

As I recall, the behavior you describe is because of the way the QueueToFile:MyFileName routine works.

You'll observe that that assigns values to table fields for all fields NOT excluded on the template.

FOUND IT!
Pasting below stuff from the third party newsgroup:







15
Since this is all Clarion string concatenation code, have you tried

blahblah & format(p_web.GSV('Bed2:InspectionDate'),@D6) & blahblah

?

Pages: [1] 2 3 ... 6