Click here to Skip to main content
15,921,276 members

Comments by guptaritu (Top 5 by date)

guptaritu 14-Dec-21 4:51am View    
No exceptions no errors but not getting the file which is stored in bucket
for example
bucket1\\bucket2\\abc.csv
I want to read abc.csv file.
guptaritu 24-May-21 6:29am View    
how?
guptaritu 24-May-21 5:51am View    
i tried this:

string baseValue = System.Configuration.ConfigurationManager.AppSettings["Base_GDL_Matltrans"];
string relVaue = System.Configuration.ConfigurationManager.AppSettings["Relative_GDL_Matltrans"];
searchURL = (string)baseValue.Concat(relVaue);
guptaritu 19-May-21 12:15pm View    
this is my modified code

HttpClient client = new HttpClient();
client.BaseAddress = new Uri(url);

client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

HttpResponseMessage response = client.GetAsync("https://csi10a.erpsl.inforcloudsuite.com/IDORequestService/ido/load/ue_GDL_CustAddrs").Result;

if (response.IsSuccessStatusCode)
{

var user = JsonConvert.DeserializeObject<list<ue_gdl_custaddrs>>(jsonString);


IEnumerable < ue_GDL_CustAddrs > Addr = response.Content.ReadAsAsync<ienumerable<ue_gdl_custaddrs>>().Result;
foreach (var p in Addr)
{
Console.WriteLine("{0}\t{1};\t{2}", p.Name, p.Addr1, p.Addr2);
Console.ReadLine();
}
guptaritu 19-May-21 12:13pm View    
initally i have json file in which some get methods are defined and i don't have database and i want consume web api in asp.net core console application and read json file from json file and send data to database.
url which i have passes in main method (which is access through postman, impport the json file in postman and retrieved some GET methods).

i have send the url through main method but got an exception

One or more errors occurred. (Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.IEnumerable`1[Englert_Ewarranty_QAD_Integration_Details.ue_GDL_CustAddrs]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<t>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'Items', line 2, position 10.)'