I've followed Steve's great series: http://www.dnnsoftware.com/Resources/Wiki/loc/print/Page/Windows-Communication-Foundation.aspx
But he's just relying on throwing Exceptions that all return 400. Maybe I'm just getting snooty but I'd like to return the right response code too since it is REST. (Disclaimer - this is my first REST project)
That being said - I found to use the WebFaultException in System.ServiceModel.Web - and If I pass HttpStatusCode.Unauthorized - the response (using Fiddler) is actually a 302 - Object Moved - and then redirects to the login page.
ANY idea how I turn that off? Is this a DNN setting catching it?
To get around it I'm currently just using 400 Bad Request - which is the same as throwing a regular exception - just no "Yellow Screen Of death" - just my string is passed "Bad Password", etc.