ASP.NET Web API binding with ninject

I asked Brad Wilson about this and it has changed in MVC4 RC. GlobalConfiguration.Configuration.ServiceResolver has been moved to GlobalConfiguration.Configuration.DependencyResolver Use this implementation to create a Ninject DependencyResolver for your Web Api: https://gist.github.com/2417226 In NinjectWebCommon.cs: // Register Dependencies RegisterServices(kernel); // Set Web API Resolver GlobalConfiguration.Configuration.DependencyResolver = new NinjectDependencyResolver(kernel);

Unable to authenticate to ASP.NET Web Api service with HttpClient

I have investigated the source code of HttpClientHandler (the latest version I was able to get my hands on) and this is what can be found in SendAsync method: // BeginGetResponse/BeginGetRequestStream have a lot of setup work to do before becoming async // (proxy, dns, connection pooling, etc). Run these on a separate thread. // … Read more

What’s the difference between WCF Web API and ASP.NET Web API

Ive done a little more reading around this and found a few pages by MS people on this: http://wcf.codeplex.com/wikipage?title=How%20to%20Migrate%20from%20WCF%20Web%20API%20to%20ASP.NET%20Web%20API : The WCF Web API abstractions map to ASP.NET Web API roughly as follows WCF Web API -> ASP.NET Web API Service -> Web API controller Operation -> Action Service contract -> Not applicable Endpoint -> … Read more

moq objects Returns method, should return a null object

You don’t indicate what the error was, but this should work: unitOfWork.Setup(m => m.PhysicalTests).Returns((IRepository<PhysicalTest>)null); I suspect you tried to call it with Returns(null), which causes the compiler to complain since Returns is overloaded and it doesn’t know which method should be called. Casting to a specific type removes the ambiguity.

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