views:

46

answers:

2

I'm currently using the asp.net membership provider (with logins stored in db) to protect certain pages of my site. However, I also have non .aspx resources I wish to protect - word docs, excel spreadsheets, pdfs, etc. Is this even possible? If so how would I go about doing this?

thanks!

+2  A: 

The procedure is described here. And here. And here.

Sorry I'm just giving links and no code examples or description. It's too long an answer to post fully here.

David Stratton
+1  A: 

If you are running IIS 7 under the integrated pipeline (the default setup), all requests go through IIS. This means you have to do nothing other than setup your web.config. You'll need to do one little thing though, put the following attribute on the modules node under system.webServer:

<modules runAllManagedModulesForAllRequests="true" />

This ensures that the forms authentication modules run for your static content.

Keltex