views:

73

answers:

3

Hi,

I'm creating an application that is able to generate xml licenses. The application is secured by forms authentication. Now the problem is that if I create a physical xml file that file can be downloaded even with the security enabled.

How would you guys secure this license file?

+2  A: 

You could put it in the App_Data folder.

Darin Dimitrov
Yes, best option.
Henk Holterman
it should still be accessable for the authenticated users though
Sem Dendoncker
Then you could write a custom http handler that serves this file to authenticated users by checking the `context.User.Identity.IsAuthenticated` property first.
Darin Dimitrov
A: 

Use encryption in your XML file?

Ben Fransen
+1  A: 

Don't know about asp.net, generally though, I'd just create the file someplace in the filesystem which is not accessible through the web, and if needed, relay it through your application, previously checking authentication...

x3ro