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 - Larry Sand

Pages: [1] 2
1
Does anyone have any solutions for: TPL:(NetWeb.Tpw) Error: Cannot open file PBDY.$$$$ ?  The error points to the Create('PBDY.$$$') in the NetWebPage of NetWeb.Tpw and the file was created and has code generated into it.  The file is in use by the IDE and after closing the IDE It's not locked, I can open,edit, and delete it.

Do you get this error?  Please add to this post if you also get this error.

Thanks,
Larry Sand

2
Hi Bruce,

When checking the error returned creating a second global mutex i found that Windows will also return Access Denied "ErrNum = 5".  So the test in MyService.ManageInstances() needs something like this:

ErrorNum = ERROR_ALREADY_EXISTS Or Choose(self.TerminalServiceUsesGlobalMutex <> 0 And ErrorNum = 5)

Larry Sand

3
Web Server - Ask For Help / CORS header elements in _CreateHeader
« on: October 01, 2013, 02:26:45 PM »
Bruce,

NetWebServer._CreateHeader() has a couple of errors:

  if p_HeaderDetails.AccessControlAllowOrigin <> ''
    HeaderStr.Append('Access-Control-Allow-Origin ' & clip (p_HeaderDetails.AccessControlAllowOrigin) & '<13,10>')
  end
  if p_HeaderDetails.AccessControlAllowCredentials <> ''
    HeaderStr.Append('Access-Control-Allow-Credentials ' & clip (p_HeaderDetails.AccessControlAllowCredentials) & '<13,10>')
  end
  if p_HeaderDetails.AccessControlAllowOrigin <> ''
    HeaderStr.Append('Access-Control-Allow-Methods ' & clip (p_HeaderDetails.AccessControlAllowMethods) & '<13,10>')
  end
  if p_HeaderDetails.AccessControlMaxAge <> ''
    HeaderStr.Append('Access-Control-Allow-MaxAge ' & clip (p_HeaderDetails.AccessControlMaxAge) & '<13,10>')
  end



Should be:

  if p_HeaderDetails.AccessControlAllowOrigin <> ''
    HeaderStr = clip (HeaderStr) & 'Access-Control-Allow-Origin: ' & clip (p_HeaderDetails.AccessControlAllowOrigin) & '<13,10>'
  end
  if p_HeaderDetails.AccessControlAllowCredentials <> ''
    HeaderStr = clip (HeaderStr) & 'Access-Control-Allow-Credentials: ' & clip (p_HeaderDetails.AccessControlAllowCredentials) & '<13,10>'
  end
  if p_HeaderDetails.AccessControlAllowMethods <> ''
    HeaderStr = clip (HeaderStr) & 'Access-Control-Allow-Methods: ' & clip (p_HeaderDetails.AccessControlAllowMethods) & '<13,10>'
  end
  if p_HeaderDetails.AccessControlMaxAge <> ''
    HeaderStr = clip (HeaderStr) & 'Access-Control-Allow-MaxAge: ' & clip (p_HeaderDetails.AccessControlMaxAge) & '<13,10>'
  end

There are missing colons and the condition on the allow methods are changed.

Thanks,
Larry Sand

4
Hi Bruce,

This:

NetFTPClientControl._HandleGetRemoteFileReplies Procedure()
loc:temp1       long
pn              equate('NetFTPClientControl._HandleGetRemoteFileReplies')
  code
  self.Log(pn, '')
  self._ErrorFunction = pn

  case self._ReplyCode
  of '125'
    self._replyProcessed = 1
    if (self.OnlyUseSizesInDirList = 0) and (instring(' bytes)',self.Packet.BinData,1,1) <> 0)
      loc:temp1 = self.ExpectedFileSize
      self.ExpectedFileSize = self.Packet.BinData[instring('(',self.Packet.BinData,1,1)+1 : instring(' bytes)',self.Packet.BinData,1,1) -1]
      self.bytesLeftToReceive += self.ExpectedFileSize - loc:temp1
      self.ProgressUpdateNow = 1
      self.calcProgress()
      self.Log (pn, '(125) Incrementing bytesLeftToReceive to ' & self.bytesLeftToReceive)
    end
  of '150'


fails when the server reports ' Bytes' perhaps it could be made case insensitive?

Thanks,
Larry Sand

5
FTP - Ask For Help / endless loop done ftp demo nt 7.07
« on: April 22, 2013, 02:45:40 PM »
In trying to replicate a problem using the ftp client we found one thing with the demo that may be related. The problem we see occurs when we put a large file 30+MB and when we get the "done" from the client we send a rename command and it triggers the error trap being called 3-60 times.  Sometimes when it's done the file is actually renamed. 

So In the demo connect to a server and put a file and leave the "Remote File" blank. 

I've attached a debugview capture.

Still trying to recreate the problem we see.

Cheers,
Larry Sand

[attachment deleted by admin]

6
Please add a conditional compile around the call to Trace() in this method.

Line 95 in nethttp.clw.

Thanks,
Larry Sand

7
Both methods have:

     of '<8>'
        if band(pWhat,st:tabs) then cycle.


and the ANSI decimal value for tab is '<9>'

Cheers,
Larry Sand

8
Web Server - Ask For Help / GPF in _SetView method's OnDefault Routine
« on: April 07, 2013, 11:10:18 AM »
I traced a GPF using NTWS 7.07 to the NetWebServerWorker._SetView method in the OnDefault Routine's call to the SetPrevDis routine. 

This only happens where there are a number of threads concurrently accessing the code.  This happened with a View and the view must also take some time to process the previous() call.  In my test case there is an IMDD table with about 13000 records and the view is joined with another IMDD that has a result set of 20 records. The threads were started by holding down the F5 key to refresh the page.

However, by wrapping OnDefault's calls in the critical section the code executes normally.

If pos <> '' and (loc:sortOrderChanged = 0 or p_file{prop:sqldriver} = 0)   
  self._Wait()
  do SetPrevDis ! check to see if there are any _earlier_ records. If not then disable Previous button.
  self.ResetPosition(p_View,pos)
  self._Release()
Else
  ...


That's as far as I got in tracking it down.

Thanks,
Larry Sand

9
Including a Net:someproc tag in a Net:f:somefile tag worked up until build 7.06.  The link below to the modified version of web2.app shows the problem.  The PageHeaderTag procedure has a call to net:f: and the text file contains the Net:someSrcProc tag that isn't parsed, Here's the resultant html:

<div id="pageheadertag_div"  class=" ui-widget-header ui-corner-top"  data-role="header"><h1>NetTalk - Example 2</h1>
<div> file goes here yada <!-- Net:someSrcProc --> yada </div></div>
<div id="menu_div"  class="nt-menu-div ui-corner-br"><ul id="menu" class="nt-menu""><li><a href="IndexPage">Home</a><ul class="nt-menu-item"></ul></li><li><a href="#">Browse</a><ul class="nt-menu-item"><li><a href="MailboxesBrowseControl">Mailboxes


The JavaScript comment is just included in the output now.

You can get the example here:
http://clarionfreeimage.com/examples/web2.zip

Thanks,
Larry Sand

10
Web Server - Ask For Help / Compile error in 7.07 NetSMPP.clw
« on: March 21, 2013, 10:23:57 AM »
There's a EndCompile string left in the code in the CUnbind.EncodeBody method:

CUnbind.EncodeBody Procedure (*StringTheory pby)!, virtual
  code
    parent.EncodeBody(pby)
    pby.SetValue(self.buffer.GetValue())

  EndCompile


Larry Sand

11
Web Server - Ask For Help / OpenSSL version 0.9.8x and NetTalk 7.06
« on: March 04, 2013, 07:33:37 AM »
Do you have the OpenSSL.exe that matches the .0.9.8x DLLs?  The last version that I have is from Feb 27 2007 and has no version info.  We use it to create certificate signing requests.  

Also those new DLLs depend on msvcr90.dll, have you come up with a method to install those?  I see MS doesn't recommend installing it to your folder, instead they want it installed SXS.

http://support.microsoft.com/kb/326922

Thanks,
Larry Sand

12
Web Server - Ask For Help / netweba.tpw %gNetWebFolder constant
« on: June 18, 2012, 08:36:14 AM »
Hi Bruce,

I'm looking at controlling what's being copied and gzipped and found that In netweba.tpw the code to set the source folder for the copy batch file builds an invalid path.  Currently it is:
----
  #IF(%gNetWebFolder = '')
    #IF(%cwversion<7000)
      #SET(%srcDir,%root & '3rdparty\libsrc\netweb\web\*.*')
      #SET(%bindir,%root & '3rdparty\bin')
    #ELSE
      #SET(%srcDir,%root & 'accessory\libsrc\win\netweb\web\*.*')
      #SET(%bindir,%root & 'accessory\bin')
    #ENDIF
  #ELSE
    #SET(%srcdir,%gNetWebFolder &' \web')
  #ENDIF
----

This line:
    #SET(%srcdir,%gNetWebFolder &' \web')

And it looks like it should be:
    #SET(%srcdir,%gNetWebFolder &'\web\*.*')

Thanks,
Larry Sand

13
Just noticed this in Chrome,

Turn on "Block third-party cookies and site data" (ChromeSetting.png)

Now browse to a NTWS page.  I went to the CapeSoft Forums page.  You should see the cookie icon on the address bar with the red X on it indicating that a cookie was blocked.  Click on that icon and select the link "Show cookies and other site data..."

You'll find that it shows that SESSIONID was set and allowed for "forums.capesoft.com" and ".forums.capesoft.com" AND the same cookies were blocked. (3rdPartyCookieBlocked.png).  I just noticed that the CapeSoft site's cookies have an expires date.  We're using 5.32 and the server keeps creating sessions for the same session.  I notice on forums.capesoft.com I have to hit Ctrl+F5 to get it to block the cookie again and the second time I didn't get the two cookies.

Any ideas about what's happening here?

Thanks,
Dazed and Confused

[attachment deleted by admin]

14
This isn't NetTalk specific but it may help someone.  If your site is tested with and compatible with IE 8, you can add this meta tag to remove the "broken page" compatibility view button from the address bar in IE 8

<meta content="IE=EmulateIE8" http-equiv="X-UA-Compatible"/>


Larry Sand

15
Web Server - Share Knowledge / Prototype developer notes
« on: September 02, 2009, 06:25:51 AM »
Since NetTalk web server uses the prototype Prototype library for Rico, I've been leveraging it in JavaScript that I write.  In doing that I've found these Prototype developer notes very helpful and thought that I'd pass them on:

http://www.sergiopereira.com/articles/prototype.js.html

Note the drop down in the upper right corner where you can get other translations/versions like:
http://www.sergiopereira.com/articles/prototype140.js.html

Larry Sand

Pages: [1] 2