User access logging

Hi,

I have a Blazor Application using Windows Security.

Are there any events raised or is it possible to put code in anywhere to allow me to log a record to a SQL table when a user first accesses the application. I'd like to keep a record of all users having accessed the system and the time they did so but, I'm struggling to find where I can put the relevant code.

I've tried adding code into the Page Load event of the start page of the application which works fine unless the user accesses the system using the URL to directly access a different page. I guess I could put the code in every Page's Page Load event but that's not a particularly neat solution.

1 Like

You can probably use the Load event of the Main Layout. It will be executed only once.

1 Like

That worked - thank you for the suggestion!

1 Like

Sir, Please the Code that you used to Record the log Data into your Database...

I'm also trying to save the save information that you have tried to save...

please HELP...