Secure Url
-
The web application has a link button which when clicked uses the ID in session and opens ID.doc in another machine. Here is how I access http://TestApp/MainPage.aspx, I get the link button and click it and ID.doc opens. Also, am able to open http://TestApp/Docs/ID.doc [this is the virtual directory path where all the ID.docs reside] The user should not access http://TestApp/Docs/ID.doc [^] Do you have suggestions on how to do this?
------------------------------------------------------------ "The only true wisdom is in knowing you know nothing." --Socrates
-
The web application has a link button which when clicked uses the ID in session and opens ID.doc in another machine. Here is how I access http://TestApp/MainPage.aspx, I get the link button and click it and ID.doc opens. Also, am able to open http://TestApp/Docs/ID.doc [this is the virtual directory path where all the ID.docs reside] The user should not access http://TestApp/Docs/ID.doc [^] Do you have suggestions on how to do this?
------------------------------------------------------------ "The only true wisdom is in knowing you know nothing." --Socrates
What you can do is to place the file outside of the wwwroot directory, and then stream it to the user when needed. That way the user won't be able to access it directly through a URL.
Pete Soheil DigiOz Multimedia http://www.digioz.com
-
The web application has a link button which when clicked uses the ID in session and opens ID.doc in another machine. Here is how I access http://TestApp/MainPage.aspx, I get the link button and click it and ID.doc opens. Also, am able to open http://TestApp/Docs/ID.doc [this is the virtual directory path where all the ID.docs reside] The user should not access http://TestApp/Docs/ID.doc [^] Do you have suggestions on how to do this?
------------------------------------------------------------ "The only true wisdom is in knowing you know nothing." --Socrates
If you want the sample, you can check-out this link http://www.codeproject.com/KB/aspnet/Protect_files_to_downloas.aspx[^]
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
-
If you want the sample, you can check-out this link http://www.codeproject.com/KB/aspnet/Protect_files_to_downloas.aspx[^]
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
Michael Sync wrote:
If you want the sample, you can check-out this link http://www.codeproject.com/KB/aspnet/Protect\_files\_to\_downloas.aspx\[^\]
I guess a simple
HTTPHandler
approach would be better than this. What do you say ?All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
Michael Sync wrote:
If you want the sample, you can check-out this link http://www.codeproject.com/KB/aspnet/Protect\_files\_to\_downloas.aspx\[^\]
I guess a simple
HTTPHandler
approach would be better than this. What do you say ?All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
N a v a n e e t h wrote:
I guess a simple HTTPHandler approach would be better than this
Yeah. HTTPHandler is much easier than that. no need to touch the IIS setting and just can be done via web.config. but I haven't tried it before..
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
-
N a v a n e e t h wrote:
I guess a simple HTTPHandler approach would be better than this
Yeah. HTTPHandler is much easier than that. no need to touch the IIS setting and just can be done via web.config. but I haven't tried it before..
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
Thanks. Took HTTPHandler approach.
------------------------------------------------------------ "The only true wisdom is in knowing you know nothing." --Socrates