Latest posts tagged on ".NET"

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...

 

In this post, we will explore some important tips while working on MVC. Note that while jotting down these tips, MVC4 was used. In latest versions like MVC 5 or MVC 6. These tips are useful while working hands on MVC. Here are some important tips for ASP.NET MVC:-

  1. Disable Request Validation
  2. Cache Your Data
  3. Isolate Data Access Logic from the Controller
  4. Using a Master View Model
  5. Use Strongly Typed Models
  6. Use Data Annotations for Validation
  7. Take Advantage of Model Binding
  8. Cache Pages that Contain Shared Data or are Public and don't Require Authorization
  9. Use Extension Methods
  10. Take Advantage of Model Binding

 

continue...