views:

174

answers:

2

hi guys,

We have a swf file that we want to secure and make available only to authorized users.

I embedded the file in an aspx page and that works fine, since ASP.NET handles the aspx page, I can use ASP.NET authorization features and in the web.config restrict the access to roles="AllowedUsers" for example.

However smart users could still get to the file by accessing directly for example www.mysite/flash.swf. We want to make that kind of access secure.

Any help would be greatly appreciated!

Thanks!

+1  A: 

I think that the most easy and fast solution is to Map this extention (.swf) to handle by asp.net.

I do not know if its works, because I do not have done that, but you can give it a try.

One other way is to place this files, somewhere hidden, or with complex name, and use an .ashx file to just read and send them. In the .ashx file you need to set the correct Response.ContentType for the flash, and just read and send the correct file.

Aristos
+1  A: 
elsharpo
thanks for sharing the code +1 for that.:)
Aristos