Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Session specific files
#1
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
Reply
#2
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.
Reply
#3
(03-24-2018, 07:27 PM)DanielFields Wrote: 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.

Thanks Daniel for your reply. Do you have any idea if I'm using a separate html page called from withing the IW app is going to have access to these files stored at either wwwroot\files or WebApplication.UserCacheDir?
Reply
#4
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?
Reply
#5
(03-24-2018, 09:12 PM)DanielFields Wrote: What kind of files are you working with?  How are you presenting them to the user?  Where does the web page live?


Hi Daniel,

Apologies for the delayed reply. I tried accessing the data through the wwwroot and it worked. I present the HTML page through the iFrame, and the webpage resides now inside wwwroot.

Thank you for your help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)