Latest posts tagged on ".NET"

First of all, basic authentication means we need to allow only those users to access our api endpoints who have valid credentials to access it.

Secondly, authorization simply means based upon your role you have access to various areas but not all. It means if I hire a car driver, the driver is authenticated to drive my car but not authorize to sell my car.

continue...

While working on .NET Core 3.1, started getting following error :-

Package 'Microsoft.EntityFrameworkCore.Tools.DotNet 2.0.3' has a package type 'DotnetCliTool' that is not supported by project

continue...

Recently, one of my very old project which was working in old version of IBatis ORM comes under scanner when more than 10 transactions were passwed to it and it failed. Reason, it ws trying to hit db synchronously in a for loop to hit the DB and insert the new transaction one by one. For smaller set of transactions (<10) it was working fine but when the transaction increased, it went timed out. What I did to fix the issue to support any number of transactions is to do the trasansactions multi-threaded way. Below are the step by step details which I took and issue was resolved.

continue...

continue...

While one of my web service was running on local IIS express, everythiing was working fine, but then I was supposed to provide cross platform team to hit the servive locally in debug mode so that they find the exact reason of error.  For that I tried to change IIS express to local IIS. After making changes I noticed that it started yelling Bad Request 400. Lets see who to resolve this problem as its very common scenario that anyone case face during development. Every developer should be familiar to have a work around to such type of common issues.

continue...

In this post, we will see how can we upload any file using ASP.NET Web Api Core 2.1 . We need to learn about CORS as we will see how we can enable CORS in order to accept cross origin resouce sharing.

Cross Origin Resource Sharing (CORS) is a W3C standard that allows a server to relax the same-origin policy. Using CORS, a server can explicitly allow some cross-origin requests while rejecting others. CORS is safer and more flexible than earlier techniques such as JSONP. This tutorial shows how to enable CORS in your Web API application.

continue...

In this post we will see how to create a proxy class of a SOAP web service using command line and wsdl.exe

continue...

Url Rewriting in ASP.NET in Web Forms Application. In this post we will see how to implement Url Rewriting in ASP.NET using both static as well as dynamic URL.

continue...

The current configuration system does not support user-scoped settings. This issue can either occur in any web application, in general it can be a WCF Service, Web Service and in my case its a SSRS Service.

continue...

While working with HttpClient class to connect to external REST API’s from C# code and implementing solution with asynchronous programming(Async / Await). Since class library project already have reference of System.Net.Http but issue coming with extension method ReadAsAsync().

'HttpContent' does not contain a definition for 'ReadAsAsync' and no extension method 'ReadAsAsync' accepting a first argument of type 'HttpContent' could be found (are you missing a using directive or an assembly reference?)

continue...