04-13-2022, 06:11 AM
(This post was last modified: 04-13-2022, 06:11 AM by Alexandre Machado.)
In general, static files (like images and videos) are served without any session validation.
Having said that, there are several ways to accomplish that, but I would use a TContentHandler to deal with that.
I would register a content handler for a specific url/path (example LoginResource) and then I would request it like
$.get("/LoginResource", xxxxx);
The LoginResource content handler have full access to the session object and the request. It can just decide based on those, which file it will serve. It can also skip the "serving file" part and just redirect to a specific file in your wwwroot folder. In this case it your content handler would descend from TContentRedirect. The code is relatively short and straightforward.
Are you familiar with content handlers?
Having said that, there are several ways to accomplish that, but I would use a TContentHandler to deal with that.
I would register a content handler for a specific url/path (example LoginResource) and then I would request it like
$.get("/LoginResource", xxxxx);
The LoginResource content handler have full access to the session object and the request. It can just decide based on those, which file it will serve. It can also skip the "serving file" part and just redirect to a specific file in your wwwroot folder. In this case it your content handler would descend from TContentRedirect. The code is relatively short and straightforward.
Are you familiar with content handlers?

