I've written a custom MembershipProvi der 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.Admi nistration.WebA dminPage.CallWe bAdminHelperMet hod(Boolean isMembership, String methodName, Object[] parameters, Type[]
paramTypes) at ASP.security_us ers_adduser_asp x.UpdateRoleMem bership(String u, CheckBox box) in
c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \ASP.NETWebAdmi nFiles\Security \Users\addUser. aspx:line 63 at
ASP.security_us ers_adduser_asp x.UpdateRoleMem bership(String u) in
c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \ASP.NETWebAdmi nFiles\Security \Users\addUser. aspx:line 52 at
ASP.security_us ers_adduser_asp x.CreatedUser(O bject sender, EventArgs e) in
c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \ASP.NETWebAdmi nFiles\Security \Users\addUser. aspx:line 13 at
System.Web.UI.W ebControls.Crea teUserWizard.On CreatedUser(Eve ntArgs e) at
System.Web.UI.W ebControls.Crea teUserWizard.At temptCreateUser () at
System.Web.UI.W ebControls.Crea teUserWizard.On NextButtonClick (WizardNavigati onEventArgs e) at
System.Web.UI.W ebControls.Wiza rd.OnBubbleEven t(Object source, EventArgs e) at
System.Web.UI.W ebControls.Crea teUserWizard.On BubbleEvent(Obj ect source, EventArgs e) at
System.Web.UI.W ebControls.Wiza rd.WizardChildT able.OnBubbleEv ent(Object source, EventArgs args) at
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) at System.Web.UI.W ebControls.Butt on.OnCommand(Co mmandEventArgs
e) at System.Web.UI.W ebControls.Butt on.RaisePostBac kEvent(String eventArgument) at
System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring eventArgument) at
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler sourceControl, String eventArgument) at
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) at System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint)
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