About Me

My photo
Web application developer with over 2+yrs exp.Has worked on Asp.net mvc,C#,jquery,core java.

Thursday, September 3, 2009

A basic obligation for Web sites is to permit only some members or only authenticated users to access certain pages and perform desired operations. In such case, the application must ask the user for his/her user name and password. The application must also embrace a way to conceal information from anonymous users (users who are not logged in/not authenticated/guest users). In this article, I'll show you how to use ASP.NET controls and ASP.NET membership services to create an application that executes all these responsibilities.
Open Visual Studio 2005.
On the File menu, click New option, and on sub menu click Web Site option. The New Web Site dialog box appears.
Under Visual Studio installed templates, select ASP.NET Web Site.
In the Languages box, click the programming language you prefer to work in (in this article, I used C#) The programming language you choose will be the default for your Web site, but you can set the programming languages for each page individually.
Click OK in the New Web Site dialog box. Visual Studio creates the Web site and a new page named Default.aspx.
Configuring Membership
Later in this article, I'll explain how to put pages into a subdirectory that is protected. You must create the subdirectory now itself so that you can configure security for it later.
To Add a New Folder to the Web Site
In Solution Explorer, right-click the name of your Web site (http://localhost/membership/) and click New Folder option
Name the folder as MemberPages.
Before you work with ASP.NET membership, you must configure your application to facilitate membership and to set up users. You can use the Web Site Administration tool, which provides a wizard-like interface for making configuration settings. When you complete the Setup Wizard, a SQL Server database named ASPNETDB.MDF is created in the App_Data folder of the project.
For this, you will characterize a single user.
Steps to Create a Membership User
On the Website menu, click ASP.NET Configuration.
Select the Security tab, click the link to Use the security Setup Wizard to configure security step by step, and then click Next button.
Proceed to Step 2 of the wizard and select From the Internet option. The wizard displays a page where you can select the authentication method that your Web site will use. This option specifies that your application will use Forms authentication, where users will log in to the application using a login page. I'll explain how to create it later in this article.

Click Next. The wizard displays a message stating that user information will be stored using Advanced provider settings. By default, membership information is stored in a Microsoft SQL Server Express database file in the App_Data folder of your Web site
Click Next. The wizard displays an option to create roles. I'll explain how to perform this step separately later in this article.
Clear the Enable roles for this web site check box, and click Next. The wizard displays a page where you can create new users.
Enter information that defines a user of your application. Use the following values as guidelines (you can use any values that you like, but be sure to note your entries for later in the article) as shown in the following figure:

User Name Your name (with no spaces), or a sample name.
Password A password. A strong password is required (one that includes uppercase and lowercase letters, punctuation, and that is at least eight characters long).
E-mail Your personal e-mail address.
Security Question and Security Answer Type a question and answer that can be used later if you need to recover your password.
Click Create User button. The wizard displays a confirmation page.
Adding New Access Rules for Subdirectory
Earlier in the article, you created a folder named MemberPages. And in this section of the article, I'll explain how to create a rule that makes sure that only logged-in users can access pages in that folder.
To Set Up Access Rules for the MemberPages Subdirectory
In the wizard, click Next. The wizard displays a page that allows you to create access rules.
In the Add New Access Rule box, expand the node for your Web site as shown in the following figure:

Select MemberPages, the folder you created earlier.
Under Rule applies to, select Anonymous users radio button option.
Under Permission, select Deny radio button option. The rule you are creating rejects access to anonymous users - that is, users who have not logged in.
Click Add This Rule. The new rule is displayed in the grid below. When users request a page from the MemberPages subdirectory, the rules are checked to determine whether the user is allowed access to the page.

Click Finish button. You are now done with the wizard. The wizard closes and you are returned to the Security tab of the Web Site Administration tool.


How to Log the User In?
As an element of your application, you need to establish the user's identity so that the application can perform actions such as:
Showing or hiding information based on who the user is, and
To get the user's identity, you have the user log in
In this article, I'll show you how to add a link on the home page that takes users to a login page, and then you will create the login page.
To Create a Home Page with a Login Button
Open the Default.aspx page of your web site.
Switch to Design view.
Type static text such as Welcome to My site and, in the Formatting toolbar, use the Block Format drop-down list to format the text as Heading 1.
From the Login group of the Toolbox, drag a LoginStatus control onto the page as shown in the following figure:

By default, the LoginStatus control is delivered as a link. When users click it, the application displays a login page. You can now create the login page.
To Create a Login Page
In Solution Explorer, right-click your Web application (http://localhost/membership) and select Add New Item. Add a Web Form named Login.aspx to your site.
In the Login.aspx page, switch to Design view.
From the Login group of the Toolbox, drag a Login control onto the page as show in following figure:

Displaying Login Errors
The Login control comprises validation to help users enter correct information. You can provide more information for login errors by adding a ValidationSummary control to the page.
To Display Detailed Login Errors
From the Validation group of the Toolbox, drag a ValidationSummary control onto the page.
In the Properties window for the ValidationSummary control, set the ValidationGroup property to Login1, which is the default ID of the Login control you added previously as shown in the following figure:

Exhibiting Information for Logged-In Users
Now I'll show you how to modify the home page to customize the display depending on whether the user is logged in. Anonymous users will see a standard message inviting them to log in. Logged-in users will see a message that welcomes them by their logged-in name.
To Modify the Display for Logged-in Users
Open the Default.aspx page.
From the Login group of the Toolbox, drag a LoginView control onto the page. The LoginView control is displayed with its AnonymousTemplate template open. This template allows you to define the content that users will see before they have logged in.
Click the edit area of the LoginView control to activate editing.
In the edit area of the LoginView control's AnonymousTemplate template, type Hello! You are not logged in. Click the Login link to sign in.
On the LoginView Tasks panel, in the Views list, click LoggedInTemplate. If you do not see the LoginView Tasks panel, right-click the heading of the LoginView control and select Show Smart Tag. You are now defining the content that will be displayed to users who have already logged in.
Click the edit area of the LoginView control to activate editing, and then type You are logged in. Welcome.
From the Login group of the Toolbox, drag a LoginName control into the template after the text.
Testing Login
You can now test the login capability of your application.
To test login
In Solution Explorer, right-click Default.aspx and click Set As Start Page. This configures the Web site so that when you run the site, the Default.aspx page appears first.
Press CTRL+F5 to run the Web site. The home page (Default.aspx) appears in the browser.
Click the Login link. The login page you created is displayed.
Type the login name of the user you created earlier in the article (in this article, I created user as Shreekumar).
Type both a user name and password and then click Log In. If you entered the correct credentials, you are returned to the home page. The page now displays a Logout link, your user name, and the welcome message that you defined for the logged-in user as shown in following figure:

Close the browser.
Limiting Access for Members-Only Pages
Earlier in this article, you created the MemberPages subdirectory and created an access rule that limits access to pages in the subdirectory. In this section of the article, I'll show you how to add a page to the protected subdirectory and test the access rule.
To Create the Members-only Page
In Solution Explorer, right-click the MemberPages folder, click Add New Item, and add a new Web Form named Members.aspx.
In Design view, add text to the page, such as Welcome, Members! or you can add something different. You can now add a link to the members-only page from the home page. Put the members-only page link in the logged-in template of the LoginView control. That way, visitors to your site would not see the link until they were logged in.
To Add a Link to the Members-only Page
Open the Default.aspx page.
From the Standard group of the Toolbox, drag a HyperLink control onto the LoginView control next to UserName control.
In the Properties window for the HyperLink control, set the Text property to Members page and the NavigateUrl property to ~/MemberPages/Members.aspx to point to the page that you created previously.
Testing the Members-Only Page
You can test the members-only page by accessing it as a logged-in user.
To Test the Members-only Page
Press CTRL+F5 to run the Web site.
In the login page, type the user name and password that you used earlier. You are redirected to (Default.aspx) home page.
Click the Members page link. You are redirected to the Members.aspx page because the user name you are logged in as has been authorized to access the page as shown in the following figure:

Close the browser window.
Registration of New Users
In the first part of this article, you created a user with the Web Site Administration tool. That approach is helpful if you are functioning with a tiny, defined list of users; but in many Web sites, however, users are allowed to register themselves. ASP.NET includes the CreateUserWizard control that executes the same duty you performed earlier using the Web Site Administration tool.
In this part of the article, I'll show you how to add a facility that allows users to register on your Web site. To start, you will create a registration page.
To Create a Registration Page
In Solution Explorer, right-click the name of your Web site (http://localhost/membership), click Add New Item, and add a new Web Form named Register.aspx.
In the Register.aspx page, switch to Design view and type static text such as Register into the page. In the Formatting toolbar, use the Block Format drop-down list to format the text as Heading 1.
From the Login group of the Toolbox, drag a CreateUserWizard control onto the page as shown in the following figure:

In the Properties window for the CreateUserWizard control, set the ContinueDestinationPageUrl property to ~/Default.aspx.
This configures the control so that when users click Continue after creating a user, the control returns to the home page.
From the Standard group of the Toolbox, drag a HyperLink control onto the page. In the Properties window for the HyperLink control, set the Text property to Home and the NavigateUrl property to ~/Default.aspx.
Now I'll show you how to add a link to the home page that displays the registration page. For this, assume that you want to display the registration link only to users who are not logged in (Guest Users).
To Create a Registration Link on the Home Page
Open the Default.aspx page.
Right-click the LoginView control added previously. Select Show Smart Tag. In the LoginView Tasks panel, select AnonymousTemplate from the Views list box to activate editing in the anonymous template.
From the Standard group of the Toolbox, drag a HyperLink control into the anonymous template. In the Properties window for the HyperLink control, set the Text property to Register and the NavigateUrl property to ~/Register.aspx. The Register link will be displayed only to users who are not logged in.
To Test Registration
Press CTRL+F5 to run the Web site and display the Default.aspx page. Because you are not logged in, the page containing the Register link is displayed.
Click the Register link. The registration page is displayed.
In the text boxes, enter a new user name, a password, an e-mail address, and a security question and answer as show in the following figure:

Click Create User. A confirmation message is displayed.
Click the Continue button. You are returned to the home page as a logged-in user. Note that the Login link has changed to Logout and that the information displayed in the Login control is from the LoggedInTemplate property, not from the AnonymousTemplate property.
Click the Logout link. The page changes to display the information for anonymous users.
Click the Login link.
Enter the credentials for the user you just created.You are logged in as the new user.
Close the browser window.
Changing User Passwords
Users sometimes might want to change their passwords, and it is often unrealistic to perform this task by hand. You can therefore use another ASP.NET control to allow users to change passwords on their own. To change a password, users must know their existing password.
Now I'll show you how to add a page where logged-in users can change their password.
To Create a Password-change Page
In Solution Explorer, right-click the MemberPages folder, click Add New Item, and add a new Web Form named ChangePassword.aspx.
You are putting the page in the members-only folder because only logged-in (Authenticated) users can change their passwords.
In the ChangePassword.aspx page, switch to Design view and type static text such as Change User Password. In the Formatting toolbar, use the Block Format drop-down list to format the text as Heading 1.
From the Login group of the Toolbox, drag a ChangePassword control onto the page as shown in the following figure:

In the Properties window for the ChangePassword control, set ContinueDestinationPageUrl property to ~/Default.aspx. This configures the control so that when users click Continue after changing a password, the control returns to the home page.
Now I'll show you how to add a link to the home page that displays the password-change page. You will make the link available only to users who are logged in.
To Create a Password-change Link on the Home Page
Open the Default.aspx page.
Right-click the LoginView control and then click Show Smart Tag. In the LoginView Tasks menu, in the Views list, click LoggedInTemplate.
This switches the LoginView control to edit mode for the content that will appear to users who are logged in.
From the Standard group of the Toolbox, drag a HyperLink control into the editing region. In the Properties window for the HyperLink control, set the Text property to Change password and the NavigateUrl property to ~/MemberPages/ChangePassword.aspx.
The Change password link will be displayed only to users who are logged in, which is the opposite of the Register link you created earlier.
To Test Password Change
Press CTRL+F5 to run the Web site.
In the Default.aspx, page, click the Login link and log in as one of the users you have created. When you are finished, you are returned to the home page as a logged-in user.
Click the Change password link.
In the password-change page, enter the old password and a new password, and then click Change Password.
Click Continue.
On the home page, click Logout.
Click the Login link.
Enter the new password. You are logged in with the new password.
Close the browser window.
Recovering a Password
It is widespread knowledge that users will frequently forget their passwords. At this point I'll show you how to add a password recovery page to your Web site so that they can once again log in to your site. Password recovery can take two forms:
You can send users the password they selected (or that you created for them when you set up the site). This choice requires that the site store the password using reversible encryption.
You can send users a new password, which they can change using the Change Password page you created earlier. This option is useful if the Web site stores passwords using a non-reversible encryption scheme such as hashing.
By default, the ASP.NET membership system shelters passwords by hashing them, meaning that the passwords cannot be recovered. Therefore, for this part of the article, your Web site will send users a new password.
To Add Password Recovery
In Solution Explorer, right-click the name of your Web site (http://localhost/membership), click Add New Item, and add a new Web Form named RecoverPassword.aspx.
In the RecoverPassword.aspx page, switch to Design view and type static text such as Reset my password. In the Formatting toolbar, use the Block Format drop-down list to format the text as Heading 1.
From the Login group of the Toolbox, drag a PasswordRecovery control onto the page as shown in the following figure:

From the Standard group of the Toolbox, drag a HyperLink control onto the page. In the Properties window for the HyperLink control, set the Text property to Home and the NavigateUrl property to ~/Default.aspx.
Switch to the Default.aspx page.
Right-click the LoginView control and then click Show Smart Tag. In the LoginView Tasks menu, in the Views list, click AnonymousTemplate.
This switches the LoginView control to edit mode for the content that will appear to users who are not logged in.
From the Standard group of the Toolbox, drag a HyperLink control into the template. In the Properties window for the HyperLink control, set the Text property to Forgot your password? and the NavigateUrl property to ~/RecoverPassword.aspx.
To Test Password Recovery
Press CTRL+F5 to run the Web site.
By default, you are not logged in, so you see the anonymous template of the LoginView control.
Click the Forgot your password? Link.
The RecoverPassword.aspx page appears.
Type your user name and click Submit. The security question is displayed and you are prompted to type the security answer as shown in the following figure:

Type the answer and click Submit.
If you entered a correct answer, the Web site resets your password and sends you an e-mail message with the new password.

For this u have to do the setting for email also I haven’t included that one as IIs is not working in my system I didn’t read that one..U can use IIS as smtp server for that.
This is not my article I have read this article and simply posted in my blog….
Thanks,Sagar.
License
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
About the Author
_ShreekUMAr_


Member I’m a MCA graduate, presently working in my own development institute as a web developer. Fascinated in web development technologies and all the pieces which are interrelated to web development. My strong side ingredients are ASP.Net, C#, JavaScript and SQL Server 2000

Awards
1] Best ASP.NET article of March 2009
Occupation: Web Developer
Location: India


Other popular ASP.NET articles:
Multiple File Upload With Progress Bar Using Flash and ASP.NET
How to use Flash to upload multiple files in a medium-trust hosting environment
CAPTCHA Image
Using CAPTCHA images to prevent automated form submission.
10 ASP.NET Performance and Scalability Secrets
10 easy ways to make ASP.NET and AJAX websites faster, more scalable and support more traffic at lower cost
Exploring Session in ASP.Net
This article describe about session in ASP.Net 2.0 . Different Types of Session , There Configuration . Also describe Session on Web Farm , Load balancer , web garden etc.
Paging of Large Resultsets in ASP.NET
An article about optimization and performance testing of MS SQL Server 2000 stored procedures used for paging of large resultsets in ASP.NET

Article Top
Sign Up to vote for this article


Your reason for this vote:


Bottom of Form

You must Sign In to use this message board.

FAQ
Top of Form

Bottom of Form
Top of Form
Noise Tolerance Layout Per page
Bottom of Form

Msgs 1 to 25 of 45 (Total in Forum: 45) (Refresh)
FirstPrevNext



Gr8
Nitin Sawant
7hrs 54mins ago

you covered lot of topics in a single article!!
=============
NITIN SAWANT
=============

Sign In•View Thread•PermaLink





How to package App_Data with the setup.msi to deploy on another server
Thayhor
4:05 26 Jul '09

I find this very interesting, but how can someone deploy the membership information database with the setup.msi. I have try to manual add the App_Data, but not working. My application was confused to identify the database when running IIS 6.0 , since I also have connectionstring to ODBC in my web config file.What should I do to accomplish this.
Also I want to know if it is possible to use web site administrative tool in window 3003 server or other OS without installing VS 2005.

Thank you.

Thayhor.
Sign In•View Thread•PermaLink





help me
nguyenkim9525
5:28 23 Jul '09

hello sir, I have one problem in PasswordRecover. When I type user name and Questions...then submit .....this page can not display next page "your password has sent to you" . I also follow your project. all functions in login toolbox are working but only PasswordRecover. Would you help me!. I'am student. I need this for my project. thanks
Sign In•View Thread•PermaLink





How to manage users
mrprata
16:56 16 Jul '09

Hi there. If lets say I logged in as admin...and i want to manage the users. is there a way for me to link a button to that managing of members account?
Sign In•View Thread•PermaLink
2.00/5 (1 vote)




Does not work when the site is deployed on IIS
nakash2050
1:41 6 Jul '09

Hi Shreekumar,

Nice article. Good job. But one problem. This method works only with localhost. Try to publish the site and deploy the same on IIS. It doesn't work. The registered users get some error that Sign-in was not successful.
I have tried so many things with this. But to no good. Google says to modify the Web.config file. But no use(or I might be doing it wrong). Am working on a project which needs this login control. And my website is used by many people. I don't know how to solve it out. Please show me how to deploy the same on IIS so that it works fine. Urgent.

Regards
Nakash
nakash2050@gmail.com
Sign In•View Thread•PermaLink





getting the followinge error
bsb25
4:51 4 May '09

XML parsing failed: syntax error (Line: 1, Character: 1)

Reparse document as HTML
Error:invalid start-tag
Specification:http://www.w3.org/TR/REC-xml/#NT-STag
1: <% @ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
2:
3:
Sign In•View Thread•PermaLink





addition
Donsw
7:47 28 Apr '09

Another addition I would recommend it to show how the recovery works with gmail.
the following code does that. The reason is due to the SSL requirement.

protected void PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)
{
SmtpClient smtpclient;
MailMessage mm;

smtpclient = new SmtpClient();
// enable ssl
smtpclient.EnableSsl = true;
// Cancel the default email first?
e.Cancel = true;
// now create another email.
mm = (MailMessage)e.Message;
//Manually send my email
smtpclient.Send(mm);

}
cheers,
Donsw
My Recent Article : Ajax Calendar Control

Sign In•View Thread•PermaLink





Very good
Donsw
3:15 28 Apr '09

This is very good the only item I would have added is how the aspnet.mdf is connected in the webconfig. You forgot to mention add the following.

remove name="LocalSqlServer"
add name="LocalSqlServer" connectionstring="Data Source=.\MSSQLSERVER;Integrated Security=True;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;User Instance=False" providername="System.Data.SqlClient"


This is needed for the connection to the db. I am using MSSQL 2008 and could not connect without it. Great work I gave you a 5.
cheers,
Donsw
My Recent Article : Ajax Calendar Control

Sign In•View Thread•PermaLink





without login page
Puneri
0:15 28 Apr '09

Hello
is it possible to use login controls without explicit login page. I want to display username/ password textbox on my default page itself.
Can I still use this control?
When I add following



i get login error. But when I use this code, i'm automatically navigated to login.aspx. Is there any way to change navigateurl?
I'm using oracle db for my website. In that I already have user table. How to synchronise access user table with oracle table. It has some extra not null columns. So how to use create user wizard in that case?

Regards,
Puneri
Sign In•View Thread•PermaLink
2.00/5 (1 vote)




How can I add permission to each page for each user?
obarahmeh
4:24 22 Apr '09

Finally, the web administration tool is worked successfully and I played around, created some users and rules.

I am looking for a way to assign a permission for some page in some folder to a specific registered user.
I mean, I wanna add 5 pages into some folder like "MEMBERS" mentioned in the article, and then I wanna assign one user for each page in this folder, I don't want all registered users to see all pages in the members folder, each user should see his page.

Is this possible?
Kind Regards
OBarahmeh

Sign In•View Thread•PermaLink
5.00/5 (1 vote)




Re: How can I add permission to each pages for each user?
praveen_vd
7:54 22 Apr '09

It's not possible, in this article Mr.Shreekuma shows that how to protect pages for particular group only. means when you create a access rule, that rule applies for entire folder but not for individual page.

for e.g:
1] say you've folder named MEMBERS and 2 pages in it such as page1 and page2.
2] if you have create a new access rule for MEMBERS folder; it applies for both page1 and page2. because the rule is created for FOLDER not for individual pages in that folder.

so, finally you can't set individual rules for particular pages in same folder. instead, you can create different folders for different pages


Thank you
Sign In•View Thread•PermaLink
1.00/5 (1 vote)




Re: How can I add permission to each pages for each user?
obarahmeh
20:21 22 Apr '09

Dear praveen_vd,
this is not useful when you wanna build an application or website for some institution where there are many users and pages.
it will be confused if you have many folders to have many access rules.

Is there any other idea to have many access rules in the same folder?
Kind Regards
OBarahmeh

Sign In•View Thread•PermaLink
2.00/5 (2 votes)




Re: How can I add permission to each pages for each user?
oswica
21:14 23 Apr '09

you are right.

i am usually add a basepage for certification authority.
and many other page will be inherit the basepage.
Sign In•View Thread•PermaLink
1.00/5 (1 vote)




Re: How can I add permission to each pages for each user?
vishwjeet
22:49 2 Aug '09

Hey everyone,
Please dont bother about the reason why this functionality is required by a person. Question is, can we configure our application this way. I mean, can we allow/deny access to a particular page to a particular user.

I have been asked this question many a times in interviews
And still Im not sure this can be done or not.

Any help will be appreciated.

Thanks
Sign In•View Thread•PermaLink





problem when click on securiy tab.
obarahmeh
23:24 21 Apr '09

Dear All,
I've followed the steps step by step, but when I go to Security Tab in the Web Site Administration Tool, a problem appear says:
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 being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: Unable to connect to SQL Server database.

and when I click on the button "Choose data source", a new screen appear having two options:
Select a single provider for all site management data
Select a different provider for each feature (advanced)
I selecte the first option (Select a single provider for all site management data), the a new screes having the provider name with Test option beside, the provider name is "AspNetSqlProvider", but when I click on Test link, a new screen having an error with the following text:
"Provider Management
Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.
"
I am not using SQL server/ Express, I am using the enterprise edition of SQL server 2005.

I think this article assumes that the SQL server is Express and may be this is the problem, but if this is problem, how can we change the connection string to point any sql server, note that the web.config file has the tags for connectionStrings but their is nothing in. no values for any data source or the DB name , I am confused how the application can figure out where to go.
Kind Regards
OBarahmeh

Sign In•View Thread•PermaLink





Re: problem when click on securiy tab. [modified]
geetkumari84
1:34 22 Apr '09

Come on, Even i too followed the same steps step by step; and i got correct result from this article. All of that configuration was supposedly to have been built automatically..! Micro Soft saves
code for the developer is representing huge investment in knowing internal details

no need to set up SQL server on your local client. Apparently this was all
done by VS.Net 2005. So membership works with very little info in the
web.config when run from the client.














modified on Wednesday, April 22, 2009 6:46 AM

Sign In•View Thread•PermaLink





Re: problem when click on securiy tab.
Smart_Boy
4:50 21 Jul '09

HI,
This is good article and work by Shree (Which is also available in MSDN Library) but I am also getting similar problem.
I am using SQL Server 2008. Kindly reply. I want to know the flow of the system of membership and users creation in Asp.Net.
Regards,
Smart Boy
Mumbai,
(INDIA)

Sign In•View Thread•PermaLink





Re: problem when click on securiy tab.
Forogar
9:50 7 Aug '09

I am having the exact same problem. I have SQL Server 2008 on my machine and somehow I have managed to get the login and create new user controls to work by defining the provider and the connections string in the web.config file. However, I can't get the web site configuration tool to work and when I tried the 'Roles" class to define roles and assign roles it blows a gasket saying it can't connect.
Life in the fast lane is only fun if you live in a country with no speed limits.

Sign In•View Thread•PermaLink





Typo
RemingtonMitchell
3:59 21 Apr '09

You have ISS instead of IIS in your how-to install IIS. Great article tho!
Sign In•View Thread•PermaLink





Re: Typo
_ShreekUMAr_
4:55 21 Apr '09

Thanks dude, sorry for the spelling mistake
Shreekumar. S. S

Sign In•View Thread•PermaLink
1.00/5 (1 vote)




thanks
Ibrahim2009
2:44 17 Apr '09

hi
Iam Ibrahim thank you for your hard work that's very good and Iwant to thank you
on help me
all the best
Sign In•View Thread•PermaLink





Updating the database
xrunner
6:30 10 Apr '09

This is an outstanding article with lots to offer. How would you handle the case where the membership file is predefined in a SQL database but registration is required. In other words, new registrants must be in the database before they can register (they already know their MemberID)?
Sign In•View Thread•PermaLink
3.50/5 (2 votes)




Good work, but......
Member 2248191
1:26 31 Mar '09

Dear Shreekumar_S!
Good work but how to manage Membership and User Login if the site is located on a virtual hosting
Thanks
Vlad
Sign In•View Thread•PermaLink





email confirmation..
Tanmay Broachwala
7:15 25 Mar '09

hey what if you want to activate user account only after email verification during registration? How can u add that kind of functionality with this solution.

Regards,
Tanmay.
Sign In•View Thread•PermaLink





Re: email confirmation..
deepak_arora
9:28 25 Mar '09

You first make a decision that how many roles you would like to manage in your web site, say for example you’ve 2 roles:
ADMIN and Guest
Every time when guest user registered in your website through his/her e-mail id; you do followings:
• On the Website menu, click on ASP.NET Configuration.
• Select Security link that enables you to set up and edit users, roles, and access permissions for your site.
• Under users section; click on Manage users link
• Select ACTIVE check box that enables the particular user as an active member to your website. Otherwise uncheck the ACTIVE check box to deactivate particular user
Sign In•View Thread•PermaLink
1.00/5 (1 vote)





Last Visit: 8:53 11 Aug '09 Last Update: 8:53 11 Aug '09 12 Next »


General News Question Answer Joke Rant Admin
PermaLink | Privacy | Terms of Use
Last Updated: 22 Apr 2009
Editor: Deeksha Shenoy
Copyright 2009 by _ShreekUMAr_
Everything else Copyright © CodeProject, 1999-2009
Web17 | Advertise on the Code Project

No comments: