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.


Topics - Wolfgang Orth

Pages: 1 2 [3] 4 5 6
31
The Rest - Ask For Help / Using LDAP for Log-In - How to prepare my data?
« on: December 10, 2017, 12:15:52 PM »
Hello Bruce and all others,

during the presentation of Nettalk on ClarionLive I got caught by a remark, that LDAP (Lightweight Directory Access Protocol) is supported and can be used can be used for automated Log-In to a program.

Because I am not really sure about what LDAP is, I thought I'd better ask, as I expect to need some changes in my data for this.

Right now I offer two options to start and run my program:

1) no log-in needed (the program takes the IP-Address and MAV to identify the machine for filtering the data

2) Log-In with a username and password. These UN and PW are maintained by the Admin in a separate Admin-program and stored in a table, against that the client will check the credentials.

For this first version of our program I am on Nettalk 9.30, but will migrate to Nettalk 10 during the next months, when I write the first update for it.

My question now is: What do I have to prepare in my recent data-structure before rolling the program out into the wild, so that I can start implementing LDAP next year? I want to avoid any strutural change of existing tables. Adding a new table, if necessary, seems okay to me, though, as I would not expect trouble from that.

I looked at
https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol
https://wiki.archlinux.org/index.php/LDAP_authentication
but I didn't got any clue from it.

Thanks in advance
Wolfgang


32
Web Server - Ask For Help / Script-Error in IE 11
« on: October 19, 2017, 06:56:09 AM »
Hello Bruce,

in my program I use the FileExplorer to display an HTML-page. Each time this windows gets opened, I get a message "Script-Error", pointing to

../scripts/all.js?c=1

Line 299

Character 125

Error: "Bezeichner, Zeichenfolge oder Zahl erwartet" => Zeichenfoge is a string, Zahl is a number, no idea what Bezeichner might be. Perhaps a variable?

In the Internet Explorer 11 I have these settings for script-errors turned off. Nonetheless my program always shows that message. I went through all pages Google has found for me, which promised a solution. All said the same, none worked!

I looked int this all.js and found this:

Code: [Select]
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};
What makes me wonder is that there is no closing bracket for eval( before the ; semicolon. I tried to set one there, but it did not solve it. However I am not sure, if this is a matter of teh cache, or the all.js.gz still being not altered, because this is way over my head.

I am sure that this display of an HTML-document worked okay in the past. But I do not call this procedure everyday, so I can't tell, since when it has change. If it did. But for now I claim, it once worked okay.

Maybe that eval( thingie is the culprit?

tia
Wolfgang

PS: I am on Nettalk 9.30

33
Web Server - Ask For Help / Generated xml.xmldata looks so strange
« on: September 21, 2017, 06:54:30 AM »
Hello Bruce and all others,

the generated xml.xmldata of my SOAP-Client looks so strange all of a sudden.

Attached you see two screenshots: ideal.PNG, real.PNG and real_2_with_Envelope.png.

One thing in that real.png is, that the SOPA-Envelope is missing. But I guess, that a) does not matter and b) is a question of setting a property properly. xml.SOAPenvelope = 1 did the trick.

But what makes me writting this post ist the strange formatting. Until yesterday (I believe) it looked indented correctly, but today I noticed that everything is on the far right now. Apparently thats the dernier crie nowadays, but its not, what I really wanted.

So, with the envelope it is indented correctly again, but now the closing branch is doubled.

What might have caused this, can I fix this and do I have to?

However, my own server does not complain yet. Would others do?

NB: when I removed that property SOAPEnvelope again and recompiled, the indenting of the request was okay again. For now I will go without Envelope.


Its always the little things that cause the headaches!

TIA
Wolfgang



34
Hello Bruce and all others,

my Clarion program, a webclient, mimicking a webbrowser with a FileExplorer HTML-View-control, displays a Script-Error (see attached).

However, this does not happen on any on my Windows 10 machines, but on one Windows 7-machine. Once that dialogue is answered, the user can continue.

Another problem on another Windows 7-machine is, that this dialogue seems to not appear, but the HTML-page in this webbrowser does not scroll, neither when I use the mousewheel nor by clicking the scrollbar or using the up/down/arrow-keys.

So, what is going on here? Are both problems related? Can I fix them in my program or is this an individual problem of the machines? If this will happen at any user in the wild, I have no possibility to access.

And I am sure, even if this a Windows-caused problem, the users will blame me....

attached file: Scriptfehler_Kurzinfo.JPG


Thanks in advance
Wolfgang




35
Hello Bruce and all others,

the Webserver has all those pretty values in the WebPerfomance GROUP shown on the window of my server, however, when run as a Service, I can't make any use of them. my question now is, how can I access those variables in MAIN from inside a Servicemethos, so that I can send them back as return values or alternatively make an HTML-page from those performance data?

Thanks in advance
Wolfgang

36
Web Server - Ask For Help / Individual URL for download, with UID
« on: March 15, 2017, 11:35:25 AM »
Hello all and Bruce,

my intention is to provide files for download, however I do not want to name the "physical" location of those ZIPs, but an "artificial" one.

Instead of http://server.com/downloads/new.zip I think of something like this:

http://server.com/aow27ensz6tb/new.zip which actually points to the file in the first URL.

Something like this aow27ensz6tb is an individual UID per customer. With a SOAP-method its easy to identify them, but those links will be part of a newsletter.

The idea is to track, which customer has taken the occasion to fetch the recent update. That does not necessarily mean the update gets installed at all, but it helps to identify those customers, who are definetily not up-to-date. They can be approached in a different way then. Its about a hosputal drug database, so there are good reasons for them to be updated.

First question: Is it possible to create individual links pointing to a physical location and how?

Second question: Where would be the best spot to intercept that UID from the URL, to store into a table?

Thanks in advance,
Wolfgang

37
Hello all,

during a chat on the Clarion-channel I asked, how many records the ServiceErrorQueue may contain, which is returned from the SOAPserver to the SOAPclient.

Bruce responded, that there is the possibility of more than just one record.

This is how I catch the errors in the .Pagereceived method:

IF INSTRING('ServiceErrors', SELF.Page, 1,1)

    ! GLOCS:ServiceErrorQueue is a GLObal Variable on the client side, identical with the Nettalk-ErrorQueue
    FREE(GLOCS:ServiceErrorQueue)
    xml.Load(GLOCS:ServiceErrorQueue, SELF.Page, SELF.PageLen,'ServiceErrors','Error')
    !  
    stERROR.FREE()
    stERROR.Append(' # # # # # # # # # # # GLOCS:ServiceErrorQueue: # # # # # # # # # # #' & CRLF)
    p# = 0
    LOOP RECORDS(GLOCS:ServiceErrorQueue) TIMES
        p# += 1
        GET(GLOCS:ServiceErrorQueue, p#)            
        
        stERROR.Append(p# & ': ServiceErrorQueue:ErrorPosition ' & ServiceErrorQueue:ErrorPosition & CRLF)
        stERROR.Append(ServiceErrorQueue:ErrorNumber & ' : ' & ServiceErrorQueue:ErrorDescription & CRLF)
        stERROR.Append((ServiceErrorQueue:ErrorRecomendation & CRLF)
    END
            
    stERROR.Append((' # # # # # # # # # # # /GLOCS:ServiceErrorQueue: # # # # # # # # # # #' & CRLF)

    stERROR.SaveFile(_insert_name_for_errorlog_here_)

    ! This was written into the log-file,
    ! now we need to inform the user about this calamity.
    ! We may use a Messagebox to display the very first error:
    GET(GLOCS:ServiceErrorQueue, 1)
    MESSAGE('We are sorry to say, but one or even more errors have occured, like: ' & RECORDS(GLOCS:ServiceErrorQueue) & '||Description: ' & |
            CLIP(ServiceErrorQueue:ErrorDescription) & '||The errors have been written to  , 'Attention', ICON:Hand)
ELSE

! here goes the source for processing the successful received data
....

END



However, I still have one question: How can I trigger an error reliably, to test that my error-reporting actually works?

Nothing is worse than an illusion, except in las Vegas.

Thanks,
Wolfgang


38
Web Server - Ask For Help / Percent-symbol in URL
« on: December 28, 2016, 06:18:27 AM »
Hello Bruce and all others,

my server has a subdirectory with quite a lot of PDF-documents.

They can be displayed well in a webbrowser, however not in the FileExplorer Viewer-control, as discussed before onthe SV-NG. I will have to find a solution for that.

My latest problem now is the fact, that quite some of these PDFs have the % symbol in their name. All these files cannot be displayed or downloaded or whatever.

Example:
http://192.168.178.113:22000/pdf/de/DE-GLUCOSE-5%-INJEKT-BRAUN-BRD_2014_06.pdf

I tried to replay % with %25 with no luck, like this here:

http://192.168.178.113:22000/pdf/de/DE-GLUCOSE-5%25-INJEKT-BRAUN-BRD_2014_06.pdf

Is there any chance to display / download a document with a % in its name?

Thanks,
Wolfgang


39
The Rest - Ask For Help / Hashing a QUEUE
« on: July 24, 2016, 04:19:02 AM »
Hello Bruce and all others,

this a StringTheory-question, but as it concerns my Nettalk SOAPserver / FatClient-project, I will ask here.

When I get a QUEUE back from the server, I want to compare it to the existing on the clientside. If identical, I need no further process.

The Clarion function CHANGES(myQueue) does not do what I want. Manual says:

The CHANGES procedure returns a LONG integer containing a
unique "hash" value for the current QUEUE contents.
Saving this value then later comparing the saved value to the
current return value from CHANGES allows you to easily
detect that the contents of the QUEUE have changed (in any way at all).


However, when I compare two completely unchanged queues, I always get different "hashes".

How about using a StringTheory object for this?
Code: [Select]

LOOP RECORDS(myQueue) Times
  GET(MyQueue, counter)
  st.Append(mQ:RECORD)
  counter += 1
END

hash = st.MD5()

First question: is that possible and useful in general?

My example from above does not work, Clarion says "mQ:RECORD: Unknown Identifier". It works, when I add each field of the queue record on its own.

Second question: Would a new method like .QueueHash(pQueue) a reasonable feature request? The more I think about it, I doubt that. But relentless as I am, I ask anyway.

Thanks for reading,
Wolfgang

40
The Rest - Ask For Help / WiFi traffic encryption
« on: February 07, 2016, 12:00:55 PM »
Hello all!

Is the traffic between a client and a HTTP-server within a WPA2-secured WLAN sniffable from the outside?

Explanation: I work on a new project with ESP ( http://www.arduinesp.com/ ).

Such an ESP can be a client, as it also can be a server. However, I am not sure yet if such a server can be convinced to use HTTPS.

My question is: Can the http-traffic between client and server inside a WLAN be sniffed from the outside, when the router is using WPA2?

Our intention is to install a segregated WLAN, which will contain only some ESP devices and at least one dedicated PC. Those ESP ought not to be reached from anyone outside the WLAN. Only the PC (running a Nettalk Webserver, likely using https) will be accessible from the outer world via portforwarding. The question is abouit security inside that WLAN.

I tend to say that an attacker can record the WiFi-traffic, but has to break the WPA2 key to read the contents. In other words, its more or less secure, to have not encrypted traffic inside this segregated WLAN.

The data is only about temperature, humidity and that like, but here in Germany we have strict privacy laws, so I better plan ahead.

Thanks for any input,
Wolfgang

41
Web Server - Ask For Help / Cookie or not?
« on: May 29, 2015, 01:22:59 AM »
Hello again!

I am now pondering about the right technique for Client authentification.

On a LAN some Win32-webclients made with Clarion and Nettalk will request data from a SOAP-server.

Because they are all on the same LAN, there is not real need for an authentification. However, there is a need for identification of each client, to send back specific subsets of data. For this "ClientID" the COMPUTERNAME should be sufficient.

The logic here, when the clients has a request for data, is to send the ClientID to the server first. The server then looks up in the list of clients and when this client is know, the server returns an OKAY, YOU ARE ALLOWED, I WILL LISTEN. (sort of thing)

Now the client will send the request. Its a kind of "State-Machine", right?

I expect this to work.

However, its also possible that sending the COMPUTERNAME as ClientID is not sufficient. In this case, the client will have a dialog at Startup, where the user logs into the Client. He then should remain to be logged in permanently, until the user intentionally logs out.

Because of the Stateless Connection the Server knows, whether the requesting client is legit. That means, the client always have to its credentials before each request.

There might be two requests within some minutes, but then nothing for the next three hours.

So I do not worry about the amount of data being pushed back and forth over the LAN, it will not be increasing the noise that much.

What makes me think is the handling of this process. Would it be easier to set a Cookie, once the Client has successfully connected? Such a cookie might be valid for more than just 15 minutes. It could be set to 365 days. And with each start of the Client a new Cookie would be issued, so this client would be eligible all the time. No need for permanent checking.

In short:

Idea 1
Client registers at Server.
IF Server says OKAY, THEN Client sends Request.
Over and over again, with every request.
Idea 2
Client registers at Server.
Client requests are legit, as long as the Cookie exists.

What would be the best technique to solve that?

Or have I maybe forgotten or overlooked something?

Another thought: What, if not a human user is using a Win32-Client, but a machine requesting things every 10 seconds? This will need another server, I think. But in this case a cookie might be the better oiption in general, I think.



Thanks for reading my lengthy thoughts,
Wolfgang


42
Web Server - Ask For Help / SOAPserver to return just one value
« on: May 28, 2015, 12:46:54 PM »
Hello Bruce and others,

I want my SOAP-Server to return one value. This is what I get back into the Client and it looks fine:

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...>
<soap:Body>
    <getAnmeldemethode_Response xmlns="">
      <Anmeldemethode>1</Anmeldemethode>
    </getAnmeldemethode_Response>
  </soap:Body>
</soap:Envelope>


How do I get that single value of "Anmeldemethode" into a variable of the Client?

All I see is xml.LOAD( FILE / QUEUE / GROUP, ....).

In my case its just a plain variable.

What I already tried was to make a GROUP with one component. That component is "Anmeldemethode", Apparently I made that wrong. >:(

MyGroup       GROUP,PRE(MyG)
Anmeldemethode    STRING(1)  !1 = Automatisch oder 2 = mit Passwort
                END

In .PageReceived I have this:

xml.Load(MyGroup, WebClient.page, WebClient.pagelen, 'getAnmeldemethode_Response', 'Anmeldemethode')

MyG:Anmeldemethode  should hold a 1 now, but does not, of course.

Thanks in advance,
Wolfgang




43
Web Server - Ask For Help / SOAP ACTION - does it have to be a GROUP?
« on: November 03, 2014, 03:56:12 AM »
Hello again,

another question....

The Web77 example has the SOAPACTION stored ina GROUP.

Does it mandatory have to be a GROUP?
Code: [Select]
Action_Group    GROUP
Customer_Action   STRING(20)
                END

The table, which will be written to, has also the name CUSTOMER.

In the "AutoService:<filename>  ROUTINE" I see that the server seems to expect a Value names "LOWER(<filename>_Action)". Those variable are all declared in source by the template.

As I have several NetWebServerMethods on several Tables, I then would need
Customer_Action
Product_Action
Employee_Action
whatever_Action each?

However, when I add them all to a GROUP, the server then every whatever_Action, none execpt one is needed.

Code: [Select]
  ! End of "Start of AutoService: Routine"
  case lower(<filename>_Action)
  of 'insert'
  orof 'add'
    ! Start of "Before Insert AutoService: Routine"
    ! [Priority 4000]
    dbgView('AutoService:<filename> We just received ' & records(q:<filename>) & '  Records in records(q:<filename>) from Client ')
    ! End of "Before Insert AutoService: Routine"
    Loop x = 1 to records(q:<filename>)
      get(q:<filename>,x)
      do InsertRecord:<filename>
    end
  of 'update'
   ...... etc

I assume, that everything you do, Bruce, has some deeper reason. So - what is the reason behind this stuffing into a GROUP?

Or can we have simple local (global?) variables for each action, adding them as a STRING to the Parameters, without causing harm?

Thanks so far,
Wolfgang





44
Hello Bruce and all others,

on the SOAP-Client side I do not want to store any physical data. Therefore I make the SOAP-Server to read several physical tables into InMemory-table, which then get requested by the client.

The client then reads some more data from a local CSV and finally merges the requested InMemory with those CSV-data into a new InMemory-table, which then gets sent back to the Server.

Back at the server, I want this new InMemory-table to become physical.

That means on the serverside, I have to stuff the received InMemory-table into another InMemory-tabkle on the serverside, then manually copy this one into a physical table?

The server cannot somehow receive IMDD, then automatically store to a physical file?

That no problem at all, I just need to clarify the obvious. <g>

thx in advance,
Wolfgang

45
Web Server - Ask For Help / SOAP: purpose of Customer_Action = null
« on: October 11, 2014, 01:03:44 AM »
Hello Bruce and all,

the Customer_Action of a Webservice knows several options:
* get
* insert
* update
* delete
* null

Question 1:
My intention is to send a Queue from the Client to the Server for further processing. In this case its not any insert etc of any single record. The queue holds many records, which then the server will integrate into a table. I don't want to issue a .POST() with 'Customer_Action = insert' 500  times.

So in this Customer_Action = null is the option to choose - right?

Question 2:
Are these option defined in any official protocoll or would it be legit to have our own additional options, to trigger special activities in the NetWebServiceMethod?
In this case I have nothing specific in mind. First of all I want to understand, where get / insert / update / delete come from.
Maybe one could send something like Customer_Action = alert, instead of null in some cases?
Or is it recommended to use null, having the "reason" of this 'alert' in a variable inside the xml?


Thanks,
Wolfgang

Pages: 1 2 [3] 4 5 6