Author: robertc | Posted on: 9/27/2008 1:24:37 PM | Views : 564

Hi,

Sorry, but i posted something in the security forum, but nobody seems to check there. Hopefully I can get some responses here.


I just moved my app to iis7 and i am now getting this error. Everything worked fine under iis6.


Now my security is completely broken. i'll include a snippet of code of my custom identity and the error. Any help would be greatly appreciated. Thank you.



error: Unable to cast object of type 'System.Web.Security.FormsIdentity' to type 'cbgIdentity'



"Return CType(HttpContext.Current.User.Identity, cbgIdentity).Roles.Contains(role)" - this line errors out

 
1 Imports System.Security.Principal
2 Imports System.IO
3 <Serializable()> _
4 Public Class cbgIdentity
5 Go to the complete details ...