Posted on: 2/7/2014 9:49:11 AM | Views : 777

I am trying implement basic authentication method in web api and I currently in stage of reading user details from the database.  I am expericing the following issue ('API.UserPro' does not contain a constructor that takes 0 arguments - error ) at the moment in the global.aspx:
protected void Application_Start() { GlobalConfiguration.Configuration .MessageHandlers.Add(new BasicAuthMessageHandler() { PrincipalProvider = new UserPro() }); UserPro class:
public class UserPro : IProvidePrincipal { private User _userRepo; public UserPro (User userRepo) { this._userRepo = userRepo; } public IPrincipal CreatePrincipal(string username, string password) { try { ...

Go to the complete details ...