开发者

protecting non .aspx pages with Asp.net Membership provider

开发者 https://www.devze.com 2022-12-27 13:06 出处:网络
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 spread

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开发者_Python百科 this even possible? If so how would I go about doing this?

thanks!


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号