For kicks, I built a picture frame that should access the photos stashed on the "upstairs" computer.
It turns out the Windows does not make this easy. Or, perhaps, my background meant I found it harder to do than I think it ought to be.
This is a three step process:
- Install IIS ("Internet information server")
- Configure the site
- Add a
web.config
file.
I didn't find any of these steps at all obvious.
Open the control panel and navigate to Programs and Features
(Control Panel
\ Programs
\ Programs and Features
):
Click on Turn Windows features on or off
and, within the dialog that opens, find Internet Information Services
:
You need to enable:
Web Management Tools
\IIS Management Console
Common HTTP Features
\Static Content
Common HTTP Features
\HTTP Errors
(not strictly required, but I found the diagnostics really helpful)
start IIS Manager (I just searched for it in the Windows search menu), and edit the default site:
First, change the path so that it points at your pictures directory (right click the site, select advanced settings, and set the Physical Path
Then, right click the site and Edit Permissions
. You need a user: IIS_IUSRS
(and you will need to select Edit
to make the change).
In the root of your web site:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>Why
</httpProtocol>
</system.webServer>
</configuration>
That should be that. Point your browser at a specific file at http://localhost
and you should be good to go!
NB NB: I did not enable add the IIS configuration that allows directory browsing, so you will need to be specific about the files you are after.