How can I implement an API Server with MVC
Got the solution
Delay in receiving emails using MailJet
I am using MailJet to send emails over SMTP Server. On one environment, I am not facing any issues but on another environment, there is a delay in receiving those emails after some time. What could be the possible issue?. The configurations on both the…
Asp.Net Web API – Bearer Token Authentication Problem with BasicAuthenticationAttribute
Hello, I have an ASP.net Web API that is working with BasicAuthenticationAttribute. I want to add bearer token-based authentication to one of my controllers. I added those NuGet packages: Microsoft.AspNet.WebApi.Owin Microsoft.Owin.Host.SystemWeb …
How to optimize Web API Code?
How could you optimize that code for faster response? public ActionResult Details(int id) { DTOLibrary.PoliticianDTO politician = null; using(var client = new HttpClient()) { client.BaseAddress…
Publish .Net 6.0 Web api on IIS
For a new project I would like to use the new .Net 6.0 framework for the web api. I have build the first piece and it run well on the IIS Express and running from command line on my developer machine. When I try to publish it on IIS I receive the…
Request.GetClientCertificate sometimes returns incorrect information in Web API
I have a .Net 4.6 Web Application running on IIS which reads smart cards to get user information. In the beginning the application was working fine but after a few days other user's card information was showing up for different users. For example someone…
Calling and getting results from asynchronous methods in encapsulated class
I am developing a GUI application that interacts with a control system's REST-based API via an HttpClient, but in trying to encapsulate the HttpClient and its related functions (GET/POST/PATCH) in a separate class, I'm finding that the GUI form cannot…
How I integrate web API into my ASPx (VB) Project, Post/Get response values
Hi I'm a very beginner for web API concepts, I am developing web apps using VS2019 with VB, I have enclosed (sample api) my partner web api, I request you to how I integrate this into my aspx web, how I pass values from my Aspx page to API and how I…
how can i save data from api(json file) in sql server?
I'm a beginner and my task is to retrieve data from API and then read retrieved file and then insert into SQL server. I have retrieved data by JavaScript but Now I want to place it in SQL server by using C# . how can i do it
Request matched endpoint 405 HTTP Method Not Supported
0 This sound simple I just change from post to get but the do not help. I am trying to make a login against ADF2016 and when I am getting redirected back, I get this error in my backend. Now I have tried all changes I can think of so it time ask a…
OnPrem B2C API calling another B2C API hosted on Azure
I have ASP.NET B2C web API which is hosted on OnPrem Server and this API is calling another B2C API which is hosted on Azure. Both the API in same B2C tenant. While calling Azure B2C API I am getting unauthorized error. Can you provide some samples…
Web API 2 : Returning binary file with “application/octet-stream” not working with IIS Server : IIS/10.0 but working with IIS/8.5
I have web api which returns binary file, which is consumed by Angular 12 client. Application is deployed on Dev and Integ environments. Now suprisingly, same api is working on Dev but not on Integ. When on Integ, instead of returning binary file, it…
Issues with API integration in VB Aspx web apps
Hi, I'm a very beginner on API integrations, developing apps using VS 2019 VB. ASPX, pls ref my code which is attached, im getting err., where I did a mistake please help me. Thanks in advance. 151024-api-docu.txt
How I get postal data by using web Api
Dear Friends, I am very beginner in the web API's segment, in my VB Aspx, I'm trying to get data by using URL: https://api.postalpincode.in/pincode/{PINCODE} (for Ex. https://api.postalpincode.in/pincode/110001) ref input field: <asp:TextBox…
StatusCode: 400, ReasonPhrase: 'Bad Request' - calling addCustomer web api via app
I have faced a connection error to azure from my developing xamarion forms app after I tried to add an email function of google SMTP to the app. I used my own google account's credentials to send email and allow Less Secure Apps in google account…
Web API addCustomer service faced error when connecting Azure Cosmos DB
System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Azure.Cosmos.CosmosClient' while attempting to activate 'CosmosWebAPI.Controllers.CosmosDbService'. I got the above exceptions when running the below api service in local…
Transfer data between SQL database servers securely by end to end service
Hi We have two SQL server databases in two different location that belongs to two different companies. I want to transfer a few table data (about a million records) from source database server to destination (Master) server. (Cumulative data of 30…
System.OperationCanceledException: The operation was canceled.
Good Day All i have the following code, that randomly throws the following error System.OperationCanceledException: The operation was canceled. // HttpClient is intended to be instantiated once per application, rather than per-use. See Remarks. static…
Misused header name. Make sure request headers are used with HttpRequestMessage, response
Good Day all i have the following code // HttpClient is intended to be instantiated once per application, rather than per-use. See Remarks. static readonly HttpClient httpClient = new HttpClient(); public async Task<List<USERS>>…
Java.Net.SocketException: Software caused connection abort
Good Day All i have the following code and it randomly gives an error on Android 11 Java.Net.SocketException: Software caused connection abort , not all the time , App Centre Reported it twice public async Task<List<USERS>> Get_All_Customers(…