I took an old (MDE 2003 Ver 7.1, Framework 1.1) . net project and loaded it into Visual Studio 2010 Premium. When I try to open "View in Browser" I receive the error message in the subject line. Is the issue with System.Security.Principal..........., used
in this context?
Sub
ControlAccess()
Dim
impersonationContext As
System.Security.Principal.WindowsImpersonationContext
Dim
currentWindowsIdentity As
System.Security.Principal.WindowsIdentitycurrentWindowsIdentity =
nivekd
0 Points
8 Posts
Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Securit...
Jan 23, 2013 03:23 PM|LINK
I took an old (MDE 2003 Ver 7.1, Framework 1.1) . net project and loaded it into Visual Studio 2010 Premium. When I try to open "View in Browser" I receive the error message in the subject line. Is the issue with System.Security.Principal..........., used in this context?
Sub
ControlAccess()
Dim impersonationContext As System.Security.Principal.WindowsImpersonationContext
Dim currentWindowsIdentity As System.Security.Principal.WindowsIdentitycurrentWindowsIdentity =
CType(User.Identity, System.Security.Principal.WindowsIdentity
)
impersonationContext = currentWindowsIdentity.Impersonate()lblWelcome.Text = UCase(Convert.ToString(currentWindowsIdentity.Name()))
Select Case UCase(Convert.ToString(currentWindowsIdentity.Name()))
Case Is = "ACCESS\XXXX" HyperLink1.Visible =
True
Case Else
HyperLink1.Visible =False
End
Select
oned_gk
All-Star
35854 Points
7326 Posts
Re: Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Sec...
Jan 24, 2013 12:04 AM|LINK
Dim currentiIdentity As System.Security.Principal.IIdentity = CType(User.Identity, System.Security.Principal.IIdentity)
Suwandi - Non Graduate Programmer