I have an ASP.NET application that uses the Roles.GetRolesForUser
method. The call work fines within the application, but when i use the same call in a referenced library, it throws an exception. The exception message is:
Object reference not set to an instance of an object
The strange things is that when i check Roles, it is instantiated.
My code looks like this:
var roles = Roles.GetRolesForUser(userName);
Any suggestions?