Asp.net anti-hotlink example source code
By setting the domain name in web.config, you can control which domain names are allowed, set whether to download directly and whether to allow hot links.
<add key="Down" value="false"/>
<!--Whether to download directly-->
<add key="Valid" value="false"/>
<!--Whether hotlinking is allowed-->
<add key="Refers" value="codepub.com"/>
<!--Multiple allowed access sources are separated by half-width ","-->
<add key="DefaultRedirect" value="Error.htm"/>
<!--The page redirected by default-->
Expand