M
Mark Olbert
I've written a custom MembershipProvider and a custom RoleProvider, and am trying to get them to work with the ASP.NET Configuration
tool. Which is a royal pain in the butt, because there doesn't appear to be any way to debug the Configuration tool.
In any event, when I create a new user I get the following error message:
An error was encountered. Please return to the previous page and try again.
The following message may help in diagnosing the problem: Specified cast is not valid. at
System.Web.Administration.WebAdminPage.CallWebAdminHelperMethod(Boolean isMembership, String methodName, Object[] parameters, Type[]
paramTypes) at ASP.security_users_adduser_aspx.UpdateRoleMembership(String u, CheckBox box) in
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:line 63 at
ASP.security_users_adduser_aspx.UpdateRoleMembership(String u) in
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:line 52 at
ASP.security_users_adduser_aspx.CreatedUser(Object sender, EventArgs e) in
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:line 13 at
System.Web.UI.WebControls.CreateUserWizard.OnCreatedUser(EventArgs e) at
System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() at
System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) at
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) at
System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) at
System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) at
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs
e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I'm using a SqlServer database to store the membership info, and the new user's record shows up even though this crash occurred.
However, the assigned role was not set...which leads me to believe there's a problem with some part of the role-setting mechanism.
Can anyone give me a clue as to how to narrow down where the problem is taking place? Is there a way to attach to the ASP.NET
Configuration tool so I can see the exception take place? I tried attaching to its process, but that didn't work.
- Mark
tool. Which is a royal pain in the butt, because there doesn't appear to be any way to debug the Configuration tool.
In any event, when I create a new user I get the following error message:
An error was encountered. Please return to the previous page and try again.
The following message may help in diagnosing the problem: Specified cast is not valid. at
System.Web.Administration.WebAdminPage.CallWebAdminHelperMethod(Boolean isMembership, String methodName, Object[] parameters, Type[]
paramTypes) at ASP.security_users_adduser_aspx.UpdateRoleMembership(String u, CheckBox box) in
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:line 63 at
ASP.security_users_adduser_aspx.UpdateRoleMembership(String u) in
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:line 52 at
ASP.security_users_adduser_aspx.CreatedUser(Object sender, EventArgs e) in
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:line 13 at
System.Web.UI.WebControls.CreateUserWizard.OnCreatedUser(EventArgs e) at
System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() at
System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) at
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) at
System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) at
System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) at
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs
e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I'm using a SqlServer database to store the membership info, and the new user's record shows up even though this crash occurred.
However, the assigned role was not set...which leads me to believe there's a problem with some part of the role-setting mechanism.
Can anyone give me a clue as to how to narrow down where the problem is taking place? Is there a way to attach to the ASP.NET
Configuration tool so I can see the exception take place? I tried attaching to its process, but that didn't work.
- Mark