WCF vs ASP.NET Web API

The new ASP.NET Web API is a continuation of the previous WCF Web API project (although some of the concepts have changed). WCF was originally created to enable SOAP-based services. For simpler RESTful or RPCish services (think clients like jQuery) ASP.NET Web API should be good choice.

how does Request.QueryString work?

The HttpRequest class represents the request made to the server and has various properties associated with it, such as QueryString. The ASP.NET run-time parses a request to the server and populates this information for you. Read HttpRequest Properties for a list of all the potential properties that get populated on you behalf by ASP.NET. Note: not all properties will be … Read more

Why is this code throwing an InvalidOperationException?

As you can see here, the First method throws an InvalidOperationException when the sequence on which it is called is empty. Since no element of the result of the split equals Hello5, the result is an empty list. Using First on that list will throw the exception. Consider using FirstOrDefault, instead (documented here), which, instead of throwing an exception when the sequence is empty, returns … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)