Click here to Skip to main content
15,921,174 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Sir/Mam

I want to encrypt my redirect path in browser URL, so user can not notice the actual path of files.

Is it possible in asp.net 2.0, using c# ? If it is possible please help me.


With regards

Ranjan Pati
Posted

You can simply make a page that takes an argument like "www.mypage.com/download.aspx?file=somefile.zip" and let this page handle the request. If you want to ensure that people can't share this link directly to someone else you could create a simple database table that holds a number and a time (max time valid) and when the user requests a file it will add a record to the database and when actually reaching the "download.aspx" you simply delete the record and give the requested file. If the number doesn't exists you redirect them to some page you like. Be sure to cleanup the table regularly to clear added records that where never used.

Good luck!
 
Share this answer
 
Yes, it is possible. You need to read about URL Rewriting.

Read about it here: MSDN: URL Rewriting[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900