470,619 Members | 1,483 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,619 developers. It's quick & easy.

MembershipProvider/RoleProvider Problems

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.CallWebAdmi nHelperMethod(Boolean isMembership, String methodName, Object[] parameters, Type[]
paramTypes) at ASP.security_users_adduser_aspx.UpdateRoleMembersh ip(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.UpdateRoleMembersh ip(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.OnCreat edUser(EventArgs e) at
System.Web.UI.WebControls.CreateUserWizard.Attempt CreateUser() at
System.Web.UI.WebControls.CreateUserWizard.OnNextB uttonClick(WizardNavigationEventArgs e) at
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Obj ect source, EventArgs e) at
System.Web.UI.WebControls.CreateUserWizard.OnBubbl eEvent(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(Command EventArgs
e) at System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) at
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection 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
Jan 10 '06 #1
1 2187
Hi Mark,

I've also noticed your another two threads in this newsgroup about
developing the custom membership provider. From the call stack you provided
there, seems you've managed to have the custom provider loaded but
encounter some new problem during using them , yes?

As another MVP has mentioned in your other thread, you can manually attach
to the web admin application's process through VS IDE to debug the problem,
you can set bread point at your provider's source code.... And I think
you can also directly use some login controls in asp.net application's page
to test the provider or call methods on your custom membership provider to
test them.... e.g if the exception occur when you try add a new user or
role, you can set bread point in the related method in your provider to
debug them.... For web admin web app, it is hosted in the .net
framework's build-in webserver (WebDev.WebServer.exe under the framework's
folder....)

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| NNTP-Posting-Date: Mon, 09 Jan 2006 23:06:22 -0600
| From: Mark Olbert <Ch*********@newsgroups.nospam>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: MembershipProvider/RoleProvider Problems
| Date: Mon, 09 Jan 2006 21:06:21 -0800
| Organization: Olbert & McHugh, LLC
| Reply-To: ma**@arcabama.com
| Message-ID: <1v********************************@4ax.com>
| X-Newsreader: Forte Agent 3.1/32.783
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Lines: 35
| X-Trace:
sv3-jzPMsCKnDsey4ANlDZMFTxNkEk9/ZJ9OcQRrxP1IHxjvCO743eGoosJ859T7FGprcnS6rJ+8
os/DAJ6!H9USSteOIXGAVw0SRqeRzmNVGw5CDtxMlDkpI5ckbmJdR tOBYOspX1we5ThfcythEwh5
TA==
| X-Complaints-To: ab***@giganews.com
| X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
| X-Postfilter: 1.3.32
| Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfee d00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp.d ca.giganews.com!nntp.gigan
ews.com!local01.nntp.dca.giganews.com!news.giganew s.com.POSTED!not-for-mail
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:369702
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| 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.CallWebAdmi nHelperMethod(Boolean
isMembership, String methodName, Object[] parameters, Type[]
| paramTypes) at
ASP.security_users_adduser_aspx.UpdateRoleMembersh ip(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.UpdateRoleMembersh ip(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.OnCreat edUser(EventArgs e) at
| System.Web.UI.WebControls.CreateUserWizard.Attempt CreateUser() at
|
System.Web.UI.WebControls.CreateUserWizard.OnNextB uttonClick(WizardNavigatio
nEventArgs e) at
| System.Web.UI.WebControls.Wizard.OnBubbleEvent(Obj ect source, EventArgs
e) at
| System.Web.UI.WebControls.CreateUserWizard.OnBubbl eEvent(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(Command EventArgs
| e) at System.Web.UI.WebControls.Button.RaisePostBackEven t(String
eventArgument) at
|
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo
stBackEvent(String eventArgument) at
| System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) at
| System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection 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
|

Jan 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Diego | last post: by
2 posts views Thread by Mark Olbert | last post: by
1 post views Thread by Iulian | last post: by
1 post views Thread by Arthur Dent | last post: by
reply views Thread by caius | last post: by
2 posts views Thread by =?Utf-8?B?d2lsbGlhbQ==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.