views:

103

answers:

2

What entries in a web.config could allow certain files to become publicly accessible after a certain date and time? Specifically, we have these files starting with AB_.jpg where the _ could be anything. We put them in a folder on April 27th for example, but they shouldn't be accessible until April 30th at 11:59:59 PM.

I think the web.config in part works like Unix's FTP .htaccess file to define file security.

For example, this web.config entry allows directory browsing:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <directoryBrowse enabled="true" />
    </system.webServer>
</configuration>
+2  A: 

AFAIK, there is no configuration element in web.config that will let you control access to files or folders based on date or time. In order to achieve that, you would need to code that mechanism yourself.

Thomas
+1 correctomundo
Sky Sanders
+2  A: 

You could use a custom HTTP module to enforce this kind of security. The module lets you see the incoming request and change its default behavior.

David
+1 correctomundo
Sky Sanders