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
16
Available For Hire / Looking for contract work
« on: August 09, 2019, 03:28:20 PM »
I've been working with Net Talk web server for around 10 years now.  In that time I have made one very large web server, and several smaller ones.

I'm a firm believer that complexity in code is preferable to complexity to the end user. Though I do love it when I can make both simple.

I have interfaced with several 3rd party apis. Most http(s) based, but a few have Component Object Model or DLL. Most recently I made an interface to Quick Books Online.

I have also written interfaces to payment processors, both web based, and local using a credit terminal.

If you have a job you want me to do or want me to consult on your program contact me on linked in www.linkedin.com/in/matthew-leavitt or email Matthew(at)posal(dot)com

17
Web Server - Ask For Help / Change form action
« on: August 06, 2019, 01:28:27 PM »
NT: 10.36

My solution to a form with a child browse on it is to crate the parent record right before the first child is added. I'm having trouble convincing the program to switch from change to inset (If the user doesn't add a child record I was to remain on insert).

In a test button I've put:
Code: [Select]
p_web.ssv('PromotionForm_CurrentAction', Net:ChangeRecord)
p_web.FormSettings.action = Net:ChangeRecord
Do SetAction
Do CompleteForm
!p_web.SessionQueueToFile(Promotions)
dbgView('StoreID: ' & PMS:StoreID)
dbgView('Description: ' & PMS:Description)
PMS:PromotionID = st.MakeGuid()
dbgView('PromotionID: ' & PMS:PromotionID)
p_web.formsettings.recordid[1] = PMS:PromotionID
p_web.formsettings.FieldName[1] = 'PMS:PromotionID'
!Access:Promotions.Insert()
p_web.AddFile(Promotions)
p_web.ssv('UpdateNow', 1)
p_web.ssv('PromotionForm:Primed', 1)

And in procedure setup I've put:
Code: [Select]
  IF band(p_stage, Net:InsertRecord) = Net:InsertRecord AND p_web.gsv('UpdateNow') = 1
        p_stage -= Net:InsertRecord
        p_stage += Net:ChangeRecord
        p_web.FormSettings.action = Net:ChangeRecord
        dbgView('Changing State')
  END
  dbgView('Stage: ' & p_stage)
  dbgView('UpdateNow: ' & p_web.gsv('UpdateNow'))
  dbgView('Form action: ' & p_web.FormSettings.action)

But I still get a duplicate key error or the primary key.

Also I'm trying to prime the PK using the template, but the value keeps getting erased. The value used to be a SQL Identity, but I changed to make knowing the PK easier.

Thanks Matthew

18
Web Server - Ask For Help / Just dealt with my first real hacker attack.
« on: February 27, 2019, 03:43:19 PM »
NT 10.36

The hacker could have been hitting our system for up to 10 minutes by time I got notified to look at it. We don't keep file logging on so I don't have a record of what he was doing earlier. When I looked at it he was asking for php files as fast as the server would let him. 2 WebSocket connections were open, even though our server doesn't even use web sockets.

My big concern is that he managed to lock everyone else out of the server. Everyone else got a time out error. Even after I banned his IP no one else could connect, I had to restart the SebServer app (I didn't think to try the restart button).

I'm sorry I didn't manage to collect a lot of information, but this was during our busy time so my focus was on getting things working again asap.

Is this anything we can to to prevent an attacker from locking people out of our server in the future?

Also a feature idea:  Auto ban an ip address of it gets too many 404s is a short amount of time. I bet that would limit most probing attacks.

Thanks Matthew

19
Web Server - Ask For Help / Bind server to list of IP addresses?
« on: December 10, 2018, 02:33:14 PM »
Is it possible to bind a server to a list of IP addresses instead of just one?

Thanks

Matthew

20
Web Server - Ask For Help / Load page on session timeout
« on: November 29, 2018, 01:43:33 PM »
NT: 10.36

In your NT 11 webinars you had one of your examples load a new page after the session timed out.  I can't see anywhere do do this in the documentation.  Is this new in NT 11 or do those of us still on NT 10 have it?

21
Web Server - Ask For Help / Moving from table to div browses
« on: November 22, 2018, 05:30:43 PM »
Net Talk: 10.36

After updating my theme I have a few problems left I haven't been able to solve.

If I set "Column Width (rel)" to .5 the header is sized correctly, but the the contents are sized as if I entered 5.

The sort arrow is using a different image set.  Looking in my browser inspector I see that the table layout has 'ui-widget-header' applied while the div layout does not.  I can't figure out where to tell net talk to set that css class.

Thank you

Matthew

22
Web Server - Ask For Help / On carousels
« on: November 22, 2018, 05:03:12 PM »
Net Talk: 10.36

I added a carousel to my app.  The first problem I ran into is the css was not getting sent to the browser.  I added 'slick.css' and 'slick-theme.css' as style files and it's mostly working.  I can't see the arrows on either side of the image.  Is their another file I should add to get the arrows?

I tried making an example, and it of course worked fine without manually adding the files.  My best guess is that my program is multi dll so the WebServer isn't detecting that it needs to include the carousel files.

Also it would be nice if the template let you add links to the images.  For now I've handled this with some hand code.

23
Web Server - Ask For Help / Submit GPF report to web server
« on: November 15, 2018, 04:17:01 PM »
Most people use web based email clients making the email option not very useful.  I would like to add the option to submit the GPF report to our web server. 

The only way I can find to do this is to check for the existence of the GPFreport.log file on program start and submit it their.  Is their any way to alter the GPF report class to handle this?  I have found little options to modify it's behavior outside the template.  Is their any way to change the window to give it a submit report button?

Perhaps this wasn't the best place to post this, but I can't be the only one with both a web server and desktop app that wants this.

24
Web Server - Ask For Help / Spinner Validation
« on: November 15, 2018, 02:17:26 PM »
I set a low value of 1 for my spinner.  It stops the user from using the arrow keys to enter a 0 quantity, however if the user types in a quantity the no checking is done to validate the value.  This is the case for both the form spinner and the edit in place one.  If I use the number type (and the browser adds the arrows) everything works as expected.

Edit: I added the validation code by hand, and confirmed that the generated code is just missing if it's a spinner type.

25
Web Server - Ask For Help / Login with Oauth button and large scopes
« on: June 29, 2018, 03:26:18 PM »
Hi, I'm back with another large scope problem.  This time with the web server button.  I followed example 83 and ran into trouble when trying to use large scopes.  It looks like p_web.windowOpen(redirectURL) is the one dropping the ball as the url portion of the returned string is clipped to 512.  Can we get this value increased in size too?

Thanks
Matthew

26
Web Server - Ask For Help / Multi dll upgrade to NT 10.25
« on: June 27, 2018, 03:19:40 PM »
I upgraded from about 10.20 or so.  All the Dlls compiled fine but when I got to the main exe, whis has the WebServer and WebHandler procedures I get the following errors:

Unknown identifier: ?SET:ACCESSCONTROLALLOWORIGIN - C:\Share\C8APPS\SCS Server\MainExe001.clw:1835,66
Unknown identifier: ?SET:XFRAMEOPTIONS - C:\Share\C8APPS\SCS Server\MainExe001.clw:1835,42
Unknown identifier: ?SET:CONTENTSECURITYPOLICY - C:\Share\C8APPS\SCS Server\MainExe001.clw:1836,66
Unknown identifier: ?SET:STRICTTRANSPORTSECURITY - C:\Share\C8APPS\SCS Server\MainExe001.clw:1836,12
Unknown identifier: ?SET:REFERRERPOLICY - C:\Share\C8APPS\SCS Server\MainExe001.clw:1837,66
Unknown identifier: ?SET:CONTENTSECURITYPOLICYREPORTONLY - C:\Share\C8APPS\SCS Server\MainExe001.clw:1837,12
Unknown identifier: ?SET:XFRAMEOPTIONS - C:\Share\C8APPS\SCS Server\MainExe001.clw:1878,10
Unknown identifier: ?SET:ACCESSCONTROLALLOWORIGIN - C:\Share\C8APPS\SCS Server\MainExe001.clw:1882,10
Unknown identifier: ?SET:STRICTTRANSPORTSECURITY - C:\Share\C8APPS\SCS Server\MainExe001.clw:1886,10
Unknown identifier: ?SET:CONTENTSECURITYPOLICY - C:\Share\C8APPS\SCS Server\MainExe001.clw:1890,10
Unknown identifier: ?SET:CONTENTSECURITYPOLICYREPORTONLY - C:\Share\C8APPS\SCS Server\MainExe001.clw:1894,10
Unknown identifier: ?SET:REFERRERPOLICY - C:\Share\C8APPS\SCS Server\MainExe001.clw:1898,10

The code around those lines is:
Code: [Select]
    case Event()
    of Event:Accepted
      case Field()
      of ?set:InsecurePort          orof ?set:SecurePort    orof ?set:AccountName
      orof ?set:CertificatesFolder  orof ?set:Domains       orof ?set:BindToIPAddress
      orof ?set:WebFolder           orof ?set:AcmeFolder    orof ?set:Staging
      orof ?set:SessionTimeout      orof ?set:xFrameOptions orof ?set:AccessControlAllowOrigin
      orof ?set:StrictTransportSecurity                     orof ?set:ContentSecurityPolicy
      orof ?set:ContentSecurityPolicyReportOnly             orof ?set:ReferrerPolicy
        do SaveSettings
      End
      case Field()

I have already upgraded StringTheory and all other Capesoft templates we use.

Thank you
Matthew

27
Web Server - Ask For Help / SQL Errors after NT 10 Upbrade
« on: December 19, 2017, 11:59:13 AM »
After updating from NT 8 to NT 10 we stated having trouble with the server thread count maxing out and the server locking up.  Whenever this would happen I ran a query on the MSSQL server to list the currently active queries.  Their would always be 2 queries that where "AWAITING COMMAND".  These weren't always the same queries, but were always one that were run frequently.  I'm just guessing that it is fairly random when these lock ups happen.

Looking through NT code I found that it used the SetSqlTimeout procedure, and I tried using that in some of my custom code.  The result was fewer lockups, but also 'Set Lock_Timeout -1' would be one, or both of the queries that are "AWAITING COMMAND" when the server would lock up.

It looks as if NT generated code hasn't be "AWAITING COMMAND", however that may be because my own hand code runs much more often.  I use Access:[Filename] in my custom code rather the the NT methods.  IT would take a lot of work to switch them all over, and I don't know of a NT method to use a SQL dummy file for custom queries.

I have no idea why a NT update would cause this problem, but it was the only significant change we made at the time.  I haven't yet been able to replicate the problem in a test environment.

We are still using Clarion 8 and that may be contributing to the problem, however as I said when we were on NT 8 our server was vary stable.

My driver options are "/BUSYHANDLING=2 /MULTIPLEACTIVERESULTSETS=TRUE /TRUSTEDCONNECTION=TRUE"

Thank You
Matthew

28
Web Server - Ask For Help / oAuth in a server
« on: November 06, 2017, 04:11:17 PM »
During the NT10 desktop webinar someone asked about using the oAuth feature in a server.  They were told to wait for the server webinar, but it was never mentioned.  Is it possible to make the code work in a server app, or is a server version planned?

I have played around with a desktop app, and I have some ideas about how I might get it to work, but it would require some code hacking.

Can you increase the size of parms.pScope?  I'm working with a service for a personal project that has a lot of scopes.  The first string I made was about 1700 characters, though I didn't understand what I did and didn't need, so their's a lot I can cut out, but 256 is too restrictive.

Is it possible to not save, and load information to the ini file?  Again in my personal project it is common to have one user auth several accounts at the same time.  Also I see this as a requirement for using oAuth on a server.

29
Web Server - Ask For Help / Lets Encrypt error 400
« on: September 21, 2017, 03:10:09 PM »
Every time I try and get a certificate I get the following error:
Code: [Select]
A network communication error has occurred.
Error = Server Response When requesting Certificate 400.
Error occurred in function NetAcme.PageReceived

Sometimes it happens on the "Request account" step, other times on "Request Certificate".  I've been trying at most 2 times a day for about 3 weeks now with the same results each day.

The log is:
Code: [Select]
[ 9/21/17-16:58:17]  Request Certificate Failed 400
[ 9/21/17-16:58:16]  Requesting Certificate For test.posal.com
[ 9/21/17-16:58:16]  Status: "valid"
[ 9/21/17-16:58:16]  Checking Status
[ 9/21/17-16:58:16]  Notify Server Challenge is Ready
[ 9/21/17-16:58:16]  Challenge Token Saved C:\SCS Server\web\.well-known\acme-challenge\rsvqSD7Oh_tDa4pQu7LehFCPJWkPy0a8dir2NcDoWbk
[ 9/21/17-16:58:15]  Authorize Request test.posal.com
[ 9/21/17-16:58:15]  Registering Account POSAL at  https://acme-v01.api.letsencrypt.org/acme/new-reg
[ 9/21/17-16:58:14]  C:\SCS Server\certificates\test.posal.com.crt does not exist
[ 9/21/17-16:58:01]  Registering Account POSAL at  https://acme-v01.api.letsencrypt.org/acme/new-reg
[ 9/21/17-16:58:00]  C:\SCS Server\certificates\test.posal.com.crt does not exist

Edit NetTalk 10.06

30
Web Server - Ask For Help / WebService NT8-10 Upgrade
« on: September 06, 2017, 03:06:40 PM »
After upgrading from NT8 to 10.05 I get the following 2 errors for every NewWebServiceMethos Procedure:

Routine not defined: EXAMPLESIMPLERESPONSE
Routine not defined: EXAMPLESOAPRESPONSE

Looking in the code I find
Code: [Select]
Examples  Routine
! Start of "Start of Examples Routine"
! [Priority 5000]

! End of "Start of Examples Routine"
  do ExampleSoap11Request
  do ExampleSOAPResponse
  do ExampleSoap12Request
  do ExampleSOAPResponse
  do ExamplePostRequest
  do ExampleSimpleResponse
  do ExampleGetRequest
  do ExampleSimpleResponse
  do ExampleRestGetRequestXML ! rest get for xml response
  do ExampleSimpleResponse    ! response in xml format
  ! Start of "End of Examples Routine"
  ! [Priority 5000]
 
  ! End of "End of Examples Routine"

ExampleSOAPResponse and ExampleSimpleResponse are not defined anywhere in the procedure.  The other of course are.

Pages: 1 [2] 3 4