UPDATE: Since I wrote this post, I've given a presentation on Astoria, with an updated Forms Authentication example. This post has a link to the slides and demo code.
As I was playing around with ADO.NET Data Services, I was having some trouble getting the services to work in my forms authentication enabled site. every time I tried going to the service, I kept getting redirected to the login page. Even if I was already logged in.
First thing I tried was using the location node in the web.config to exclude my service. That didn't work. Then I tried changing my authorization node to allow all users. That still didn't work. The only thing I could get to work was to remove the forms authentication node all together.
Obviously, removing security from my site wasn't an option, so I started to poke around in Reflector a bit. Still no dice. I had no luck finding anything that could possibly be checking forms authentication and trying to redirect to the login page.
So, one thing I thought I'd try is adding some information into the web.config serviceModel node. I had been wondering how that node interacted with Astoria, because in my experience with WCF, the service configuration nodes are extremely important. So, I thought I'd toss in some really basic info to the config and see if that did it. So, I put the following in my web.config.
And as you can guess (or not), that worked like a charm. Hopefully someone from the ADO.NET team has a look see to see why this is the case.