Membership - Logged Into Two Places At Once?
Aug 11, 2010
We have got two distinct lists of users that we need to power logged in access to sections of our site.
These lists can't be combined, as one is synced daily to an externally hosted data source, and both tables have to be 100% the same. We have set up two Membership providers onto the site, but my question is, is it possible to allow both to be logged in at the same time?
The issue I find is that HttpContext.Current.User.identity.name contains the username of the last successful logon.
View 3 Replies
Similar Messages:
Jul 2, 2010
I used [URL] as a guide and have something configured to show me the users which are logged into the system. This uses the aspnet_Users.LastActivityDate column to see when someone last did something on the system. It also uses the userIsOnlineTimeWindow within the web.config to determine whether a user is online or not.
But because of this userIsOnlineTimeWindow limitation of .NET, even when someone logs out of the system or closes their browser window, the system still sees them as being online. Also, if they are on a page and don't do anything for 10 minutes, the system will show them offline until they refresh their page or go to another page. know of a better, more real-time way to tracking users which are logged in, logged out, etc?
I don't want to wait 10 minutes for the system to show that a user is offline and also if there's 10 minutes of inactivity, it shows them being offline.
View 1 Replies
May 7, 2010
i am trying to show a list of users of my application "school", when admin logs in then he can view all the users in list but when school principals logins, he should get only users of his school, So i thought to get the current loggedIn userId first and then by that userId i'll get schoolId since userId is foreign key in school table...once i'll get the schoolId i can show the members of that school.
But my problem is how to get the UserID of currently loggedIn. I'm using MVC 1.0 Asp.Net -- "Membership" if my logic above is wrong then tell me the alternate good idea, so that principal can see only his users list.
View 3 Replies
Jul 21, 2011
I am creating a few web services for use with a mobile application. My current site uses asp .net membership and one of the web services will validate username and password.
In the web service I get passed uname and pword and just use
Code:
If Membership.ValidateUser(username, password) = True Then
Return "True"
Else
Return "false"
End If
Is there a similar way to get the userid without logging the user on or do I need to create a Stored procedure?
View 2 Replies
May 9, 2010
I Have an asp.net application in which i have used asp.net membership for authentication. Wat i need is , i need to check whether user is already logged inn. If user logged in , in a computer ... At the same time same user logged inn from another computer , then for the second time logged inn , a message should be displayed Already logged inn
View 1 Replies
Jun 7, 2012
i have logged in using a login control
how can i transfer the login details to all other pages and how can i logout
View 1 Replies
Jan 28, 2010
If I log in different membership provider, and go to page that contains following code, I get NullReferenceException error. User will be authenticated even if I loggin to different membership.
Is there any ways to prevent from getting error??
If User.Identity.IsAuthenticated Then
Dim UserIdentity As MembershipUser = Membership.Providers("CustMembershipProvider").GetUser(HttpContext.Current.User.Identity.Name, False)
Dim currentUserID As String = UserIdentity.ProviderUserKey.ToString()
View 5 Replies
May 7, 2015
I have below code to display "list of all the online users" inside listBox using Membership function.
Code:
protected void Page_Load(object sender, EventArgs e) {
if (!IsPostBack) {
MembershipUserCollection allUser = Membership.GetAllUsers(); // to get all the users
List<MembershipUser> onlineUsers = new List<MembershipUser>(); //creating list of online users
foreach (MembershipUser user in allUser)
[Code] ....
I want to remove that user from the list of online users, who himself has logged in. Example: if I had logged-in with UserName: Admin, then this Admin should not show to me in the list of "online users"
Tried below Code but not working:
protected void Page_Load(object sender, EventArgs e) {
if (!IsPostBack) {
MembershipUserCollection allUser = Membership.GetAllUsers(); // to get all the users
List<MembershipUser> onlineUsers = new List<MembershipUser>(); //creating list of online users
MembershipUser m_user = Membership.GetUser(); //to get self logged-in user
[Code] ....
View 1 Replies
Jul 23, 2012
I have an ASP.NET VB website in which I am using the Membership functionality to authenticate users. I am doing this through the Login control on the HTML page. I have working that it will authenticate the user and then opens a welcome screen in which I have a button they can push to open a Reports.aspx page. On that page I have a dropdown box that is being populated from a datasource connection query to my SQL Server database table. It is a hard coded query but want it to query the table off the username text value that the user provided on the login (i.e. select <something> from inventory where username = <username>). I have not behind code but only HTML at this point. Here it is ...Â
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Login.aspx.vb" Inherits="Login" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
[Code] .....
Here is the Reports form that has the dropdown on it:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Report.aspx.vb" Inherits="Report" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
[Code] .....
View 1 Replies
Oct 19, 2010
I am having an issue, with the membership and form authentication. I am having a problem where when an logged in user types a url they can see the content of pages they're not suppose to. When the user tries to click on the screen or any ajax fires they are redirected to the main page. What is going on? I have all the items setup in the webconfig properly just wondering what is happening. Also I don't want to use a redirect solution for each page since that is what I thought webconfig was setup for.
View 1 Replies
Mar 29, 2010
i am not good at javascript, but trying to implement or google up a function that would only allow characters in a textbox to have
1. only numeric characters
2. 2 decimal places.
I got this online, but it slices the 3rd decimal, i want it to allow only 2 decimals, any pointers ?
[URL]
View 10 Replies
Oct 12, 2010
My update panel must update some panel out of content of this panel, for example I've got
<update panel>
some staff
</update panel>
<div>
No need to update staff
Need to update staff
</div>
How can I update "Need to update staff" when updating "some staff" in my update panel ?
View 2 Replies
Oct 20, 2010
I am using a basic HTML page and I need to have the current date display in a <div> I have deemed 'date-worthy'Is there a placeholder or some type of way to designate a spot in the HTML to have something in the mail class replace that placeholder with DateTime.Now? I figured when I attach the mail message body to the <div> I am placing the content in, I could just do the same for the date but I cannot figure out how to access different places in the HTML.
View 1 Replies
Mar 2, 2011
i have a repeater item that displays a double. occasionally the double seems to be coming out with 3 decimal places like this 1165.833. im trying to force it to two decimal places by wrapping it in a string.format method but it still comes out the same:
<%# String.Format("{0:f2}",DataBinder.Eval(Container.DataItem, "pricerange").ToString())%>
View 3 Replies
Aug 11, 2014
I'm using the Google Places API to discover information on a restaurant. [URL] ....
I need my name parameter to contain an & because I am looking for D'Agostino's Pizza & Pub. But I am not sure what my URL needs to look like, because my requests are returning no matches. I am trying:
maps.googleapis.com/maps/api/place/nearbysearch/json?location=41.8957646,-87.6553512&radius=5000&types=restaurant|food&name=D'Agostino's Pizza %26 Pub&key=<mykey>. But is that even right?
I believe the search should return results, because in google if you type "D'Agostino's restaurant north ogden avenue Chicago IL", it's a perfect match there.
View 5 Replies
Oct 28, 2010
I have created a Website with some DataBase (using LINQ to SQL).
can i upload Website & DataBase at different Places like on different machine etc.
I use "CuteFtp" for upload Website.
View 1 Replies
Jan 29, 2010
How can I get the result with decimal place? The following will return 33.00, but how can I get the result of 33.33?
[Code]....
View 2 Replies
Sep 1, 2010
I need to validate hours put into a textbox. I want to allow hours to be from 0-24 and allow up to 2 decimal places. so it has to accept
0
0.00
1.5
2.25
but not 2.225 or 25
I put a range validator that check that the value is from 0-24 but it doesn't check that there are 2 decimal places or less. how do I do that?
View 3 Replies
Sep 3, 2010
I have this java function that works great, but I need it to only return two decimal places like 333.33. Currently it returns 333.3333333333. What can I do to modify this?
plannedpmt = (pledgedamt / numberpayments)
View 1 Replies
Aug 8, 2010
I have the following select statement which I need to add 3 decimal places to a Float. Example: .4 needs to change to .400.
[Code]....
View 2 Replies
Nov 11, 2010
I'm not getting a trailing zero on currency values and I have no idea why not. This is my code:
[Code]....
Yet this is what is showing up on the screen:
$18.7
Very aggrevating...It should not be doing this as I understand it.
View 4 Replies
Dec 1, 2010
I have to refactor really huge project with a lot of user controls where each has a lot of element sometimes with no unique id. I mean that in one page Image element has ID="img" as well as DevExpress popup control (containig image) in another page. When I try to search concrete ID, I found many of them in code behind files (.cs) but I need only these which I can find in *.ascx files. Can I do such thing?
View 2 Replies
Oct 13, 2010
i have one Gridview in my .aspx page.i am showing dynamic data in this grid.how i will show the float or double number in 2 decimal places in gridview.
View 3 Replies
Feb 11, 2010
I have a RequiredFieldValidator with Display="Dynamic" on my ASP.NET WebForm. I have assigned it a class using the CssClass property. I want the error message to be displayed using display: block, so I have placed this on the css class in my style sheet.
Unfortunately, the validator places a display: inline on the element on the web page, effectivaly overriding my style sheet value.
Edit:
I just realised why this doesn't work. When setting Display="Dynamic" on a validator, it has the effect that it sets style="display: none" on the span tag when rendering. The .net javascript library then switches the inline style of the element between "none" and "inline". That is simply how the dynamic validator works. So for this to display as a block element, I will need to modify how the client side event validation works.
View 2 Replies
Sep 18, 2010
I have a project where I'm rebuilding a legacy app and need to combine multiple similar web pages onto one ASP.Net web form. I thought I could easily do this with MultiView / View groupings. The problem I'm encountering is that each View control doesn't isolate controls of the same name.For example, I wanted to do this:
<asp:View ID="view1" runat="server">
<asp:Label ID="TEXT01" runat="server" />
</asp:View>
[code]...
View 4 Replies