404.0 web api c# iis 7/7.5

https://stackoverflow.com/a/33684539/186244 

HTTP 404 Page Not Found in Web Api hosted in IIS 7.5

Based on this SO answer, I just had to change path="*." to path="*" for the added ExtensionlessUrlHandler-Integrated-4.0 in configuration>system.WebServer>handlers in my web.config

Before:

<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />

After:

<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*" verb="*" type="System.Web.Handler

you can change this in the iis itself in the handler mappings section of the site in iis.

Linq and Dynamic Columns

System.Linq.Dynamic has been around well let’s say from 2008 with the advent of Framework 4.0, but i have missed it most probably i was still using 3.5 at that time and not very much familiar with Linq. After exactly 10 years later I had a request to show only columns in a gridview / table /datatables which are filtered from an UI kind of reporting stuff , and my boss also hinted me to this website Dynamic Linq from scottgu

As usual i was bit lazy to read and understand the article instead searched a lot in google probably the date of article also in 2008. I thought some latest techniques might be there in framework versions > 4.5 , after some 2 to 3 hours of searching i am repeatedly pointed to this same solution. So went back there and searched for a downloadable link but to my surprise i can’t find one. Search again for the System.Linq.Dynamic keyword resulted in https://github.com/kahanu/System.Linq.Dynamic  repository. From there it’s a piece of cake. Nuget install the package , and in my cs

String columnstodisplay=”fielda,fieldb”;

var x= list.select(“new (” + columnstodisplay + “)”);

this results in an IEnumerable just contains only the fields we have requested. Bind to your table container and all is good.

This is for my memory.

ref: https://stackoverflow.com/questions/8770897/linq-access-property-by-variable