I have a site which runs fine on my local dev machine (don't they all!). All pages on the site sit behind a forms authentication login. When I am logged in and go directly to a page, for example mysite.com/en/brand/page1 there is no problem.
If I am logged out and try and access the same page rather than being redirected to the login page with the returnurl set to /en/brand/page1 a basic authentication window appears. On cancelling out of this window I get the error "401.2.: Unauthorized: Logon failed due to server configuration." Interestingly, the returnURL property is set to "Templates/MySite/Pages/folderview.aspx" rather than the FURL.
Has anyone come up against this? I'm guessing its an IIS configuration issue rather than anything within EPiServer which I need to configure. Any suggestions would be brilliant.
You've turned on Windows Basic Authentication in IIS?
I don't think that is it. On further investigation, it appears that the URL rewriting module is performing some action when converting from external (friendly) URL to internal URL that requires specific permission on the web server. If I set the urlRewrite defaultProvider property in the web.config to EPiServerNullUrlRewriteProvider forms authentication works as expected, setting the correct returnURL property.
Does anyone know what the default EPiServerFriendlyUrlRewriteProvider might be doing that requires permissions on the server?
It appears that in the process of the conversion from Internal to External and visa-versa, EPiServer's URLRewrite module requires permissions on the folder in which the physical file sits (in my case /Templates/MySite/Pages).
To test this I added a web.config file granting permission to anonymous users to the folder /Templates/MySite/Pages and the my login now redirects as expected.