I have a fairly simple C# WebAPI2 project that runs locally but after publishing to IIS on a remote machine (Windows Server 2012 R2 Standard) the web page displays the follo
For me, it was because i tried to build a string for the Roles property of the attribute Authorize on my class.
[Authorize(Roles = IdentityRoles.Administrator + "," + IdentityRoles.BaseData)]
I had to build the different strings and just set one constant to Roles:
[Authorize(Roles = IdentityRoles.AutorizationStrings.AdminBaseData)]
where
IdentityRoles.AutorizationStrings.AdminBaseData = "Administrator,Base data";
Hope this helps anybody that tricks themself down this hole.