Using NInject with ASP.NET MVC Web Api

The standard approach of integrating NInject DI with asp.net MVC doesn’t work for Web Api, due to the updates made to the IDependencyResolver interface.  In order to make it work, need to create a couple of more interfaces that need to be implemented to help identify the dependencies, as provided below:

Continue reading

2,977 total views, 1 views today

Preventing CSRF attacks in ASP.NET Web API calls.

In spite of securing the assets of a web application using folder permissions and SSL for secure transmitting of data over the wire, ASP.NET MVC applications using Web API’s are very much vulnerable to CSRF (Cross Site Request Forgery) attacks that permits malicious code to inject data by invoking the Web API actions resulting in serious consequences.

Continue reading

2,555 total views, no views today