Posts: 46
Threads: 19
Joined: Mar 2018
Reputation:
3
Location: US
03-24-2018, 07:08 PM
(This post was last modified: 03-24-2018, 07:09 PM by mhammady.)
Hello,
I have files stored in the DB. Those are confidential files, and we need to make them available ONLY to the user with a session. We don't want them to be available to other users who can track the URL traffic.
Is there is a way to store these files I a place only accessible to the genuine user with a valid session with IW 14.2.7?
Thank you
Mohamed
Posts: 19
Threads: 1
Joined: Mar 2018
Reputation:
4
Location: SPokane Valley, Washington
If you place them in the wwwroot\files folder, or any subfolder under that, they cannot be accessed without creating a session. You could also export them on-demand into the UserCache. Doing it that way would make them temporary, and they would get deleted after use. The UserCache is not accessible through any means but your application.
WebApplication.UserCacheDir gets you a unique folder for each session.
Posts: 19
Threads: 1
Joined: Mar 2018
Reputation:
4
Location: SPokane Valley, Washington
03-24-2018, 09:12 PM
(This post was last modified: 03-24-2018, 09:13 PM by DanielFields.)
If it's another form, it will have access. If it's an actual HTML page, it would depend on how you link to the files. For example, if you are dynamically building the page, you could embed those resources into the page. You could use WebApplication.UserCacheUrlBase to create URL links to images, or whatever else you are trying to access.
What kind of files are you working with? How are you presenting them to the user? Where does the web page live?