I am consuming the odata source from radzen in a winforms client.
I added the authorization on the server controller
``.
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
namespace [ApplicationName].Controllers.[DataSourceName]
{
[Authorize(AuthenticationSchemes="Bearer")]
public partial class OrdersController
{
}
}
Now I am not able to consume the data after this.
I used Odata connected service, with this code I am able to consume data wihout security:
var serviceRoot = "http://localhost:8000/radzenapp/odata/database/";
var context = new Default.Container(new Uri(serviceRoot));
List<AufgabenSet> aufgabenSets = context.AufgabenSets.Take(20).ToList();
Maybe there is a code snipte for the authorization in winforms client?
Thanks.