473,471 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Deriving from MembershipUser and ASPNET Config Tool

I'm reposting this in case it got lost...

The ASPNET Configuration tool does not appear to be able to handle derived MembershipUser classes.

Even the simplest possible derived class (one which merely wraps MembershipUser itself, duplicates its public constructor but adds
no additional methods or properties) causes ASPNET Configuration to blow up. The error message indicates that ASPNET Configuration
cannot load the derived Type from the website's dynamically-created assembly (i.e., the derived MembershipUser class is in the
site's AppCode folder).

The same problem occurs if the derived MembershipUser class is housed in a class library referenced by the site.

Have others run into this problem? Better yet, have others created derived MembershipUser classes which operate with the ASPNET
Configuration tool?

- Mark
Jan 13 '06 #1
9 1780
Hello Mark,

In ASPNET Configuration, ew can create and manage user with form
authentication. However, I am not very clear about what you want this tool
to handle derived MembershipUser classes. Can you explain more on this and
provide a reproducable sample on this issue, including the source code of
the class inherits from MembershipUser and how you use it in a project?

Regards,

Luke

Jan 16 '06 #2
Luke,

To reproduce the problem, take a custom MembershipProvider and modify CreateUser() to return a custom MembershipUser object. The
derived MembershipUser class doesn't even need to implement any new functionality; you can just make it a "wrapper" around the base
MembershipUser class, duplicating the public constructor.

Register the provider in the web.config file, and then run the ASPNET Configuration tool for the site. Try to create a new user. On
my system, it throws an exception (which the Configuration tool captures, but which stops it from processing).

What I want to be able to do is use a derived MembershipUser class to "store" extended user information. I don't expect the ASPNET
Configuration tool to display that information, or let me edit it. I just want to be able to create users with the Configuration
tool and a custom MembershipUser class.

- Mark
Jan 16 '06 #3
Hello Mark,

You may check the web.config file to see if your provider has been set to
defaultProvider, and if its type name is correct.

Here is a sample provider, you may first test it on your system to see if
it can work:

http://www.devx.com/asp/Article/2925...eProd&trk=MSCP

Luke

Jan 17 '06 #4
Luke,

My custom MembershipProvider is properly registered and accessible from the website application. That's not the problem.

Can you please confirm for me whether or not derived MembershipUser classes actually work with the ASPNET Configuration tool?

- Mark
Jan 17 '06 #5
Yes, I can confirm. Below is sample which can have
"AccessMembershipProvider" display in the configration tool:

<membership defaultProvider="AccessMembershipProvider" >
<providers>
<remove name="AspNetSqlMembershipProvider" />
<add name="AccessMembershipProvider" type="AccessMembershipProvider"
requiresQuestionAndAnswer="true" connectionStringName="AccConn" />
</providers>
</membership>

<roleManager defaultProvider="AccessMembershipProvider">

<providers>

<add name="AccessMembershipProvider"
type="System.Web.Security.AccessRoleProvider, System.Web,
Version=1.1.3300.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="AccConn" />

</providers>

</roleManager>
One thing needs to be mentioned is that we also need a role Provider here.

Hope this help,

Luke

Jan 18 '06 #6
I know you need to define a custom MembershipProvider. I've done that! It works great!

What doesn't work is a custom MembershipUser class returned by a custom MembershipProvider. That's what I'd like to know if it's
possible.

- Mark
Jan 18 '06 #7
The problem may be related to the provider you create. Can you send me your
test project to me? I may study it to see if I can find anything wrong. (To
get my actual email, please remove 'online' )

Luke Zhang

Jan 19 '06 #8
Luke,

I just sent you an email. Please let me know when you get it.

- Mark
Jan 19 '06 #9
Hello,

I have received the project. I haven't find a "web.config" in it. This is
very important in this issue, could you please send me a copy used by your
web project?

Luke

Jan 20 '06 #10

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

Similar topics

9
by: Matt Calhoon | last post by:
Hi there, I have specified a aspnet user account to run all .net sites. This account needs access to start a .BAT File (in my global.asax on session start the app needs to execute this bat...
4
by: martin carmichael | last post by:
Hello, I am wondering how aspnet developers do their web stress on ASPNET apps .. I would like to run mine with apache JMeter, a well-known open source tool. Unfortunately, it does not works...
0
by: CESAR DE LA TORRE [MVP] | last post by:
I am using WSE 3.0 with Visual Studio 2005, specifically I'm using Kerberos authentication and passing Kerberos ticket from Presentation Tier (VSTO.2005 client) to Server Tier through our Web...
8
by: Mark Olbert | last post by:
I'm writing a custom MembershipProvider which uses a custom class derived from MembershipUser (basically, the derived class adds a field to the MembershipUser base class). When I try to configure...
2
by: rh | last post by:
Hi, The asp.net 2.0 Web Site Admin Tool allows me to check/uncheck the "Active" status for each user. How can I do this programatically? I thought it would be in the MembershipUser class but...
0
by: Anonieko | last post by:
A lot of times, web hostings for ASPNET 2.0 will offer only MS Access DB for database for basic plan, a question often asked is how can I use the membership services, role, web parts services, etc ...
3
by: Jeff | last post by:
Hey ASP.NET 2.0 I'm trying to extend the MembershipUser class, and have encounter a problem: << See in the middle of this post for info about why I do this >> << See below of this post for...
9
by: antonyliu2002 | last post by:
By default, IIS is configured to timeout a session in 20 minutes, which can be changed through the IIS config window. I use InProc sessionState mode. I can also set the session timeout in...
0
by: =?Utf-8?B?TmVhbA==?= | last post by:
I have developed a simple membershipuser class and membershipprovider class. I basically followed the procedures referenced at http://msdn.microsoft.com/en-us/library/44w5aswa.aspx and made it even...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...
1
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...
0
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
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
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
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.