Hi there,
I am trying to move a working application from IIS 6 to IIS7 integrated mode but I'm running into a bit of a problem that I cannot solve.
My app is based on windowsauthentication and I use this throughout my app.
In the app itself I'm using a self defined prinicpal that inherits from WindowsPrincipal like so:
MyWindowsPrincipal : WindowsPrincipal
MyWindowsPrincipal(WindowsIdentity Id) :base(Id)
{}
Now when I run this app in classic mode all is fine however when I switch to Integrated mode things go downhill.
I have a masterpage that tries to go into HttpContext.Current.User to obtain the users name. This fails with the following error:
Safe handle has been closed
Source = mscorlib, Type = System.ObjectDisposedException, Time = 1-4-2011 19:18:12
StackTrace of the exception =
at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success)
at Microsoft.Win32.Win32Native.GetTokenInformation(SafeTokenHandle Token ...
Go to the complete details ...