Json – C# HTTPClient Response Logging
I have the below code which I am using to send JSON data to an API using HTTPClient. I want to log the HTTP response/status code such as 200, 201, 400 etc. Please can someone assist me with how to…
I have the below code which I am using to send JSON data to an API using HTTPClient. I want to log the HTTP response/status code such as 200, 201, 400 etc. Please can someone assist me with how to…
I am building an app using unity2022.3.11. The error "The type initializer for 'Firebase.FirebaseApp' threw an exception" is occurring in this code when launching on an Android device after build. await FirebaseApp.CheckAndFixDependenciesAsync(); What is the cause of this error? Is…
I'm working with C# and ASP.NET Core 7. I'm triying to get the hashed password from my database to verify a login request. The problem is that the value "storedPasswordHash" is always the same no matter the userId is passed.…
I am looking for the fastest way (in C#/ASP.NET) to detect if anything inside a folder has changed between two points in time. I don't need to know the files, total size, or anything else about the folder. I just…
I am not understanding how to use this NuGet package manager in Visual Studio 2019 I installed the Grpc.Tools package from Nuget package manager. I clicked the checkbox next to the package on solution, But it shows there is no…
I was using Firebase cloud functions in Unity2022.3.11 and got an error "USE_AUTH_EMULATOR not set." and froze. What is this and what is needed to prevent the error from occurring? Unitypackage has been installed. And written codes like that. FirebaseFunctions…
I am trying to get a list of app services in Azure using the following , in a winforms app. string clientId = "your_client_id"; string clientSecret = "your_client_secret"; string tenantId = "your_tenant_id"; string subscriptionId = "your_subscription_id"; var credentials = SdkContext.AzureCredentialsFactory.FromServicePrincipal(clientId,…
I want to be able to execute javascript code in my back-end .NET API, so I tried following these steps and I created a .NET API as follows: using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Linq;…
I'm working on a .NET 6 application that includes multiple projects (web, services, data), and I'm trying to containerize it using Docker. I've organized my Dockerfile and project structure as follows: FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE 80 EXPOSE…
@pname is the parameter set in C# code by: using (MySqlCommand dynamicQueryCommand = new MySqlCommand(dynamicQueryWithParameter, conn)) { dynamicQueryCommand.Parameters.Add("@pName", MySqlDbType.String); dynamicQueryCommand.Parameters["@pName"].Value = "John"; using (MySqlDataReader dynamicQueryReader = dynamicQueryCommand.ExecuteReader()) { string output = ""; object[] values = new object[dynamicQueryReader.FieldCount]; while (dynamicQueryReader.Read()) {…