Alright, it was a permissions problem!
First, for my ASP.NET site to work, I had to do this in the IIS administration app, some days ago:
- Click on your website node.
- In the right panel, click on the 'Basic Configuration...' link.
- Click on the button "Connect as...".
- Choose "Specific user", and chose one which has Administration privileges.
(I mention this, in case the above has some effects on the thing I had to do below.)
Now, to solve my issue, I had to change the permissions of my folder (where I had my website written in the disk: C:\Users\knocte\Documents\Visual Studio 2012\Projects\SolutionFoo\ProjectFoo
).
- Go to
C:\Users\knocte\Documents\Visual Studio 2012\Projects\SolutionFoo
- Right click on 'ProjectFoo' folder -> Properties -> Security.
- Click the "Edit..." button.
- Click the "Add..." button.
- Write "IIS_IUSRS", click "Check names".
- Click "Accept" many times.
Refresh the page in your browser, now static files should work.
(You might also find trouble with the Temporary ASP.NET Files
system folder, in which case look here.)