473,769 Members | 2,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Context.User is Null in the LoggedIn method of the Login Control

Hi People,

I have written a custom membership and custom roles classes for my
application. Then added a asp:Login control to the page. I then hooked
into the LoggedIn method of the asp:login control. From there I want
to direct my users to diffrent pages depending on the role thier in.
When I try to access the Context.User.Is InRole method the whole thing
is empty including the actual user itself (Although I appear to be
authenticated). Any ideas why or where I should look? I just assumed
that the user would be logged in at this point, Is this by design or
have I screwed something up?

Also on a side note I'm contemplating if I should use the default
ASP.Net membership provider. Has any one got experiance in using it in
a large scale project? I'm just worried about performance.

Thanks Heaps!
maxus

Apr 12 '07 #1
0 1295

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5111
by: Ben Binskin | last post by:
Im rather new to developing mysql/php applications and am after some advice on handling user validation for a web based system, ive implimented a number of ways and would like to know which way is better in regards to security etc, here are the following ways i have implimented this in the past: a) user submits via form login/pass, mssql db is accessed via a no login no pass account, and a basic "select from subscribers where user=$blah and...
1
3024
by: Martine | last post by:
Hi there! I have a problem with programmatically adding user controls to my mobile webforms. If I load my usercontrol programmatically (in the Page_Load), the object is instantiated, I have access to the methods and properties from the Page_Load, no problem there. But as soon as I want access to the user control from another procedure on the same page, I get the next error message: "Object reference not set to an instance of an...
4
1630
by: Brian Lowe | last post by:
I'm using Forms authentication with my user data in a SQL db. I have pages in the main appliaction folder accessible to anonymous users and I've set security to deny annonymous users access to pages in several sub folders (e.g. admin). I've set up a login page where users trying to access any /admin/ page are diverted to and on successful login they are redirected back to the page they requested. All is well. Everything works. I want...
5
4175
by: Shimon Sim | last post by:
I am working with LogIn control and need to set some property for profile after user is authenticated. I thought that LoggedIn event is the right place but system tells me that the property can't be set for anonymous user. I checked User.Identity.IsAuthenticated = false. So when is the good place to set profile properties? Again I need to set up it only once right after user logged in. Thank you.
7
8503
by: PSorensen | last post by:
Hi Is there someone who know an easy way, so only one user can access a MS Access db without using users/groups in the database? It should be done by only knowing that someone is logged in/or opening the database? I have made a part of a solution with a little login-screen and you only provide your initials and when click "Login" and when I execute the following sql: strSQL = "Insert into login_info (Login,CurrentUser, loggedIn)...
3
3200
by: =?Utf-8?B?TWFyY0c=?= | last post by:
I have a Server.Transfer in my asp:Login LoggedIn event handler. I am forcing transfer to a specific page since I do not want to use the ReturnURL that is in Request.Params (i.e., the user addressed some particular page and was redirected to the login form and would be returned there.). The control's DestinationUrl is only used if the login page was the original target of the request. In the event handler,...
2
3193
by: mlevit | last post by:
Hi, I've written my own JavaScript and used a couple of codes to set and get cookies from the net I found. When I set the cookie I can see it in my browser, it is set with the right value and expiration date etc. The only problem I'm getting is when I retrieve the cookie the value is always NULL. // ==UserScript== // @name Utopia Login/Loged // @namespace http://games.swirve.com/utopia/login.htm // @description Logs...
1
1781
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hello everyone, I'm using a provider(Custom Membership), which uses WCF services to validate the user. Also implement the method GetUser. In my aspx page of the website used a Login control, and in the web.config I configured nodes membership using my class CustomMembership. I want, after validate the user, put User object in Session, with the user data validated.
1
1824
by: jerrydigital | last post by:
Hello, I am having trouble getting unique user information on my account page. Currently, once the user logs in, it will only display "Welcome...(then the same name pops up no matter who logs in)". After the login.html page, the form redirects the user to the loggedin.asp page which verifies the users email and password are in the database. Here's the loggedin.asp code: loggedin.asp: <%@ Language=VBScript %> <% Option Explicit %>...
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10219
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9865
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8876
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3567
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.