how to use localstorage in WEB API .net 6
Been googling for 4 hours now how to do this on WEB API, in .net6. how do i set a value in browser storage, and how do i retrieve it? like: Localstorage{"SomeID"} = "SomeValue" return Localstorage{"SomeID"}
asp.net web api one to many crud
I created the webapi to list all players https://github.com/KalyanAllam/Players I need code to 1)Get one player with id 2)Create a new player The player info will be sent in the body in JSON format: { …
C# .NET web.api json result get
I need to create an api and when invoked an endpoint to list the available players on http://localhost:3000/api/player/. I should get json result like [ { "id": 1, "name": "player name…
How do i insert web api data in to sql server database
I want to know how can i insert web api data into sql server database, I have written an web api and i want to insert the api data into sql server database and i do it without entity framework, Can i do it with data reader? I feel like I can't do it with…
Prevent browser authentication ASP.NET Web API dialog on 401
I have an existing ASP.NET Webforms / MVC application (it uses a mixture of technologies), to which I want to add a Web API to use for external ajax API calls (to replace older web services and WCF). The existing ASP.NET WebForms application uses…
Data Transfer Objects
I just have a quick question concerning DTO's. I read that DTO's are useful for security purposes e.g. they prevent you from sending confidential data across the network. But the tutorial also said that DTO's are also useful in the case that if there…
How to count/check number of connection pools
Im using a third party tool and also HttpClient to make some calls to get data. Most of the documentation states to have a single instance of third party tools for the HttpClient but how could i check how many open connections i have to determine…
how to make null values and empty element in xml have open tags and close tag? Asp.net web api 2
i am making a web api and i want to make the open tags and close tags for empty elements and null values. i am using C# and visual basic to code. My Questions: How to make open tags and close tags for null values and empty elements in xml format with…
how to compare two dates and show in the link in web api?
i have some question about getting date from previous between create_date and modify_date, i am working on asp.net web api 2 and i want to seach the date between these two dates from sql server, there are many records in database. The result outcome is…
Error Handling In Blazor Web Server Application
I am calling a web API endpoint from my Blazor server application. And I intentionally have not started the application (.Net Core 6 Web Api) with the api service. Meaning, there is no service listening on the specified port. And I was wondering what is…
How to prevent of Client Privacy Violation in Sensitive Data Exposure Asp.net core with angular 8
How to prevent of Client Privacy Violation in my code below <input type="password" id="txtPassword" name="txtPassword" #txtPassword="ngModel" placeholder="Password"…
Microsoft IIS BUG!!! , HTTP Service Request Queues Performance counter
Microsoft IIS BUG!!! , HTTP Service Request Queues Performance counter Why do I say there are bug,look at the pictures below, RejectedRequests has values from the monitor. Why CurrentQueueSize the queue have no values? HTTP Service Request…
problem with API
I have the following in my ApiController public IEnumerable<Game> GetAllGames() { Game game = new Game(); List<Game> Games = game.ListGames(); return Games; …
About the IIS site request queue length?
OS: Windows Server 2016 Standard IIS: Version 10.0.14393.0 Web Sites: WebIISQueueTest .NetFramework4.5 Asp.net mvc Question 1: By which performance counter does the site's request queue length be monitored? Question 2: The request queue…
Asp.net Web API - How to get JSON response body if status is 400 Bad Request
Hello Everybody, I have an ASP.NET Web API rest application. I am calling a 3rd party web service as follows; var request = (HttpWebRequest)WebRequest.Create(WebConfigurationManager.AppSettings["PinService"] + url); …
How to Add two rows with merged cells in top of the Excel using DocumentFormat.OpenXml
Hi All I have implemented the code to create Excel from data table using DocumentFormat.OpenXml and it was working fine. But I want to add two rows in the excel top with merged cells (Ref Image) which contains the Title of the sheet with some…
How to populate GridView from an API call?
I am a beginner learning ASP.NET and I am working on a project where I need to create a Web API to get data from an SQL Server and then call that API from a Web Form to populate a gridview table. I've currently gotten the Web API to properly get the…
OData $select and $expand not working on XML response?
I have been developing an API with XML and JSON responses integrating OData, but I'm having a problem retrieving XML responses with OData $select and $expand methods, but other methods work fine like $top, $filter and $orderby etc... In JSON response…
Implement Service Mesh in Microservices
Hello Team, The question that I am going to put here , it might be very trivial but facing some issues. Please provide your insight. I am designing an architecture of a system that has 10-15 microservices and I am planning to implement these in…
TPL Performance slows down above 2 Gb data migration
We have developed an Integration Tool using Task Parallel Library(TPL) PLINQ and are migrating data but its performing slow. We observed that for 2 GB of data the tool performs well but above 2 GB the performance of tool slows down. Below is the…