ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Peter Kellner has a good article on the new ASP.NET 2.0 Membership and Roles Features, and then put together a very useful sample that demonstrates how to implement a set of admin data-pages on top of the ASP.NET 2.0 Membership and Role Management system to allow you to remotely administer your users and roles.  His sample is available to download in source format -- so you can integrate it within your applications to provide a remote management experience for users/roles that works well in a hosting environment.

Update: Check out Juval's article and sample code on how to accomplish the same thing using a Windows Forms front-end and web-services.  Very slick!

Updated: Juval has updated his code again to support three options:

1) The version mentioned in the magazine

2) A WCF (Indigo) version hosted in IIS

3) A WCF (Indigo) version with a custom server host in case IIS isn't an option

You can download all three versions here: http://www.idesign.net/idesign/temp/CredentialsManager.zip

Hope this helps,

Scott

 

Published Monday, January 09, 2006 5:57 PM by ScottGu

Comments

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Tuesday, January 10, 2006 3:21 AM by Simone
Great... that's what I was looking for!!!

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Tuesday, January 10, 2006 5:37 AM by tt
Very good !

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Tuesday, January 10, 2006 9:21 AM by Christian Weyer
Scott,
I am sure you know Juval's idea and solution...?
http://www.devx.com/codemag/Article/30087

Cheers,
Christian

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Tuesday, January 10, 2006 10:05 AM by scottgu
Hi Christian,

Thanks for sending me a pointer to that -- I had actually missed that article. It is great! I'll update this posting and make another posting to it as well.

Thanks,

Scott

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Tuesday, January 10, 2006 7:57 PM by Doug
Hi Scott,

I will take a look a Juval's remote admin tool, yet what I am really looking for is a remotable custom profile provider using .net remoting. Know of any samples out there? Thanks.

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Wednesday, January 11, 2006 12:50 AM by scottgu
Hi Doug,

Unfortunately I don't know of any samples to remote profile information yet -- although I believe you should be able to use the approach in Juval's article for profile data as well.

We are planning at somepoint in the future to expose the core ASP.NET Application Services for remote clients (for example: WinForms and Avalon) to use as well. We don't have an ETA for this just yet, but it is on our list of things to-do.

Hope this helps,

Scott

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Wednesday, May 24, 2006 4:32 PM by Peter Kellner
Hi Scott,

I was just trying to post a referral to Juval's article and remembered you mentioned it here.  (I still get about 50 hits a day from your reference back in January so it's easy for me to find).

Anyhow, the link to Juval's article doesn't work.  If found this link instead.

http://msdn.microsoft.com/msdnmag/issues/05/04/Security/

-Peter

# SQL 2005 Hosting - Web-based Administration

Tuesday, August 01, 2006 10:49 AM by Kevin Tunis

How are you managing your Hosted SQL 2005 database? While you can manage SQL Reporting Sessions using

# Is ASP.NET 2.0 Membership and Role Management Ready for real time development

Wednesday, August 02, 2006 1:27 AM by Shalvin P D
I am working with .Net from 2001 Beta 1. I am very impressed by the ASP.Net 1.x features. But I encounter a lot of Runtime errors when working with ASP.Net Membeship controls.

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Wednesday, August 02, 2006 1:38 AM by ScottGu

Hi Shalvin,

What runtime errors are you seeing?  I haven't heard of anyone experiencing these -- and there are several sites with 100,000+ users using them.

Thanks,

Scott

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Thursday, August 03, 2006 12:43 AM by Shalvin P D
Sir, Your mail was very motivational. I have decided to devote considerable time for ASP.Net 2.0 Membership R& D and to implement it in my current project. The type of errors I used to encounter is listed below: I An error was encountered. Please return to the previous page and try again. The following message may help in diagnosing the problem: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Web.Administration.WebAdminMembershipProvider.CallWebAdminMembershipProviderHelperMethodOutParams(String methodName, Object[] parameters, Type[] paramTypes) at System.Web.Administration.WebAdminMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) at System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() at System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(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(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint II Create User Wizard Errors Since the calls to these stored procedures is hidden, how to proceed with error handling? 1. Procedure or function aspnet_Membership_GetPasswordWithFormat has too many arguments specified. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Procedure or function aspnet_Membership_GetPasswordWithFormat has too many arguments specified. 3. Procedure or Function 'aspnet_Membership_CreateUser' expects parameter '@TimeZoneAdjustment', which was not supplied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Procedure or Function 'aspnet_Membership_CreateUser' expects parameter '@TimeZoneAdjustment', which was not supplied. Thanks Shalvin

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Thursday, August 03, 2006 11:33 AM by ScottGu

Hi Shalvin,

The errors below look like you might be trying to use a different version of the database schema from the final one that shipped.

The schema changed from Beta2->RTM.  You mentioned above that you started usign it with Beta2.  Could it be that you didn't recreate the database for RTM?

Thanks,

Scott

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Wednesday, August 30, 2006 6:02 PM by Bruce Krasnof
Scott, I tried installing Cassini on win2003, I was hoping to launch those admin pages for managers users, roles, etc. since they appear to be in the framework folder. Any advice on how to simulate the admin pages you get from vwd express on a win2003 server that doesn't have vwd express? thanks, Bruce

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Wednesday, August 30, 2006 10:27 PM by BruceK
Anyone try this out, I might for my client's site. Might be easier than rolling my own, though the IIS7 tool sounds compelling. http://www.qualitydata.com/products/aspnet-membership/Default.aspx -Bruce

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Thursday, August 31, 2006 1:53 AM by ScottGu

Hi Bruce,

Here is more up to date version of the above articles that you might want to checkout: http://weblogs.asp.net/scottgu/archive/2006/07/18/Remote-Membership_2F00_Roles-Management-of-ASP.NET-2.0-Applications.aspx

Hope this helps,

Scott

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Sunday, December 24, 2006 4:15 PM by John F. Holliday

Problems with AD membership provider not being able to create users when password reset is enabled.  Works when password reset is not.  After struggling for hours, I thought I'd post a comment.

Using a simple app configured for the AD membership provider and extending the AD schema with question, answer, count, time, lockouttime attributes - generic exception thrown while creating user at System.RuntimeMethodHandle._InvokeMethodFast(...).

Can't get past this - tried everything I can think of.  Problem with security?  Problem with the attributes?  Something else?  No clue.

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Wednesday, December 27, 2006 10:14 PM by ScottGu

Hi John,

Can you send me an email on this?  I'll then loop in someone who can help you.

Thanks,

Scott

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Friday, December 29, 2006 6:33 PM by Rohan

Hi Scott,

I tried to integrate the out-of-the-box Asp.Net Web Site Administration Tool with a web application. Things were going well untill I hosted the web application on a server and tried to remotely connect to the administrator tool. That's when I got an error "This tool cannot be remotely accessed."

Now is there a way to overcome this?

Thanks,

Rohan

# re: ASP.NET 2.0 Membership and Role Management Remote Admin Tool

Saturday, December 30, 2006 11:41 AM by ScottGu

Hi Rohan,

The built-in web admin tool in ASP.NET doesn't support remote hosting for security reasons.

This blog post, though, points to a web admin tool that you can use to accomplish the same tasks (and even more): http://weblogs.asp.net/scottgu/archive/2006/07/18/Remote-Membership_2F00_Roles-Management-of-ASP.NET-2.0-Applications.aspx

Hope this helps,

Scott

# Web 2.0 » Blog Archives » Download Time Management Software 2.10.04 Free - Online Time

Pingback from  Web 2.0  » Blog Archives   » Download Time Management Software 2.10.04 Free - Online Time

# email filter tools and services

Friday, December 21, 2007 9:23 PM by email filter tools and services

Every person desires to have a way to the online world.

# Creating Your Own Web Site Administration Tool in ASP.NET « Redditech ‘Ground Zero’ Blog

Pingback from  Creating Your Own Web Site Administration Tool in ASP.NET « Redditech ‘Ground Zero’ Blog