Saturday, April 16, 2016

Ensure that HttpConfiguration.EnsureInitialized() is called in the application's startup This error prompts you when you forget to initialize the apllication startup to fix this problem kindly use the given below line and add it under global.asax file of solution.    GlobalConfiguration.Configuration.EnsureInitialized(); This is the...

Tuesday, April 12, 2016

Explore Persistence Caching In Web API Using CacheCow.Server.EntityTagStore.SqlServer In the previous post Apply Caching in Web API Using CacheCow, I have shared about apply caching in-memory using CacheCow and its benefits. In the continuation of that post I’ll sharethoughts about persistence caching and its implementation. Caching always plays...

Saturday, April 9, 2016

The request contains an entity body but no Content-Type header The Simple solution for such issue is please put “ Content-Type: application/json; charset=utf-8” in request. Kinldy find a screen shot given below for reference: Please refer www.dotnetpiper.c...

Friday, April 8, 2016

Attribute Routing in ASP.NET Web API 2

Attribute Routing in ASP.NET Web API 2 In the last article we’ve seen how can we inject multiple parameters to Web API method the same can be achieve using route attribute in Web API. Though there were little challenges which I will also describe in this article which may reduce your development time for sure. Excerpt from asp.net about routing,...

Wednesday, April 6, 2016

Inject Multiple Arguments To A Web API Method

Inject Multiple Arguments To A Web API Method There can be various scenarios when you may have to pass multiple arguments in a Web API get method. Though there might be a few more ways, I have used the default configuration mapping which I am sharing here in this article. We should pass arguments as additional parameters. It is especially easy...

Monday, April 4, 2016

Hi Folks, If you want to access the ModelState property in the View , you can use the ModelState in your Razor View as depicted below in image: This is the source code as shown below: @model IEnumerable<MVCSample.Models.EmpRegistration>  @{      ViewBag.Title = "Verify";  if (@ViewContext.ViewData.ModelState.IsValid) ...