I looked at role-based security, and I found that adding
<location path="StaticPages">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
the web.config file worked like a charm! It blocks all users who are not logged in to the website.
source
share