NetTalk Central

Author Topic: Using Net:f:filename.html  (Read 3164 times)

Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
Using Net:f:filename.html
« on: March 17, 2013, 10:48:04 PM »
Hey all,

We've modified a couple of our portals that we have created for clients to use the <!-- Net:f:somefile.html --> to serve up static files in certain sections of a NetWebServer - e.g. for displaying a maintenance or a backup notice at the header of every web page served etc.

The idea behind extracting these snippets to an external file was so that we do not have to take down the server to change these notices, plus our clients can make changes to these snippets themselves to customise the messages without involving us.

Works great except it appears that NetWebServer LOCKS these htm files for the duration it is running, meaning we have to down the server to make changes to these files anyhow, defeating the purpose.

Is there any way we can get NetTalk NOT to lock these files unless used by a process?  A suggestion for a future upgrade perhaps?  Or is there another way around this problem?

Thanks,
Devan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Using Net:f:filename.html
« Reply #1 on: March 17, 2013, 11:47:20 PM »
Hi Devan,

In testing this to duplicate your issue I cam across a couple things which need cleaning up.
The first is that if the file is missing you get a Page not found error. That's wrong. It should just skip over the file.

The second is that if the file does not exist, then you create it, then it seems to end up being "locked" by the server. Once I ran the server a second time I was able to edit it freely without restarting the server. So it seems like the issue you're is limited in scope, so that it's only an issue if the server ran while the file was not there.

So I think you'll be ok in the short-term - as long as the file exists before the server starts. Yes?

update -- the issues I mentioned above have been fixed in 7.07

cheers
Bruce

« Last Edit: March 18, 2013, 12:11:28 AM by Bruce »

Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
Re: Using Net:f:filename.html
« Reply #2 on: March 18, 2013, 03:48:56 PM »
Thanks for checking this Bruce...

Yes, I did some more testing on this after I posted the original message, and under some circumstances I *could* edit the file whilst the server was running, so the scenario you mentioned makes sense.

Thanks for making the changes in 7.07.  I have kept all my sites to 6.51 at the present time, but over the next month or so, will be slowly upgrading them all to NT7...