Check this stackoverflow answer out:
https://stackoverflow.com/a/51391202/9191495
It’s really confusing, Microsoft really needs to work on naming things.
Bruce Ng's software development blog
An archive of solutions of programming problems I have faced in my career
Check this stackoverflow answer out:
https://stackoverflow.com/a/51391202/9191495
It’s really confusing, Microsoft really needs to work on naming things.
Follow this StackOverflow answer:
https://stackoverflow.com/a/39349008/9191495
Summary
Override method Init of global.asax.cs
Add a handler for AcquireRequestState event.
Write a handler for AcquireRequestState event to get the route data of the request from route table.
Set a breakpoint to peak into the route data when debugging.
Model properties are all null after retrieving from POST request.
Check if they are properties instead of attributes.
Example: instead of
public String property;
Use
public String property { get; set; }
Apparently there are lots of hoops you need to jump through to create custom error pages in ASP.NET
http://benfoster.io/blog/aspnet-mvc-custom-error-pages
Use Telerik Fiddler, and then search for Set-Cookie only in response headers
A quick way to figure out which API set the cookie.
Web API 2 runs on .NET 4.5 and above. That’s the difference.
Follow the article: http://www.telerik.com/blogs/capturing-traffic-from-.net-services-with-fiddler
Follow the article: http://www.c-sharpcorner.com/uploadfile/b1df45/web-api-self-hosting-using-windows-service/
Also make sure to follow the steps by the SO answer: http://stackoverflow.com/a/6382120
Follow the article: http://jaliyaudagedara.blogspot.sg/2015/10/using-aspnet-web-api-as-data-source-for.html
Need to configure the web api service to always return XML data. When configuring the data source, add ?type=xml at the end of the URL.
Note: for SSRS/Report Builder to retrieve the fields, don’t use blank query string, use the following:
<Query>
</Query>
Simple, Web Api 1 doesn’t support multiple parameters.
Also, make sure the route config are correct so that the controller and action can be reached.
To bind Json parameter, use Content-Type: application/json in the request header, make sure the json object is the root object and the model to load from the server user properties instead of fields.