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 - Matthew51

Pages: [1] 2 3 4
1
Web Server - Ask For Help / Remove file name from File Upload
« on: January 10, 2023, 05:43:10 PM »
I have a file upload set to use the camera on a phone. The file name given to these pictures are meaningless, and in the case of my phone overly large (see attachment). So large that the browser is destroying the format of the form trying to display it.

I would like to ether remove/hide the file name, or change it to 'Picture 1', 'Picture 2' etc. I'll then add a browse to show then the pictures that have been uploaded. I can't even figure out where in the code this table is created, or how to add my own css to it.

Thank you
Matthew

2
NT 12.39

I'm using Amazon web services that disables all notwork broadcasts, even if the VMs are on the same subnet. I get around this by getting a list of IP addresses from the amazon api and calling NetAutoRemote for each of them.

This works fine when I manually create new VM from scratch. However I'd like to create an image of one VM and use that to create others that are already set up and configured. When I try this the NetClients get confused and can't tell each other apart. I tried having amazon change the computer name in windows when a VM is created to give them a unique NetName, but that didn't work. It looks like they are all getting the same NetID. I can't see how the NetID is created as that is happening inside the DLL, so I don't know what if anything I need to change to make the NetIDs unique.

This confusion even crosses Service Names, so I had to create a fire wall between my test VMs and the production ones.

Is their anything I can do to influence the NetID? And is that even the root of my problem?

Thanks
Matthew

3
Web Server - Ask For Help / Min height no longer wooks for wizards
« on: January 06, 2022, 03:36:52 PM »
NT 12.33

The min height option looks like it no longer works for wizards. I have a wizard with a min height of 200, but the height gets set to 168.467 and elements are overlapping with the navigation buttons. Presumably this is done by java script. I used the inspector in Firefox to comment out the height and everything worked fine. Could it also be an option to let the browser determine the height?

Thank you
Matthew

4
Web Server - Ask For Help / ThisWebServer.Acme.ImportAllPFX()
« on: November 01, 2021, 02:54:08 PM »
In NetAcme.MakePFX() I believe the -extfile and -config commands need to be removed from the openssl call. Nether are in the documentation for pkcs12, and create an error. Once I removed the commands everything looked to work properly and an FTP server I'm working with could use the pfx file.

5
FTP - Ask For Help / TLS connection to FileZilla server
« on: October 19, 2021, 02:30:06 PM »
NT: 12.26

NetTalk does not seem to be able to establish a TLS data connection. I modified the example to connect to my FTP server using both Ftp:ImplicitSSL and Ftp:ExplicitSSL, both with similar results. Ftp:ImplicitSSLControl does not look like it's supported by FileZilla anymore.

Code: [Select]
===== Control Connection Opened =====
220-FileZilla Server 1.0.1
220 Please visit https://filezilla-project.org/
>>USER UpdateBuilder
331 Please, specify the password.
>>PASS ****
230 Login successful.
>>SYST
215 UNIX emulated by FileZilla.
>>PBSZ 0
200 PBSZ=0
>>PROT P
200 Protection level set to P
>>PWD
257 "/" is current directory.
>>TYPE I
200 Type set to I
>>SIZE /Patch4.1.2.msp
213 10129408
>>PASV
227 Entering Passive Mode (216,171,235,114,234,212)
>>RETR /Patch4.1.2.msp
150 About to start data transfer.
===== Data Connection Opened =====
===== Data Connection Closed =====
===== Error: Error occured while receiving a file, not all data was received
===== Click Close to close window =====
425 Unable to build data connection: TLS session of data connection not resumed.
===== Error: Unknown Reply from FTP Server. Reply = 425[425 Unable to build data connection: TLS session of data connection not resumed.
] Command =
===== Click Close to close window =====

I also tried passive mode, but that timed out.

Code: [Select]
===== Control Connection Opened =====
220-FileZilla Server 1.0.1
220 Please visit https://filezilla-project.org/
>>USER UpdateBuilder
331 Please, specify the password.
>>PASS ****
230 Login successful.
>>SYST
215 UNIX emulated by FileZilla.
>>PBSZ 0
200 PBSZ=0
>>PROT P
200 Protection level set to P
>>PWD
257 "/" is current directory.
>>TYPE I
200 Type set to I
>>SIZE /Patch4.1.2.msp
213 10129408
>>PORT 192,168,50,227,9,212
200 PORT command successful.
>>RETR /Patch4.1.2.msp
150 Starting data transfer.
425 Unable to build data connection: ETIMEDOUT - Connection attempt timed out
===== Error: Unable to open data connection [425 Unable to build data connection: ETIMEDOUT - Connection attempt timed out
]
===== Click Close to close window =====

On a side note I have to set DontVerifyRemoteCertificateCommonName = TRUE for the data object when using both implicit and explicit, and for the data and control objects then using explicit. NetTalk look to be trying to verify the common name against the ip address on subsequent connections.

Also I censored the password, it is not ****

6
Web Server - Ask For Help / Closing files clears the current record.
« on: October 06, 2021, 03:54:58 PM »
Clarion 11.1
NT 12.26
SQL Server 2014 Standard

I suspect that this may be at the root of many of the problems that are on my production server. This only becomes active after my production server has been running for a while. It doesn't occur on a fresh restart, or on my development server. The file record is cleared after a file is closed. To test this I created some simple code:
Code: [Select]
      dbgView('Before Close: ' & Inv:ItemID)
      dbgView('Result: ' & p_web.CloseFile(InvMaster))
      dbgView('Close Error:  ' & Error())
      dbgView('After Close: ' & Inv:ItemID)

The results on my development server and after a fresh restart:
[40340] [BackOffice] Before Close: 154
[40340] [BackOffice] Result: 0
[40340] [BackOffice] Close Error:  Entry Not Found
[40340] [BackOffice] After Close: 154

After my production server has been running:
[42892] [BackOffice] Before Close: 154
[42892] [BackOffice] Result: 0
[42892] [BackOffice] Close Error:  Entry Not Found
[42892] [BackOffice] After Close: 0

I feel like nettalk frequently assumes the record is still valid after a close, and I have no idea what might be clearing it.

7
Web Server - Ask For Help / Next button breaks browse
« on: September 21, 2021, 01:43:41 PM »
Clarion 11
NT 12.19
MS SQL 2014 Standard

I have one browse in my app where hitting the next button will cause it to display the no records message, even though their are records it should be displaying. In the past this only happened occasionally, but now it's 100% of the time for this one browse. Most frustrating is this is only happening on our productions server. If I set up a test server using the exact same binaries and a backup of the production database everything works fine.

Any ideas as to what I should check would help a lot.

Thank You
Matthew

8
Web Server - Ask For Help / Apostrophe in eadding of popup
« on: May 26, 2021, 03:23:15 PM »
C 11
NT 12.18

I'm sure this was working in NT 11 and earlier.

I have a popup where the heading is set dynamically. If the heading happens to have a ' in it tho whole popup breaks (see attachment), theirs no tabs and none of the buttons work. Also it displayed the heading of the previous record opened, or the first record if it's the first time opening the form. I noticed p_web.Translate didn't escape apostrophes so I tried escaping them myself. But when the template called translate it turned "King's" into" King's"

I then changed line 2311 in NetWeb.clw form "case p_notok[x+2 : x+6]" to "case p_notok[x+1 : x+5]" and that fixed the translate issue, but the popup is still broken. Lines 2294 and 2322 may need similar treatment.

I also tried it with a static heading with an apostrophe. This time it displayed the right heading, but the popup was still broken.

9
After upgrading to NT 12.02 I'm getting compile errors my forms with decimal values in the StoreMem Routine.
Code: [Select]
StoreMem  Routine
  If p_web.IfExistsValue('UsedFullAddress') = 0 and p_web.IfExistsSessionValue('UsedFullAddress') = 0
    p_web.SetSessionValue('UsedFullAddress',UsedFullAddress)
  Else
    UsedFullAddress = p_web.GetSessionValue('UsedFullAddress')
  End
  SubTotal = 14,2  ! decimal(14
  If p_web.IfExistsValue('SubTotal') = 0 and p_web.IfExistsSessionValue('SubTotal') = 0
    p_web.SetSessionValue('SubTotal',SubTotal)
  Else
    SubTotal = p_web.GetSessionValue('SubTotal')
  End

SubTotal is Decimal(14,2). I'm not sure why the point of "SubTotal = 14,2  ! decimal(14" is. Other variable types don't have a similar line.

Thank You
Matthew

10
The Rest - Ask For Help / Google Oauth refreshing a token
« on: October 02, 2020, 02:09:27 AM »
Net Talk 11.45

When trying to refresh a google token I get the following error:
Quote
A network communication error has occurred.

Error = The requested connection to oauth2.googleapis.com could not be opened. The Open command timed out or failed to connect.

The error number was -68 which means SSL Failed to Load CA Root File[.\CARoot.pem].

Error occurred in function NetSimple.TakeEvent

This is only happening on my production server (Windows Server 2012), and only when refreshing the token, fetching it in the first place is fine.

Thank You
Matthew

11
Web Server - Ask For Help / Alternative to themeroller
« on: May 21, 2020, 02:48:36 PM »
Themeroller isn't working right now, and as far as I can tell it hasn't been for over 6 months. The workaround that's been posted is to set up a local Themeroller server on a Linux machine. Not having much experience with Linux this will take me quite some time to figure out. Anyone else have any other options that they know of?

Thank you
Matthew

12
Web Server - Ask For Help / Users getting the wrong reports
« on: May 13, 2020, 02:45:10 PM »
NT: 11.35
Clarion: 11

This has been an issue for a while now, and is becoming more common as my server bet more busy. It can generate 300 or more reports per day, and will normally have 20+ pdf files in the reports folder that users haven't downloaded.

My guess is that the pdf generator won't over write a file if it already exists. I don't have much to go on as the information that gets to me is very little, normally just a screenshot of the offending report. I did put in code to make sure the important session values didn't get changed, and after a few months of no issues with incorrect session values I removed the code.

Even with 90,000 possible file names the chances of a collision is about 7% per day.

I have 2 suggestions
1: Let us choose how often to delete reports. If a user hasn't downloaded it in 10 min the are very unlikely to.
2: Add letters to the random file name. This should push the chance of a collision back to acceptable levels, even as my user base grows.

Thank you
Mathew

13
Web Server - Ask For Help / So many browses, so many errors
« on: March 02, 2020, 02:27:01 PM »
NetTalk 10.40

What I'm doing is a bit confusing so I'll do my best to explain. I've run into a few and had to hack some solutions. Perhaps my solutions could be worked into NetTalk?. I have a Tag Master Browse, and inside that browse have a Tag Browse.

Problem: Only the last browse would be able to know what record to work with when the check box was clicked. The cause is all the browses have the same loc:RandomBrowseId value.
Solution: Include the parent row when calculating loc:RandomBrowseId. As I don't have an embed point right after it's set I put the following code in "Start of Procedure"
Code: [Select]
        IF p_web.GetValue('_rid_') = ''
            p_web.SetValue('_rid_', p_web.Crc32(clip(loc:parent) & lower(p_web.GetValue('_parentRow_')) & ' TagBrowse'))
        END

I also have Product Browse to the side of the Tag Master Browse.
Problem: As it is after Tag Master Browse in the code p_web.GetValue('_parentRow_') still has a value at this time. This caused the browse to not respond to any update events.
Solution: I put p_web.DeleteValue('_parentRow_') at the start of Product Browse. Perhaps a better place would have been at the end of Tag Master Browse.

If these are already fixed in NT11 you can dis regard my post.

Thank you
Matthew Leavitt


14
Web Server - Ask For Help / Redactor Editor Upload Image
« on: October 02, 2019, 12:59:42 PM »
I'm working with the Redactor html editor and I want to change the name and location of any images the user uploads using the editor, but I can't find an embed point that works, or where a default location can be set, though I would rather choose a dynamic location based on other data.

Thanks
Matthew

15
Web Server - Share Knowledge / Browse search defaults to AND instead of OR
« on: September 09, 2019, 03:17:59 PM »
It least for my use case I consider an AND search to make more seance as the default search rather then OR, and my users aren't going to put in the + by themselves. Also just in case I have some advanced users I added a | character to indicate an OR search.

In your WebHandler procedure modify the GetLocatorVale embed to look like:
Code: [Select]
p_web.GetLocatorValue PROCEDURE(LONG p_type,String p_name,Long p_Where,String p_OnFields)

ReturnValue          ANY

! Start of "NetTalk Method Data Section"
! [Priority 5000]
i                           LONG
st                          StringTheory

! End of "NetTalk Method Data Section"

  CODE
  ! Start of "NetTalk Method Executable Code Section"
  ! [Priority 2500]
 
  ! Parent Call
  ReturnValue = PARENT.GetLocatorValue(p_type,p_name,p_Where,p_OnFields)
  ! [Priority 7500]
 
  ! End of "NetTalk Method Executable Code Section"
! Start of "NetTalk Method Routine Section"
! [Priority 5000]
    IF p_type = Net:Search
        st.SetValue(Clip(ReturnValue))
        st.Split(' ', '"')
        LOOP i = 2 TO st.Records()
            CASE Sub(st.GetLine(i), 1, 1)
            OF '-'
            OF '+'
            OF '|'
                st.SetLine(i, Sub(st.GetLine(i), 2, Len(st.GetLine(i)) -1))
            ELSE
                st.SetLine(i, '+' & st.GetLine(i))
            END
        END
        st.Join(' ')
        dbgView('Value: ' & st.GetValue())
        ReturnValue = st.GetValue()
    END

Note: In my testing I noticed a bug in netTalk where if the final ReturnValue had a + or - then quotes, ie.  (bud +"light Lime") it wouldn't remove the first quote and my filter would look something like: ( INSTRING('BUD',UPPER(Loc:Description),1,1) <> 0) AND ( INSTRING('"LIGHT LIME',UPPER(Loc:Description),1,1) <> 0)



Pages: [1] 2 3 4