473,511 Members | 14,799 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2321
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2068
by: Diego | last post by:
I've created a Custom MembershipProvider, in the user creation i have to return somehow the ProviderUserKey but inside the MembershipProvider I have no access to the session to store the info....
5
2513
by: Graham | last post by:
I have created a custom MembershipProvider called "LassieMembershipProvider" that derives from "MembershipProvider". This providor is located in a Businesslogic layer dll called...
2
2616
by: Mark Olbert | last post by:
So far, I am more than a little underwhelmed by the Membership API in ASPNET2, and the ASP.NET Configuration wizard in VS2005. The latter is slow as a pig whenever it does anything. Oh well, at...
0
1413
by: Mark Olbert | last post by:
I'm posting this here to save other folks some hair-pulling time. No need to respond. You can debug custom MembershipProvider and RoleProvider classes under the ASPNET Configuration tool by...
1
1772
by: Iulian | last post by:
I have created my own MemberShipProvider/RoleProvider/MembershipUser classes extending the base ones. I managed to install everything but I have a problem. When I run the Application Configuration...
4
4728
by: freeflytim | last post by:
I'm trying to implement a custom MembershipProvider (and RoleProvider) together with a custom MembershipUser class in C#, Asp.Net 2.0, MS Visual Studio 2005. Everything has worked fine so far,...
1
1710
by: Arthur Dent | last post by:
Please help... i am stumped... I have an app, written in VB.NET fwiw. I have a custom RoleProvider class, cuz i finally got tired enough of hacking with application variables, to learn the...
0
993
by: caius | last post by:
Hi, I recently develop a custom membership provider and role provider . I did configure the central admin and the SharePoint site to use them. I can now use the login page and authenticate to...
2
2312
by: =?Utf-8?B?d2lsbGlhbQ==?= | last post by:
Hi, Could anyone tell me how to change the default roleprovider at runtime? Basically I have a few sets of roleprovider and membership provider, I want to switch among them at runtime based on...
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5676
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5077
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.