Any help at all to give me some sort of direction?
I think you’re missing the semicolon ; at the end of the statement so try:
The semicolon is optional
See Page Not Found — Xojo documentation
Edit to add: in the latest Xojo, you have to do this server-side, not inside a Session event.
Here’s some code I wrote to force all users offline:
// the method needs to run outside this current WebSession, so we use a timer to get it to run on the App's main thread:
Timer.CallLater(1, AddressOf app.ForceUsersOffline)
Public Function ForceUsersOffline()
// forces all users to the offline status
system.DebugLog "*** Forcing all users Offline, except for administrators"
For i As Integer = 0 To App.SessionCount - 1
dim sess as session = App.SessionAt(i)
// don't kick administrators offline
if sess = nil or sess.isAdministrator then // isAdministrator is my own function
// Without creating a WebSessionContext here, creating
// the page would fail triggering a SessionNotAvailableException.
Var context As New WebSessionContext(sess)
// Because we have a context, we can create a new
// WebPage and assign it to the session.
context.Session.CurrentPage = new wOfflineWebpage
// the end result is the user is sent to the new page
// you could also do something else, such as
dim wp as WebPage = context.Session.CurrentPage
if wp isa WebPage1 then