ASP.NET Core Web API and versioning
i was reading a article from http://www.binaryintellect.net/articles/5f8ab7b1-f3d7-49d1-bee5-a5d5ff564794.aspxbelow code is not clear.[ApiVersion("1.0")]...
View ArticleHow to get Active Directory credentials passed to asp.net web api so can use...
I have an asp.net application which I use to provide REST endpoints. For web and Mobile client apps, I manually collect the username and password and use this to authenticate/authorize and then return...
View ArticleThe data reader returned by the store data provider does not have enough...
Hi All of you.I am inserting data to table using stored procedure and EF-6 and WEB API. Please follow Table, Stored procedure and WEB API Code:Table Code:CREATE TABLE [dbo].[State]([state_id] [bigint]...
View ArticleHow to show validation message while user give invalid data or wrong URL?
Hi Panel;I have created a web API method called as GETStudedntDetails and I am returning value by JSON.Bellow is my method;public HttpResponseMessage Get(string id,string name) { string errormessage=""...
View ArticleSecuring .net core api input
Can someone guide on libs or practices when securing posts/puts payloads to an api? Like strippping chars...etc. In short to validate that the payload sent is clear from any script, sql injection...
View ArticleHow to implement "Proxy Layer" for OData Service?
Hi,I have interested challenge. I have back-end OData Services that are not exposed to internet and cannot be exposed due security reasons. I have to use those services from my MVC application. I am...
View ArticleSending request by HTTP client to server and get xml response back from server
Hello,I have a problem sending the request to server and get xml response form server. I need send this POST:POST http://localhost:444/xml HTTP/1.1User-Agent: User-Agent: STORMWARE HTTP client....
View ArticleGlobally handle all exceptions in WebAPI 2
I am working in WebApi2. I am going to implement global exception handling. As all we knew, we can use IExceptionHandler and IExceptionLogger for the same. I also implemented the same and working...
View ArticleWeb api using Angular JS returns 503 for time consuming calls.
There is a Web API call that happens from the ASP.Net MVC application. The call is successful and good when the API operation is short and quick. But there are also calls to this same API method that...
View ArticleAdditional Get methods
Hi,I am a new bee, trying my handsout. Consider i need to have three Get methods ProductController.1)GetProducts()2)GetProducts(int id)3)GetProductsForDiscount()The 3rd method i couldnt access it. It...
View ArticleThe name 'Count' does not exist in the current context.
Hi All, I am using a web api from AmazonS3Client. While I was doing some testing, when reading a pdf file, I was trying to change the value of S3Object count property from 0 to 1. Then it...
View ArticleFIDDLER and WebClient()
Hi guys,I'm posting data to an old and new URL. If use Fiddler on both, I get a response by looking at the RAW, WebView and TextView tabs.Through C# code using WebClient class, I can only get a...
View ArticleWhat do you use for API testing?
We've been using a tool called Postman, and while it seems to work pretty well, I don't have anything really to compare it to. One thing it doesn't have is the ability to control where to save your...
View ArticleNewtonsoft Jobject null as API parameter
I have a web api function that is receiving a json value and converting it to a jObject like this:[HttpPost] public IHttpActionResult AddWalletItem(JObject InsertParams) { ... //code that does stuff...
View ArticleSetting Thread Principal in Message Handler
I have a javascript/html client front-end, served by a Web API 2 REST based back-end website, hosted on IIS.I have a home baked authentication system which validates the users credentials in the...
View Articleweb api basic authentication
Hi, I have a GET method and adding basic authentication to the api call. The system that tries to retrieve data can only do basic authentication. Could you please let me know what would be the best...
View ArticleDifference between Class library and Console with many classes : .Net
Hi All, I just started using .net integration with some third party WEb API. See the image below, through this I am consuming the web api. Someone says it is console application and yes...
View ArticleAggregateException being thrown when debugging
Hello,Please have a look at the following screen shot which shows an exception that keeps getting thrown every time I'm debugging some code and I wait too long: </div> <div> \The error...
View ArticleWhat Are Needed To Setup Unity IOC Container For Implementing DI In Web API 2
I have looked at several tutorials for setting up Unity Container for Web API 2 for the purpose of implementing Dependency Injection but they all used older versions of Unity so they don't help my...
View ArticleJson File return Column Null .. Why ?
First I Create this API Controller ... and Implement This Function :public IHttpActionResult GetCustomer() { var customerDto = _context.Customer .Include(c=>c.MemberShip) .ToList()...
View Article