The sharepoint site doesn't allow anonymous access and uses forms authentication, however I have custom page in "_layouts/" that anonymous users need to be able to access.
I thought it would be enough to add a <location></location> tag in the web.config with the correct path that allowed anonymous access (<allow users="*" />), however, this seems to have no effect.