Blazor kodu
var configuration = FaturaServiceConfigurationFactory.Create();
configuration.ServiceType = ServiceType.Prod;
configuration.Username = "xxxxxxx";
configuration.Password = "xxxxxxx";
FaturaService faturaService = new(configuration);
faturaService.GetToken().Wait();
Alınan Hata
Access to fetch at 'https://earsivportal.efatura.gov.tr/earsiv-services/assos-login' from origin 'http://localhost:5120' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Blazor kodu var configuration = FaturaServiceConfigurationFactory.Create(); configuration.ServiceType = ServiceType.Prod; configuration.Username = "xxxxxxx"; configuration.Password = "xxxxxxx"; FaturaService faturaService = new(configuration); faturaService.GetToken().Wait();