473,789 Members | 2,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MembershipProvi der/RoleProvider Problems

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
Jan 10 '06 #1
1 2335
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.WebServ er.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*********@ne wsgroups.nospam >
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| Subject: MembershipProvi der/RoleProvider Problems
| Date: Mon, 09 Jan 2006 21:06:21 -0800
| Organization: Olbert & McHugh, LLC
| Reply-To: ma**@arcabama.c om
| 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-jzPMsCKnDsey4AN lDZMFTxNkEk9/ZJ9OcQRrxP1IHxj vCO743eGoosJ859 T7FGprcnS6rJ+8
os/DAJ6!H9USSteOIX GAVw0SRqeRzmNVG w5CDtxMlDkpI5ck bmJdRtOBYOspX1w e5ThfcythEwh5
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.p hx.gbl!TK2MSFTN GP08.phx.gbl!ne wsfeed00.sul.t-online.de!t-onli
ne.de!border2.n ntp.dca.giganew s.com!border1.n ntp.dca.giganew s.com!nntp.giga n
ews.com!local01 .nntp.dca.gigan ews.com!news.gi ganews.com.POST ED!not-for-mail
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3697 02
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| 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.a spx: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.a spx: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.a spx: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 o
nEventArgs 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 o
stBackEvent(Str ing 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
|

Jan 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2087
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. Any suggesions appreciated. Thanks, Diego
5
2557
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 "Enlighten.LinkMad.Businesslogic". In one of my frontend websites I use this type to authenticate a user who is trying to login. The following excerpt is from the web.config of the particular site showing the reference to the custom provider, allowing .Net to do...
2
2634
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 least it's given me a chance to brush up on my Spider Solitaire game. In any event, I am trying to implement a custom MembershipProvider for a website. Why? Because the default one that gets created by the supplied wizard is way over the top, in...
0
1426
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 attaching the debugger to the server process which generates the configuration web pages. Once you've done that you can set breakpoints in your custom classes and stop on them. You can also single-step into the configuration pages themselves. - Mark
1
1797
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 and go to the Security tab I get this error: "There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not...
4
4746
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, all compiles, then I try to run the Website administration tool (WAT). I can bring up the main web page of the tool, but as soon as I click on 'Security', I get this error: Type is not resolved for member 'TC.Providers.TCMembershipUser,TC,...
1
1721
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 "correct" way to do roles. ;) .... Now, the problem, is that my RoleProvider, and my FormsAuthentication Session do not stay together. That is to say, i frequently see cases where the session will expire, but the RoleProvider does not. Now, they...
0
1009
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 SharePoint when the user is listed as a member of the site, when it is not listed as a member but is in a role it never works. When I attach visual studio and try to authenticate, I see the user getting through the validateUser on my membership...
2
2326
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 some sort of identifier. Thanks. William
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9983
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9020
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5417
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3700
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.