I've been trying to implement login functionality via a generic http handler, and after some struggling managed to get a user logged in, but then realized it was the wrong user. I cleared the cookies, hoping to try again and debug, but now I'm getting following exception.
[InvalidOperationException: Samlingen blev ændret efter oprettelse af en forekomst af optælleren.] System.Collections.Specialized.NameObjectKeysEnumerator.MoveNext() +8380284 Dynamicweb.Environment.CookieManager.UpdateCookie(Cookie cookie) +452 Dynamicweb.Frontend.LoginHandler.SaveCookie() +1732 Dynamicweb.Frontend.LoginHandler.ExtranetLogin(String username, String password, Boolean onlyActive, Boolean impersonateUser, Int32 impersonateUserID, Boolean loginIfPwdEncrypted) +13357 Dynamicweb.Frontend.LoginHandler.ExtranetLogOn(String username, String password) +36 Hounisen.SingleSignOn.Security.Authentication.Login(String username, String password) in C:\inetpub\wwwroot\Hounisen\Hounisen.SingleSignOn\Security\Authentication.cs:16 Hounisen.SingleSignOn.User.UserService.Login() in C:\inetpub\wwwroot\Hounisen\Hounisen.SingleSignOn\User\UserService.cs:60 Hounisen.SingleSignOn.Generic.LoginHttpHandler.ProcessRequest(HttpContext context) in C:\inetpub\wwwroot\Hounisen\Hounisen.SingleSignOn\Generic\LoginHttpHandler.cs:51 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +798 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +91
What gives? I'm calling new PageView().Load(); at the beggining of HttpHandler before doing anything, and then using Dynamicweb.Frontend.LoginHandler.ExtranetLogOn