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 ... 4 5 [6] 7 8 ... 23
76
Yes, it looks like a 200 to me, Jeff. ;)

Also try using the Logging tab (top row, to the right of the Atomic Time Server).

And try using parameters to get actual data from your API (I can't tell what you're getting back in your pics).  It should be the same.

That netDemo app is a good trouble-shooting tool to keep in mind.

Cheers,

Jane

77
Web Server - Ask For Help / Re: Display field using file tag?
« on: October 12, 2022, 03:18:43 PM »
Thanks, Bruce.  Good to know.  I looked through the docs here and didn't find anything.

Cheers,

Jane

78
Two quick suggestions, Jeff.

1. Compile the Web77 client/server demo. Run that. Look at the Response tab on the client when you make a request.  (Mine shows a 200)

You could then adapt the client app to point at your actual server.

Or

2.  Compile the NetDemo app and use the Web Client to connect to your API.  The Logging tab in the Web Client will show you what's sent and received.


79
Web Server - Ask For Help / Display field using file tag?
« on: October 11, 2022, 05:14:46 PM »
Question (12.46)

NetWebForm template.
Creating a Display field.
On the Display tab, there's a droplist at the top cunningly called Display.
One of the options in the list is "File Tag <!--Net:f"

If I choose that and put into the Text field:
'<!-- Net:f:/staticText/textNewAudit1.htm -->'

it goes through NetWebServerWorkerBase.LoadTagFile and looks for a file with that name.  And none of my files are named Net:f:whatever.

If instead I enter:
'/staticText/textNewAudit1.htm'
it works fine.

As does:
'staticText\textNewAudit1.htm'

Is this the expected behavior?  I just found the "File Tag <!--Net:f" placeholder confusing.

Cheers,

Jane

80
It's pretty much the same as using any non-LetsEncrypt certificate.

On the Security tab on the Settings tab of the web server
1. Put something in the "CA Account" entry.  On some servers I literally just have the word "something"
2. In the "Domains" box, put your domain name.  Do not put the star or any prefix.  If your wildcard is for *.propergary.com just put propergary.com

Next question is what format of certificate and private key you have.  You need both.  If the client just gives you the certificate he's purchased it won't have the private key and won't work.  If it's in PFX or PEM format it will contain the private key but you'll need to split it into separate certificate and private key files using OpenSSL.exe
This incantation should work:
Code: [Select]
Openssl pkcs12 ?in MyDomain.pfx ?nocerts ?out MyDomainEncrypted.key
Openssl rsa ?in MyDomainEncrypted.key ?out MyDomain.key
Openssl pkcs12 ?in MyDomain.pfx ?clcerts -nokeys ?out MyDomain.crt

Note that the second step in this process will create an unencrypted private key file.  That was necessary for NetTalk 11 and below and out of habit I still do things that way. NT12 supports a password on the private key but I haven't done it that way yet.

The files you've create from your wildcard certificate need to go in the Certificates folder inside your app's web folder.
They need to be named the same as what you put on the server's configuration page:
propergary.com.crt
propergary.com.key

Read the documentation here:  https://www.capesoft.com/docs/NetTalk12/NetTalkWebSecure.htm
If your app may be accessed by phones or chromeboxes I've found it's important to have the full certificate chain included (see the stuff about intermediate certificates in that link).

HTH

Jane



81
Web Server - Ask For Help / Re: NT Webserver Freezing
« on: September 29, 2022, 07:25:58 PM »
If you've paid for the CIDC2020 content, the first thing I'd recommend would be to watch Rick Martin's session on Preventing SQL Disconnections and see whether his approach is something you'd want to try.

https://www.cidc2020.com/IndexPage

82
Web Server - Ask For Help / Re: NT Webserver Freezing
« on: September 29, 2022, 05:16:08 PM »
SQL or TPS?

83
Web Server - Ask For Help / Re: Net Service Method XML code problem.
« on: September 29, 2022, 05:15:30 PM »
Attached is a wizarded app that illustrates the problem shown in my prior post (works fine with xfiles 3 but has the extra xml version line with xfiles 4).

This does not illustrate the problem in my first post - which happens with the web77 example.

Jane

84
Web Server - Ask For Help / Re: Net Service Method XML code problem.
« on: September 28, 2022, 04:40:17 PM »
Another XML issue.  A net web service method in one of my own apps.

The only hand-code is to build a queue.

Then the template code is set to return the queue. 

With XFiles 4.03 or 4.03, an additional <?xml version="1.0" encoding="utf-8"?> line is added somehow.

I've rolled back to 3.26 and all is good again.

This is the XML I get with version 4:

Code: [Select]
<?xml version="1.0"  encoding="utf-8"?>
<prtg xmlns="system">
<?xml version="1.0" encoding="utf-8"?>
  <result>
    <channel>sqlResponse</channel>
    <value>20220928</value>
    <channel>sessions</channel>
    <value>0</value>
    <channel>maxSessions</channel>
    <value>1</value>
    <channel>connections</channel>
    <value>2</value>
    <channel>maxConnections</channel>
    <value>6</value>
    <channel>threads</channel>
    <value>1</value>   
  </result>
</prtg>

85
Web Server - Ask For Help / Net Service Method XML code problem.
« on: September 27, 2022, 04:32:33 PM »
I think some template is getting confused.

Fresh install of NT 12.46.
Example Web77.

With XFiles 4.03/Reflection 1.13 it WILL compile.

Run corresponding client app.
Date method rest(get) works for receive format xml and json.

dbCustomer method REST get works for json. Make same request for xml and the server throws an exception -
xfiles.clw:2603 - XFILESSTREAM.EXTRACTNAMESFORSAVE is second item down on the call stack.

dbCustomers method throws same exception.

Through web browser interface, going to documentation page (http://127.0.0.1:88/Database?dbCustomer) shows "Error in site JavaScript" in browser and same exception on server.

Update XFiles to 4.04.  Refresh classes.
Now web77 will NOT compile (complains about the removed DONTREPLACECOLONS property). The only way I was able to get it to compile was to remove XML as a return type for each service.  Is there something I need to update to make the example work?

Jane

86
Web Server - Ask For Help / Re: SecWin example app with Active Directory
« on: August 27, 2022, 02:30:08 PM »
Thanks for fixing the Active Directory username/password login in 7.36, Bruce.

87
Web Server - Ask For Help / SecWin example app with Active Directory
« on: August 20, 2022, 06:04:21 PM »
Hi, Bruce,

As mentioned in my earlier email today, I?m just dipping my toe into SecWin. I?m using the web88 example (since I couldn?t get the other SecWin example web51 to compile.)

I?m able to do local user logins with this example.  But when I switch the login type for the company to Active Directory, it doesn?t work.

I put a trace statement in the ActiveDirectory_ValidateUser procedure and that never gets called.

In secwin.clw the code runs through SecwinLoginWebClass.StartLoginType, hits the CASE of sw:ActiveDirectoryLoginUserPassword condition, and from that calls to SecwinLoginWebClass.ShowLoginAndPasswordTab. 
But that SecwinLoginWebClass.ShowLoginAndPasswordTab method is empty. 
Is it overridden somewhere?  What should be calling the ActiveDirectory_ValidateUser procedure?

I think I'm probably missing something basic.

??

Jane


88
Web Server - Ask For Help / Re: WebService Method, security
« on: August 15, 2022, 11:07:57 AM »
Hah!  Busted by The Master, Jeff  ;D

A web service request isn't going to be hitting your login form.

How long would it take you to cut your existing code out of the login form and to paste it verbatim into the p_web.Authenticate procedure in the webHandler?


jf

89
Web Server - Ask For Help / Re: WebService Method, security
« on: August 14, 2022, 03:27:31 PM »
Jeff,

My question would be why you'd want to access a netWebService from a browser.  That's not how it's supposed to be used.  ? ? ?

That said, my little test with the Web77 example does accept the password from Chrome.  To avoid caching questions, I close Chrome entirely between tests.  In the second pic, you can see that the username/password was passed in as basic authentication.

jf



90
Web Server - Ask For Help / Re: WebService Method, security
« on: August 13, 2022, 09:59:06 AM »
Jeff,

Some suggestions.

1. Compile the web77 example - both the client and web server.  Verify that fetching the date works.
2. Open a browser and verify that you can access the date from the web service documentation or a URL in a web browser.
3. Change the Date NetWebServiceMethod: on the Security tab, mark the "User must be logged in" and "Delete Session immediately" checkboxes.
4. In the WebHandler procedure, go to the existing filled embed and change the first line to    if pUser = 'demo' and pPassword = 'demo'
5. Compile and run.  Verify that now the web77 client app fails to fetch the date.  A browser pops open its login window.
6. Open your browser to 127.0.0.1:88, use the Services menu.  System.  Date.  You should be able to type in the user name and password and have it work.
7. Compile the netdemo program.  Run it and open the Web Client window.   On the Authentication tab, select Basic authentication and put in the username and password.
8. On the Address tab, put in the address box: http:/127.0.0.1:88/date
9. Fetch should work.  So should using the Generic Post tab.

That web client is handy to use to figure out what you need to do to make your own code work.  You can open the Logging tab to look at what's sent/received.

If you're not running your web server as a service, you can also look at the Log tab on the web app's window  to help trouble-shoot.

I think that when you're testing this it's important to have the Delete Session immediately marked to avoid muddling what works with what doesn't.  I generally leave it marked for service methods anyway.

Good luck!






Pages: 1 ... 4 5 [6] 7 8 ... 23