Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Change Password - Form Authentication,ASP.NET

Posted on 2011-03-25
4
Medium Priority
?
565 Views
Last Modified: 2012-05-11
Hi,
I am using Login Control - Form Authentication in my application.
Autheticating users using Custom function using LDAP for Active Directory.
Every thing works perfectly fine.

Now, i have created a forgotPassword.aspx page and added a PasswordRecoveryURL& PasswordRecoveryText on the Login control.... expecting whenver user cliks on "Forgot password".. should be taken to that page .
But,..it still hangs on at Login.aspx page expecting user to provide login credentials ....after that it takes to "forgot passoword" page.

How can i directly go to ForgotPassword.aspx page .

ASP.net 2.0, C#.net
(Note:- Not using Memebrship)

(pls find the code for Ref)

Web.Config
----------
<authentication mode="Forms" >
			<forms loginUrl="login.aspx" name="adAuthCookie" timeout="60" path="/">
			</forms>
		</authentication>

--------------------------------------------------------------

Login.aspx
**********
if (e.Authenticated )
{
  Session["UserID"] = Login2.UserName;                     
  string groups = adAuth.GetGroups();
  FormsAuthenticationTicket authTicket = new  FormsAuthenticationTicket(1, Login2.UserName, DateTime.Now, DateTime.Now.AddMinutes(60), false, groups);
                      string encryptedTicket = FormsAuthentication.Encrypt(authTicket);
                      HttpCookie authCookie = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket);
                      Response.Cookies.Add(authCookie);

Open in new window

0
Comment
Question by:kishan66
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 7

Expert Comment

by:nbove
ID: 35218779
The following link provides examples and sample code for using Forms Authentication and connecting to Active Directory.  If you are having difficulty, try modifying your code to more closely match the examples.

http://msdn.microsoft.com/en-us/library/ff650308.aspx
0
 

Author Comment

by:kishan66
ID: 35219217
Hi nbove,

Thanks for th ereply.

As mentioned ,I dont have any dificulty in Authenticating user accross ActiveDirectory.

Difficulty:- Forgot Password
From Login.aspx, upon clicking on "Forgot Password", i am not being transferd to the page(forgotPassword.aspx)...
rather i'm being redirected to Login.aspx as i'm using formAuthentication(pls correct me if wrong).

So, is there any way i can make forgotpassword.aspx page as -- No authentication required
0
 
LVL 7

Accepted Solution

by:
nbove earned 2000 total points
ID: 35219288
Look into using a location element block in your web.config.  Here is an example:
<location path="ManageUsers/ForgotPassword.aspx" allowOverride="false">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

Open in new window

0
 

Author Comment

by:kishan66
ID: 35231665
You guys Rock again :-)

Thanks for the help nbove.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

662 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question