I can see many friends have experienced this issue as how to activate a user, here are my ideas.
You can choose one of the following whichever fits you
1. Create a UI for administrating all Users, assigning a role and approving it - I think it is the Best option
2. Add few lines of code in Register.aspx to Add that user to Friends role and Approve it immediately - thus you will not have to administrate it. Down side is you may find junk user on your site
3. Go to database and Run SQL statement as it is suggested in the article on godaddy web site - More work for you every time
4. Create users via security tab of
Web Site Administration Tool - Most likely it will not work in shared hosting
I took the route #1 and you can check that out on my
blog of my web site. I have further expanded to make all pages totally database and user interface driven to maintain it. May be this can give you an idea.
To contribute to this topic, anyone is welcome to register and download my User Management project which includes the use of custom profile properties for users (first name, last name, address, etc.) For a a more simple approach you can download the source
code for my custom PWS kit which includes web-based user management.
I downloaded your user-management kit for the personal website starter kit, but I don't know how to integrate that with my site that is already working. I use godaddy like a lot of poor souls on this board, and manually approving users on the server side sucks.
Can you give me some basic instructions on how to use your kit?
In the mean time the easiest way you can do is by adding just few lines of code in Register.Aspx.vb file. I hope it will be a better option for you and you can do in your existing code. I have added these lines of code on my blog under "User Management
in Admin Role" at the end.
Since you are using go daddy, and you want to implement web based user management, I would suggest downloading my Personal Site Code and using the User Management pages included in it. This will allow you to implement user management without making database
changes.
You would need to:
<div>Add the Users.aspx(vb) to the Admin folder of your site.</div>
<div>Add a link to the Users page that only you can get to by logging in.</div>
<div>Add the UserManager.vb from my project to your App_Code directory</div>
<div>Add appropriate sections to the web.config</div>
Okay - I guess I'm not totally following you here. What sections do I need to add to the web.config file / or can I just replace my web.config with the other one (connection strings obiviously need to be set correctly).
For adding a link to access the User.aspx page, you might look at the manage.aspx page I use. It is located in the Admin folder of my site project that you downloaded. You could:
<div>Copy the page from my project to your project</div>
<div>Remove the links on the page to Site Settings and Manage Albums</div>
<div>Copy the line in the web.sitemap in my project that points to the Manage.aspx page and paste it into your web.sitemap</div>
You can use the following for your web.config and replace the connection strings.
vishwa
Member
161 Points
47 Posts
Thoughts on how to Activate a user?
Oct 19, 2006 11:49 PM|LINK
I can see many friends have experienced this issue as how to activate a user, here are my ideas.
You can choose one of the following whichever fits you
1. Create a UI for administrating all Users, assigning a role and approving it - I think it is the Best option
2. Add few lines of code in Register.aspx to Add that user to Friends role and Approve it immediately - thus you will not have to administrate it. Down side is you may find junk user on your site
3. Go to database and Run SQL statement as it is suggested in the article on godaddy web site - More work for you every time
4. Create users via security tab of Web Site Administration Tool - Most likely it will not work in shared hosting
I took the route #1 and you can check that out on my blog of my web site. I have further expanded to make all pages totally database and user interface driven to maintain it. May be this can give you an idea.
I had posted some details on on thread http://forums.asp.net/thread/1426148.aspx
Thanks
ASP.NET Membership
My Web Site and Blog
jwadsworth
Contributor
2378 Points
542 Posts
Re: Thoughts on how to Activate a user?
Oct 20, 2006 03:57 AM|LINK
To contribute to this topic, anyone is welcome to register and download my User Management project which includes the use of custom profile properties for users (first name, last name, address, etc.) For a a more simple approach you can download the source code for my custom PWS kit which includes web-based user management.
Extended Personal Site Starter kit
Orracle
Member
216 Points
55 Posts
Re: Thoughts on how to Activate a user?
Oct 26, 2006 11:24 PM|LINK
I downloaded your user-management kit for the personal website starter kit, but I don't know how to integrate that with my site that is already working. I use godaddy like a lot of poor souls on this board, and manually approving users on the server side sucks. Can you give me some basic instructions on how to use your kit?
vishwa
Member
161 Points
47 Posts
Re: Thoughts on how to Activate a user?
Oct 28, 2006 01:12 AM|LINK
Orracle,
In the mean time the easiest way you can do is by adding just few lines of code in Register.Aspx.vb file. I hope it will be a better option for you and you can do in your existing code. I have added these lines of code on my blog under "User Management in Admin Role" at the end.
.NET 2.0 ASP.NET Membership
My Web Site and Blog
jwadsworth
Contributor
2378 Points
542 Posts
Re: Thoughts on how to Activate a user?
Oct 28, 2006 05:28 AM|LINK
Since you are using go daddy, and you want to implement web based user management, I would suggest downloading my Personal Site Code and using the User Management pages included in it. This will allow you to implement user management without making database changes.
You would need to:
Extended Personal Site Starter kit
Orracle
Member
216 Points
55 Posts
Re: Thoughts on how to Activate a user?
Oct 28, 2006 03:12 PM|LINK
Orracle
Member
216 Points
55 Posts
Re: Thoughts on how to Activate a user?
Oct 28, 2006 03:16 PM|LINK
Orracle
Member
216 Points
55 Posts
Re: Thoughts on how to Activate a user?
Oct 28, 2006 03:25 PM|LINK
Orracle
Member
216 Points
55 Posts
Re: Thoughts on how to Activate a user?
Oct 28, 2006 03:28 PM|LINK
jwadsworth
Contributor
2378 Points
542 Posts
Re: Thoughts on how to Activate a user?
Oct 28, 2006 05:38 PM|LINK
For adding a link to access the User.aspx page, you might look at the manage.aspx page I use. It is located in the Admin folder of my site project that you downloaded. You could:
You can use the following for your web.config and replace the connection strings.
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<!-- Connection for SQL 2005 Express -->
<remove name="Personal"/>
<add name="Personal" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|personal.mdf" providerName="System.Data.SqlClient"/>
<!-- Connection for SQL Server 2005 -->
<!--<add name="Personal" connectionString="Server=(Local);Integrated Security=True;database=Personal" providerName="System.Data.SqlClient"/>-->
<remove name="LocalSqlServer"/>
<!-- Connection for SQL 2005 Express -->
<add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|personal.mdf" providerName="System.Data.SqlClient"/>
<!-- Connection for SQL Server 2005 -->
<!--<add name="LocalSqlServer" connectionString="Server=(Local);Integrated Security=True;database=Personal" providerName="System.Data.SqlClient"/>-->
</connectionStrings>
<system.web>
<customErrors mode="RemoteOnly"/>
<compilation debug="true">
<assemblies>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" protection="Validation" timeout="300"/>
</authentication>
<authorization>
<allow users="*"/>
</authorization>
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
<membership defaultProvider="DefaultMembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<add name="DefaultMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LocalSqlServer"
enablePasswordRetrieval="true"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
applicationName="/"
requiresUniqueEmail="true"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="1"
passwordStrengthRegularExpression=""
passwordFormat="Hashed"
passwordAttemptWindow="10"/>
<!--SECURITY NOTE: The most secure passwordFormat is hashed.
The hashed option only supports enablePasswordReset.
If you need to enablePasswordRetrieval the most secure format is encrypted.
Encypting your password requires a pre-defined machine key. -->
</providers>
</membership>
<roleManager enabled="true"/>
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
<providers>
<add name="XmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
</providers>
</siteMap>
</system.web>
<!-- At present the mail settings section is not being used. However, it is required for implementing
password recovery which I have not implemented. -->
<system.net>
<mailSettings>
<smtp>
<network host="smtp.yourdomain.net" userName="#####" password="########" />
</smtp>
</mailSettings>
</system.net>
<location path="Admin">
<system.web>
<authorization>
<allow roles="Administrators"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
<appSettings>
<!-- This key defines what role a new user will be assigned to by default. If set to blank, the user will be
created but not assigned to any roles. The user would then need to be assigned to a role by the administrator
before they would have an special access to the website.-->
<add key="DefaultRoleForNewUser" value="Registered Users"/>
<!-- This key defines the user account to be notified when a new user has signed up -->
<add key="NotifyAccount" value="Admin"/>
<!-- This key defines the email address to send errors to. It is defined here in case the error is generated
as a result of a database connection -->
<add key="AdminEmail" value="youremail@yourdomain.net"/>
</appSettings>
</configuration>
Extended Personal Site Starter kit