title: ASP.NET - Check Session Before Opening a File
body: <p>My question is, Can I Check session before allowing user to view a file, e.g:</p>
  
  <p><a href="http://www.somedomain/pdf/dummy.pdf" rel="nofollow">http://www.somedomain/pdf/dummy.pdf</a></p>
  
  <p>When user clicks on this url I want to check whether the session is valid or not, If session is valid allow user to view/download the file otherwise take the user to Login page.</p>
  
  <p>Thanks.</p>