c# - How can I authenticate static resources in virtual directory? -


i want authenticate user access virtual directory contains (mp4, swf, mp3, images, html , other static files). virtual directory used web application exists in different server. means below case:

server a: contains web application user can access using username , password , saved in session state.

server b: contains virtual directory contains static files.

i want give access virtual directory files if user logged in , authenticated in server a.

how can achieve , best practice ti achieve that??

ps: make aspx page or .ashx handler authenticate user , make response.write file have problem streaming concept , face problem in swf files embed element doesn't work fine when gave src=handler.aspx?file=a001.swf

storing authentication state in session state, of session state set sql server (instead of inproc). http://msdn.microsoft.com/library/ms178586.aspx might useful.

this way, server can perform authentication function , store authentication status session object (which stored in sql server) , when user access server b, server b can check session state confirm authentication status before allowing access file. can either url rewrite point "authentication checker" program instead of static file directly. if "authentication checker" confirms authentication ok, stream actual static file client.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -