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

Home Posts Topics Members FAQ

Extending MembershipUser

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 my website using the ASP.NET Configuration tool, and go to the Security page, I get the following error:

Could not load type 'OMLMembershipUser' from assembly 'App_Code.olsckwwk, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

Yet OMLMembershipUser is defined in a file in the App_Code directory.

Any idea what's causing this problem?

- Mark
Jan 10 '06 #1
8 5412
Hi Mark,

Welcome to ASPNET newsgroup.
As for the custom membership provider problem, from the description, I
think it is likely something not configured correctly for your custom
membership provider since the exception occurs at intialize time which is
trying to load the membership provider class... Would you provide your
class's declaration in source file and how you config it in web.cofig to us
so that we can have a look?

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 19:21:53 -0600
| From: Mark Olbert <Ch*********@newsgroups.nospam>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: Extending MembershipUser
| Date: Mon, 09 Jan 2006 17:21:53 -0800
| Organization: Olbert & McHugh, LLC
| Reply-To: ma**@arcabama.com
| Message-ID: <gt********************************@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: 12
| X-Trace:
sv3-pHkiWfXx9hK+ply/Z1rCvgZernhuelgR8jNGdxGt5g0/8W4JAce6GyzXXI890EFaCWQZ7/7D
/DzpULD!dQUwdGqA7y+HXdUai+Amk4BcSTGrsILoW58MCoHbXlW IuE0aaf/Ho9mwwSAboJGMq1CB
jg==
| 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:369665
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| 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 my website using the ASP.NET Configuration tool,
and go to the Security page, I get the following error:
|
| Could not load type 'OMLMembershipUser' from assembly 'App_Code.olsckwwk,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
|
| Yet OMLMembershipUser is defined in a file in the App_Code directory.
|
| Any idea what's causing this problem?
|
| - Mark
|

Jan 10 '06 #2
I don't think so (at least, it gets through the first part of creating a user, and actually adds the new user to the underlying
SqlServer2005 datastore).

BTW, is there any way to attach to the ASPNET Configuration process so that I can "watch" it in the debugger?

Here's the source code:

Membership Provider
===============
using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Text;
using System.Web;
using System.Web.Configuration;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for membership
/// </summary>
public class OMLMembershipProvider : MembershipProvider
{
private membershipTableAdapters.bd_userTableAdapter ta;

public override void Initialize( string name, System.Collections.Specialized.NameValueCollection config )
{
base.Initialize(name, config);

ta = new membershipTableAdapters.bd_userTableAdapter();

string env = WebConfigurationManager.AppSettings["environment"];
ta.Connection.ConnectionString = WebConfigurationManager.ConnectionStrings[env].ConnectionString;
}

private string TransformPassword( string toTransform )
{
byte[] clearText = Encoding.UTF8.GetBytes(toTransform);
byte[] encryptedText = EncryptPassword(clearText);

return Convert.ToBase64String(encryptedText);
}

public override string ApplicationName
{
get
{
return "OMLMembershipProvider";
}

set
{
throw new Exception("The method or operation is not implemented.");
}
}

public override bool EnablePasswordReset
{
get { return true; }
}

public override bool EnablePasswordRetrieval
{
get { return false; }
}

public override bool RequiresQuestionAndAnswer
{
get { return false; }
}

public override int MaxInvalidPasswordAttempts
{
get { return Int32.MaxValue; }
}

public override int PasswordAttemptWindow
{
get { return 10; }
}

public override bool RequiresUniqueEmail
{
get { return true; }
}

public override MembershipPasswordFormat PasswordFormat
{
get { return MembershipPasswordFormat.Encrypted; }
}

public override int MinRequiredPasswordLength
{
get { return 1; }
}

public override int MinRequiredNonAlphanumericCharacters
{
get { return 0; }
}

public override string PasswordStrengthRegularExpression
{
get { return String.Empty; }
}

public override bool ChangePassword( string username, string oldPassword, string newPassword )
{
membership.bd_userDataTable curDT = ta.GetDataByUserID(username.ToLower());
if( (curDT == null) || (curDT.Count != 1) ) return false;

if( curDT[0].password != TransformPassword(oldPassword.ToLower()) ) return false;

curDT[0].password = TransformPassword(newPassword.ToLower());
ta.Update(curDT[0]);

return true;
}

public override bool ChangePasswordQuestionAndAnswer( string username, string password, string newPasswordQuestion, string
newPasswordAnswer )
{
return true;
}

public override MembershipUser CreateUser( string username, string password, string email, string passwordQuestion, string
passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status )
{
OnValidatingPassword(new ValidatePasswordEventArgs(username, password, true));

if( ( username == null ) || ( username == String.Empty ) )
{
status = MembershipCreateStatus.InvalidUserName;
return null;
}

if( ( password == null ) || ( password == String.Empty ) )
{
status = MembershipCreateStatus.InvalidPassword;
return null;
}

if( ( email == null ) || ( email == String.Empty ) )
{
status = MembershipCreateStatus.InvalidEmail;
return null;
}

username = username.ToLower();

object numMatch = ta.NumMatchingUserID(username);
if( (int) numMatch != 0 )
{
status = MembershipCreateStatus.DuplicateUserName;
return null;
}

numMatch = ta.NumMatchingEmail(email.ToLower());
if( (int) numMatch != 0 )
{
status = MembershipCreateStatus.DuplicateEmail;
return null;
}

membership.bd_userDataTable curDT = ta.GetData();

membership.bd_userRow curRow = curDT.Newbd_userRow();

curRow.user_id = username;
curRow.password = TransformPassword(password.ToLower());
curRow.email = email.ToLower();
curRow.flags = 0;
curRow.moniker = String.Empty;

curDT.Addbd_userRow(curRow);

ta.Update(curRow);

MembershipUser retVal = new MembershipUser("OMLMembershipProvider", username, -9, email,
String.Empty, "Comment!", true, false, DateTime.Now, DateTime.MinValue, DateTime.MinValue,
DateTime.MinValue, DateTime.MaxValue);

status = MembershipCreateStatus.Success;

return retVal;
}

public override string GetPassword( string username, string answer )
{
throw new Exception("The method or operation is not implemented.");
}

public override string ResetPassword( string username, string answer )
{
throw new Exception("The method or operation is not implemented.");
}

public override void UpdateUser( MembershipUser user )
{
membership.bd_userDataTable curDT = ta.GetDataByUserID(user.UserName.ToLower());
if( (curDT == null) || (curDT.Count != 1) ) return;

curDT[0].email = user.Email;

ta.Update(curDT[0]);
}

public override bool ValidateUser( string username, string password )
{
membership.bd_userDataTable curDT = ta.GetDataByUserID(username.ToLower());
if( ( curDT == null ) || ( curDT.Count != 1 ) ) return false;

return ( curDT[0].password == TransformPassword(password) );
}

public override bool UnlockUser( string userName )
{
return true;
}

public override MembershipUser GetUser( string username, bool userIsOnline )
{
username = username.ToLower();

membership.bd_userDataTable curDT = ta.GetDataByUserID(username);
if( (curDT == null) || (curDT.Count != 1) ) return null;

MembershipUser retVal = new MembershipUser("OMLMembershipProvider", username, curDT[0].idnum,
curDT[0].email, String.Empty, "Comments!", true, false, DateTime.MinValue,
DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue);

return retVal;
}

public override MembershipUser GetUser( object providerUserKey, bool userIsOnline )
{
if( !( providerUserKey is int ) )
throw new ApplicationException("OMLMembershipProvider::GetUs er() -- supplied providerUserKey is not an integer");

membership.bd_userDataTable curDT = ta.GetDataByUserIDNum((int) providerUserKey);
if( ( curDT == null ) || ( curDT.Count != 1 ) ) return null;

MembershipUser retVal = new MembershipUser("OMLMembershipProvider", curDT[0].user_id, curDT[0].idnum,
curDT[0].email, String.Empty, "Comments!", true, false, DateTime.MinValue,
DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue);

return retVal;
}

public override string GetUserNameByEmail( string email )
{
email = email.ToLower();

membership.bd_userDataTable curDT = ta.GetDataByEmail(email);
if( ( curDT == null ) || ( curDT.Count != 1 ) ) return null;

return curDT[0].user_id;
}

public override bool DeleteUser( string username, bool deleteAllRelatedData )
{
username = username.ToLower();

membership.bd_userDataTable curDT = ta.GetDataByUserID(username);
if( ( curDT == null ) || ( curDT.Count != 1 ) ) return false;

curDT[0].Delete();
ta.Update(curDT);

return true;
}

public override MembershipUserCollection GetAllUsers( int pageIndex, int pageSize, out int totalRecords )
{
membership.bd_userDataTable curDT = ta.GetData();

totalRecords = curDT.Count;

MembershipUserCollection retVal = new MembershipUserCollection();

for( int row = pageIndex * pageSize; row < ( pageIndex + 1 ) * pageSize; row++ )
{
if( row >= ( totalRecords - 1 ) ) break;

retVal.Add(new MembershipUser("OMLMembershipProvider", curDT[row].user_id, curDT[row].idnum,
curDT[row].email, String.Empty, "Comments!", true, false, DateTime.MinValue,
DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue));
}

return retVal;
}

public override int GetNumberOfUsersOnline()
{
return 1;
}

public override MembershipUserCollection FindUsersByEmail( string emailToMatch, int pageIndex, int pageSize, out int
totalRecords )
{
emailToMatch = emailToMatch.ToLower();

membership.bd_userDataTable curDT = ta.GetDataByEmailPattern(emailToMatch);

totalRecords = curDT.Count;

MembershipUserCollection retVal = new MembershipUserCollection();

for( int row = pageIndex * pageSize; row < ( pageIndex + 1 ) * pageSize; row++ )
{
if( row >= ( totalRecords - 1 ) ) break;

retVal.Add(new MembershipUser("OMLMembershipProvider", curDT[row].user_id, curDT[row].idnum,
curDT[row].email, String.Empty, "Comments!", true, false, DateTime.MinValue,
DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue));
}

return retVal;
}

public override MembershipUserCollection FindUsersByName( string usernameToMatch, int pageIndex, int pageSize, out int
totalRecords )
{
usernameToMatch = usernameToMatch.ToLower();

membership.bd_userDataTable curDT = ta.GetDataByUserIDPattern(usernameToMatch);

totalRecords = curDT.Count;

MembershipUserCollection retVal = new MembershipUserCollection();

for( int row = pageIndex * pageSize; row < ( pageIndex + 1 ) * pageSize; row++ )
{
if( row >= ( totalRecords - 1 ) ) break;

retVal.Add(new MembershipUser("OMLMembershipProvider", curDT[row].user_id, curDT[row].idnum,
curDT[row].email, String.Empty, "Comments!", true, false, DateTime.MinValue,
DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue));
}

return retVal;
}
}

RoleProvider
=========
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.Configuration;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for roles
/// </summary>
public class OMLRoleProvider : RoleProvider
{
private membershipTableAdapters.bd_userTableAdapter ta;

public override void Initialize( string name, System.Collections.Specialized.NameValueCollection config )
{
base.Initialize(name, config);

ta = new membershipTableAdapters.bd_userTableAdapter();

string env = WebConfigurationManager.AppSettings["environment"];
ta.Connection.ConnectionString = WebConfigurationManager.ConnectionStrings[env].ConnectionString;
}

private RoleFlags TextToFlag( string flagName )
{
RoleFlags retVal = RoleFlags.None;

try
{
retVal = (RoleFlags) Enum.Parse(typeof(RoleFlags), flagName, true);
}
catch { }

return retVal;
}

private RoleFlags TextToFlag( string[] flagNames )
{
RoleFlags retVal = RoleFlags.None;

foreach( string curFlag in flagNames )
{
try
{
retVal |= (RoleFlags) Enum.Parse(typeof(RoleFlags), curFlag, true);
}
catch { }
}

return retVal;
}

public override string ApplicationName
{
get { return "OMLRoleProvider"; }

set
{
throw new Exception("The method or operation is not implemented.");
}
}

public override bool IsUserInRole( string username, string roleName )
{
RoleFlags toCheck = TextToFlag(roleName);
if( toCheck == RoleFlags.None ) return false;

object queryVal = ta.GetUserRoles(username.ToLower());
if( queryVal == System.DBNull.Value ) return false;

RoleFlags roleFlags = (RoleFlags) queryVal;

return ( ( roleFlags & toCheck ) == toCheck ) ;
}

public override string[] GetRolesForUser( string username )
{
object queryVal = ta.GetUserRoles(username.ToLower());
if( queryVal == System.DBNull.Value ) return new string[0];

RoleFlags roleFlags = (RoleFlags) queryVal;
RoleFlags[] allRoles = (RoleFlags[]) Enum.GetValues(typeof(RoleFlags));

List<string> roles = new List<string>();
foreach( RoleFlags curFlag in allRoles )
{
if( ( roleFlags & curFlag ) == curFlag )
roles.Add(Enum.GetName(typeof(RoleFlags), curFlag));
}

return roles.ToArray();
}

public override void CreateRole( string roleName )
{
throw new ApplicationException("You can't create additional roles with the OMLRoleProvider");
}

public override bool RoleExists( string roleName )
{
bool isOkay = false;
try
{
RoleFlags dummy = (RoleFlags) Enum.Parse(typeof(RoleFlags), roleName, true);
isOkay = true;
}
catch { }

return isOkay;
}

public override bool DeleteRole( string roleName, bool throwOnPopulatedRole )
{
throw new ApplicationException("You can't create delete roles with the OMLRoleProvider");
}

public override void AddUsersToRoles( string[] usernames, string[] roleNames )
{
RoleFlags toAdd = TextToFlag(roleNames);

membership.bd_userDataTable userDT = ta.GetData();

foreach( string curUser in usernames )
{
membership.bd_userRow[] userRows = (membership.bd_userRow[]) userDT.Select("user_id='" + curUser.ToLower() + "'");
if( userRows.Length != 1 ) continue;

userRows[0].flags |= (int) toAdd;

ta.Update(userRows[0]);
}
}

public override void RemoveUsersFromRoles( string[] usernames, string[] roleNames )
{
RoleFlags toRemove = TextToFlag(roleNames);
toRemove = ~toRemove;

membership.bd_userDataTable userDT = ta.GetData();

foreach( string curUser in usernames )
{
membership.bd_userRow[] userRows = (membership.bd_userRow[]) userDT.Select("user_id='" + curUser.ToLower() + "'");
if( userRows.Length != 1 ) continue;

userRows[0].flags &= (int) toRemove;

ta.Update(userRows[0]);
}
}

public override string[] GetUsersInRole( string roleName )
{
int toCheck = (int) TextToFlag(roleName);

membership.bd_userDataTable theDT = ta.GetData();
List<string> users = new List<string>();
foreach( membership.bd_userRow curRow in theDT )
{
if( ( curRow.flags & toCheck ) == toCheck )
users.Add(curRow.user_id);
}

return users.ToArray();
}

public override string[] GetAllRoles()
{
return Enum.GetNames(typeof(RoleFlags));
}

public override string[] FindUsersInRole( string roleName, string usernameToMatch )
{
int toCheck = (int) TextToFlag(roleName);

membership.bd_userDataTable curDT = ta.GetDataByUserIDPattern(usernameToMatch);

List<string> users = new List<string>();
foreach( membership.bd_userRow curRow in curDT )
{
if( ( curRow.flags & toCheck ) == toCheck )
users.Add(curRow.user_id);
}

return users.ToArray();
}
}

RoleFlags (used by RoleProvider)
========================
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

[Flags]
public enum RoleFlags : int
{
None = 0,
SysAdmin = 1,
RegisteredUser = 2,
}

Web.config (I've redacted the keys for privacy reasons)
========
<membership defaultProvider="OMLMembershipProvider">
<providers>
<add name="OMLMembershipProvider"
type="OMLMembershipProvider" />
</providers>
/membership>

<roleManager enabled="true" defaultProvider="OMLRoleProvider">
<providers>
<add name="OMLRoleProvider"
type="OMLRoleProvider" />
</providers>
</roleManager>

<machineKey
decryption="AES"
validation="SHA1"
validationKey="redacted"
decryptionKey="redacted"
/>
Jan 10 '06 #3
Okay, I found how to debug the ASPNET Configuration utility. Previously, I was attaching VS2005 to the iexplorer process which was
displaying the config pages. Turns out you need to attach to the instance of the server which is generating the configuration
website (no duhh...it was late, and I was tired, and I forgot to scroll down the process list to see all the choices before picking
one).

After doing that I was able to set breakpoints on my custom provider classes and walk through the Configuration code. It took about
30 seconds to find the bug after I was able to do that.

- Mark
Jan 10 '06 #4
Steven,

Apologies for the confusion, but while I was able to fix some of the problems by attaching the debugger to the ASPNET Configuration
tool server process, the original problem still exists. That's the one that complains about not being able to load the custom class
which defines my custom MembershipUser object.

This has the feel to me of an incomplete Type name specification problem (e.g., where the Assembly name must be appended to the
class name to make a fully-qualified Type name), but I'm not sure. Is there a Web.config element where you specify the custom
MembershipUser class to use? I haven't been able to find one.

- Mark
Jan 10 '06 #5
I should also have mentioned that watching the ASPNET Configuration tool in the debugger shows that the call to GetAllUsers()
succeeds (i.e., instances of my custom MembershipUser class are created, added to MembershipUserCollection and returned). The
failure to load the Type occurs after the call to GetAllUsers().

- Mark
Jan 10 '06 #6
Thanks for your response Mark,

So is there any particular custom types used in your membership provider
which is separated from your main class file (of the provider)? Also, I
think you can also consider pull the custom provider code out of the
asp.net application, make them in a separate class library project (include
in the same solution), then you can add the reference to the compiled class
library project and don't need to let the provider classes dynamically
compiled.... This may make the assembly name clear...

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: Tue, 10 Jan 2006 12:18:17 -0600
| From: Mark Olbert <Ch*********@newsgroups.nospam>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: Re: Extending MembershipUser
| Date: Tue, 10 Jan 2006 10:18:17 -0800
| Organization: Olbert & McHugh, LLC
| Reply-To: ma**@arcabama.com
| Message-ID: <0h********************************@4ax.com>
| References: <gt********************************@4ax.com>
<5s*************@TK2MSFTNGXA02.phx.gbl>
<03********************************@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: 5
| X-Trace:
sv3-oQ3W88ujgM+5qN3ILD8GVFlh2nizLRSue7cVZ5ZYcaONFL/rjvjrklEr4JexW/BXEaU2H2mR
+BbCwom!1X6uAcdN6TAeAVJqqhC0Wt/zJwrCsvWu/fIqtH9r4ca9dblbg2X1Ip9Q20CwaNW1NchG
Bg==
| 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!news-out.readnews.com!news-xxxfer.readne
ws.com!216.196.98.140.MISMATCH!border1.nntp.dca.gi ganews.com!nntp.giganews.c
om!local01.nntp.dca.giganews.com!news.giganews.com .POSTED!not-for-mail
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:369862
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I should also have mentioned that watching the ASPNET Configuration tool
in the debugger shows that the call to GetAllUsers()
| succeeds (i.e., instances of my custom MembershipUser class are created,
added to MembershipUserCollection and returned). The
| failure to load the Type occurs after the call to GetAllUsers().
|
| - Mark
|

Jan 11 '06 #7
Steven,

A clever idea, thanx...but unfortunately it doesn't work. It does change the error message, though: now it claims not to be able to
resolve the extended MembershipUser Type. I've used fuslogvw to confirm that the assembly defining the Type gets loaded (it does).

Can you please refer this problem up the line? Basically, I want to know one of two things:

1) How do I derive from MembershipUser such that the ASP.NET Configuration tool will work with the derived class? I don't expect
Configuration to display or manipulate any fields/properties I may add. But it needs to not blow up.

2) Confirm that (1) cannot be done under NET 2.0 so that I can move on to other issues.

- Mark
Jan 11 '06 #8
Hi Mark,

So far I haven't found any document mentioned that custom providers are not
supported in WebAdmin page since the web admin page manage the providers
through their base abstracted interfaces... There may still have something
incorrect that cause the problem. Here are some general simple custom
provider examples in MSDN:

#Hands-on Custom Providers: The Contoso Times
http://msdn.microsoft.com/library/en...Mod_Prt9.asp?f
rame=true

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: Wed, 11 Jan 2006 10:17:16 -0600
| From: Mark Olbert <Ch*********@newsgroups.nospam>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: Re: Extending MembershipUser
| Date: Wed, 11 Jan 2006 08:17:16 -0800
| Organization: Olbert & McHugh, LLC
| Reply-To: ma**@arcabama.com
| Message-ID: <fm********************************@4ax.com>
| References: <gt********************************@4ax.com>
<5s*************@TK2MSFTNGXA02.phx.gbl>
<03********************************@4ax.com>
<0h********************************@4ax.com>
<5G**************@TK2MSFTNGXA02.phx.gbl>
| X-Newsreader: Forte Agent 3.1/32.783
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Lines: 13
| X-Trace:
sv3-2GzKdEuOhpGXIiixat2cTo/VA2lfh+DlXyudA7bNiAS0fMmHblBJzRCnQe7vYAWcDqWEygNt
dtpphvV!+pur7hb+ckKJDehctqLX8Q8ay6IYdsQ1ddsSWM+yFw 9VDg0d9S3mHPKr2JaOW9KEgZSC
IA==
| 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!TK2MSFTNGXA01.phx.gbl!TK2MSF TFEED02.phx.gbl!tornado.fa
stwebnet.it!tiscali!newsfeed1.ip.tiscali.net!news. glorb.com!border1.nntp.dca
..giganews.com!nntp.giganews.com!local01.nntp.dca. giganews.com!news.giganews.
com.POSTED!not-for-mail
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:370110
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Steven,
|
| A clever idea, thanx...but unfortunately it doesn't work. It does change
the error message, though: now it claims not to be able to
| resolve the extended MembershipUser Type. I've used fuslogvw to confirm
that the assembly defining the Type gets loaded (it does).
|
| Can you please refer this problem up the line? Basically, I want to know
one of two things:
|
| 1) How do I derive from MembershipUser such that the ASP.NET
Configuration tool will work with the derived class? I don't expect
| Configuration to display or manipulate any fields/properties I may add.
But it needs to not blow up.
|
| 2) Confirm that (1) cannot be done under NET 2.0 so that I can move on to
other issues.
|
| - Mark
|

Jan 12 '06 #9

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

Similar topics

0
by: brett_fyisystems | last post by:
I'm trying to implement an inherited MembershipUser class for a custom MembershipProver for RTM ASP.NET 2.0 I'm using an external assembly that implements these classes. I've signed the...
9
by: Mark Olbert | last post by:
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...
0
by: mark d. | last post by:
I've been working through the new features in 2.0 for about a month now, am at the point of trying to apply them to my e-comerce applications. My apps assign a unique custid field in tracking the...
3
by: Linn | last post by:
Hi, I am trying to update the e-mail for å user (as an admin), but the new e-mail address is not saved. The msgbox gives met he correct email, but when I reload my data in the gridview, the old...
1
by: Smokey Grindle | last post by:
Im trying to write a custom membership provider but in the GetUser method it returns a MembershipUser, but when i create an object called that it says overload resolution failed... no accessable...
2
by: Cliff | last post by:
Hi, i try to get the emailaddress of an membershipuser: Dim a As MembershipUser Dim em As String em = a.Email.ToString In runtime, i get the error: "Object reference not set to an...
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...
2
by: Jeff | last post by:
ASP.NET 2.0 The code below doesn't set IsApproved to true. I mean that I've debugged this code and usr.IsApproved actually get set to true. But when I quit the application and in VS2005 I start...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
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
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...

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.