473,396 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Custom Login Control

Bob Ross
119 100+
I am trying to build a custom login control.
I have two text boxes and a button.
The OnClick of the button creates a new instance of the membership provider and calls validate user which checks the username and password etc... and returns true or false.
The trouble is although it does all the custom authentication that I set it to, it never informs ASP.net that the user is logged in.
By that I mean I still cannot access pages that aren't open to the public.
And the HTTPContext.user.IsAuthenticated is still false.

how can I acutally get it to tell ASP.Net that it is authenticated and set Context.User.IsAuthenticated is true?

Sorry this is a bit muddled but not really sure what I am doing.
Jun 8 '07 #1
2 1274
Frinavale
9,735 Expert Mod 8TB
I am trying to build a custom login control.
I have two text boxes and a button.
The OnClick of the button creates a new instance of the membership provider and calls validate user which checks the username and password etc... and returns true or false.
The trouble is although it does all the custom authentication that I set it to, it never informs ASP.net that the user is logged in.
By that I mean I still cannot access pages that aren't open to the public.
And the HTTPContext.user.IsAuthenticated is still false.

how can I acutally get it to tell ASP.Net that it is authenticated and set Context.User.IsAuthenticated is true?

Sorry this is a bit muddled but not really sure what I am doing.
Have you thought about using a session variable to indicate if that user(browser) is authorized to view the private pages?

-Frinny
Jun 8 '07 #2
Bob Ross
119 100+
I would rather use the built in system for doing.
I ahev already made the site and everything works fien but I want to use my own custom login control so juts need to work how to do that.
Jun 8 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: anonymous | last post by:
Hi all, I've been searching the way to achieve the following task. But no luck so far. I have a web site(main site), which requires authentication. This authentication is set at Windows...
1
by: Sky Sigal | last post by:
(PS: Cross post from microsoft.pulic.dotnet.framework.aspnet.webcontrols) I've been looking lately for a way to keep the Properties panel for Controls 'clean'... My goal is to keep similar...
1
by: Andrew Clancy | last post by:
Hi, Myself and a colleague are attempting to mimic the custom template functionality of the ASP.Net 2 Login control. Essentially, we would like to have the ability within our...
1
by: Jakob Lithner | last post by:
When I started a new ASP project I was eager to use the login facilities offered in Framework 2.0/VS 2005. I wanted: - A custom principal that could hold my integer UserID from the database -...
1
by: Klaus Jensen | last post by:
Hi I face this challenge: An existing site with 50000+ html-files needs to be protected by a custom login-system which has two goals: 1. Protect HTML-content (authentication required) 2....
0
by: asnowfall | last post by:
After logging in, I am not able to redirect to the target url; and this happens only when I connect to the website using "http://machine- name:portname"; but not if I connect using either...
0
by: Atul Thombre | last post by:
Hello, I am developing a custom membership provider. For that I built a prototype that uses a SQL Server 2005 database as a backend store. I implemented the class...
4
by: alexandis | last post by:
We have tables of logins (users), that differs much from standard microsoft structure - we don't use control question/answer, date fields, etc. But instead we have several additional fields. I...
3
by: skcsknathan001 | last post by:
I have 2 projects, and accessing a custom control , fron another project. Inside the custom control, it calls a function It compiles and when it runs I get a NullReference error message on the...
0
by: amdrit | last post by:
Hello Everyone, I am having a hard time understanding how to implement MVP in winforms with custom controls. I am attempting to make use of TDD using nUnit for my tests. Do any of you have a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
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...

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.