'Firestore not allowing clear text but yet using google sdk for .net
I am using google FireStore as the database as it allows for off line syncing However I am running into this issue with the get command. I no its usually down to https but as I am using the google sdk should that be taking care off?
Error I am getting is
One or more errors occurred. (Cleartext HTTP traffic to MYExtIPAddress not permitted)'
Bare in mind I am using the spark plan unless that doesnt come with https but I would have assumed it did.
I am using the following to access the client
My Using
using Google.Cloud.Firestore;
public const string ProjectId = "mysecretproectId";
FirestoreDb db = FirestoreDb.Create(mysecretproectId);
public async Task<List<InvoiceHeader>> GetInvoices()
{ List<InvoiceHeader> invoiceHeaderList = new List<InvoiceHeader>();
InvoiceHeader invoiceHeaderAll = new InvoiceHeader();
try
{
Query invoiceHeaderQuery = db.Collection("InvoiceHeader");
QuerySnapshot employeeQuerySnapshot = await invoiceHeaderQuery.GetSnapshotAsync();
foreach (DocumentSnapshot documentSnapshot in employeeQuerySnapshot.Documents)
{
Dictionary<string, object> header= documentSnapshot.ToDictionary();
string json = JsonConvert.SerializeObject(header);
invoiceHeaderAll = JsonConvert.DeserializeObject<InvoiceHeader>(json);
invoiceHeaderList.Add(invoiceHeaderAll);
}
}
return invoiceHeaderList;
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
