Scenario: WCF service using SqlRoleProvider to authenticate with the Sql Server 2012 database server. WCF is hosted on the IIS7 web server.
see this error:
System.NullReferenceException: An object reference is not set to an instance of the object.
in System.Web.Security.Roles.GetRolesForUser (username String)
Included RoleManagement.
On my local development machine (server 2012, iis7) this works fine. When I log in and call the method of getting roles.
On another server (test environment) it does not work. I can log in (the user is authenticated with the user and passes the sql server to the server), but when I try to get roles for this user, I get a nullreference exception.
How is this possible, can anyone lead to where this problem might arise?
Sincerely.
authentication sql-server-2012 iis-7 wcf
Obelix
source share