I have implemented a secure WCF Odata service as instructed on msdn: https://msdn.microsoft.com/en-us/data/gg192997.aspx
When i go to the Service on: http://localhost/MyOData/ODataService.svc/Orders
the authentication get's in the pipeline correctly and when i authenticate myself it is done correctly.
But then i get redirected to:
http://localhost/MyOData/login.aspx?ReturnUrl=%2fMyOData%2fODataService.svc%2fOrders
This does not return any data. Since i'm consuming this service from another tool it does not work. After authentication i should just go back to this URL: http://localhost/MyOData/ODataService.svc/Orders
I had to set
response.SuppressFormsAuthenticationRedirect = true;
on my response, redirection was disabled
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.