ASP MVC: Keeping Track Of Logged In Users?

Apr 22, 2010

I'm creating a ASP MVC application. And because of the complex authorization i'm trying to build my own login system. (So i'm not using asp membership providers, and related classes).Now i'm able to create new accounts in the database with hashed passwords.But how do i keep track that a user is logged in.Is generating a long random number and putting this with the userID in the database and cookie enough?

View 1 Replies


Similar Messages:

MVC :: Generating A Request ID And Keeping Track Of It?

Dec 14, 2010

I am trying to Generating a Request ID and keeping track of it from request to request.I just want to get the previous request number and bump it up by 1 and log it so I can keep track of the number of requests come to my page.I was looking into TempDataDictionary but that is not working for me.I am new to ASP.NET MVC soexcuse my ignorance.

View 1 Replies

MVC :: Keeping Track Of User Information Between POST And GET?

Dec 28, 2010

The Register action gets called in the Account controller, showing the RegisterViewModel in the Register.aspx view. The form in Register.aspx is submitted/posted with answers to all of the form questions, except for the security question answers. If the user is created successfully, then I'd like to go to the GoToSecurityQuestions view using the code - return RedirectToAction("GoToSecurityQuestions", "Account"); I need to be able to keep track of the user name or ID of the newly created user so that I can persist the security questions to the database records related to the user. What's the best way to keep track of the user info between the [HttpPost] Register( ) and the [HttpGet] GoToSecurityQuestions( ) ?

[HttpGet]
public ViewResult Register()
{ return View(new RegisterViewModel()); }

[Code]....

[Code]....

[Code]....

[Code]....

View 2 Replies

C# - OnClientClick Event For Keeping Track Of Prints?

Feb 11, 2011

I am trying to keep track of prints that are made for a page. The page has Print this page link. And the code for it is like below: This is written in .cs file as there are many conditions for displaying this. And i am appending here using String Builder.

sbOutput.AppendFormat("<td align="right" valign="bottom"><div style ="float:right;text-align:right; valign:bottom;width:200px"class="print_button notPrinted"><a class="notPrinted" href="#" onclick="window.print();">PRINT THIS COUPON </a><img src="images/print-icon-34x34.gif" class="notPrinted" align="absmiddle" /></div> </td></tr></table>", couponid, Userid, locationid);

Do i have to use onclientclick or something else??

View 2 Replies

Keeping Track Of Login Attempts And Displaying The Attempt Count

Nov 12, 2010

I have a login control in my login page. The user can attempt to login unsuccessfully for 5 times after that the user account will get locked and the administrator can unlock the locked user.

Here, i need to display the login attempt count along with the error message "your login attempt failed". I have tried with the viewstate but it is not working fine.

View 3 Replies

Forms Data Controls :: Keeping Track Of Edited Fields In DetailsView?

Dec 1, 2010

When you click the edit button in detailsview I want it to store some values in "PreviousAddress" and "PreviousVehicle" to show what the data used to be before it was edited... Just wondering what would be the best way of doing this?

View 5 Replies

C# - Keeping Users On The Same Host, Development Environment?

Jul 7, 2010

We currently have a problem whereby on our stage servers, links that exist on certain pages have a full url instead of a relative path, for example they may be on http://stage.host.com/app/webpage1.aspx, and a link may exist to http://www.host.com/app/webpage2.aspx instead of http://stage.host.com/app/webpage2.aspxTo try and solve this problem we added a response filter to strip out the host name for anchor tags, so that they become relative. Although this works well for most situations, there are still some issues where users redirect to full links with server side code e.g. Response.Redirect.I wanted to get your guys ideas about the best way to tackle this problem,

View 2 Replies

Track Users Without Login Info

Oct 8, 2010

I'm trying to build the chat (it is already built here - [URL] The only thing I want to change is: remove login control. Instead of login I want to assign random usernames to people who open my webpage. Also, when somebody closes page and reopens it again in, say 10 minutes, I want this user to have the same username and data.

View 3 Replies

State Management :: Track And Identify Users With Memcached

Jun 14, 2010

Track and identify users with Memcached

View 3 Replies

Users Be Being Logged Out After A Minute Or So?

Jan 2, 2011

I have a Asp Mvc 2 site using forms authentication. When I run it locally I can log in and stay logged in indefinitely.

However when I put it on the server I seem to only stay logged in for a few minutes and then seems to be logged out. I have looked at the cookies and there are 2 which seem relevant:

.ASPXAUTH which is a session cookie .ASPXANONYMOUS which expires in 3 months.

When I refresh the page the cookies stay the same until I get logged out, when I seem to get a new .ASPXANONYMOUS cookie, but the .ASPXAUTH seems to be the same. It seems that I might be able to stay logged in until I do something after a certain amount of time. If I submit a form as soon as I am logged in then it works ok, but if I keep submitting data again and again then after a minute or so, one of the submits will happen as a logged out user and not as the user who was logged in, which all the other submits worked as. What might cause this behaviour and how can I track down what is different & change it so that I can stay logged in indefinitely?

its a single server, but after some more investigation and searching the likely candidate seems to be that I am using more than 100mb on the server and the application pool is getting recycled. I suppose now i need to know How can I check how much memory I'm using. What advice there is to reduce that.

View 2 Replies

Web Forms :: Redirecting Users Already Logged In?

Nov 28, 2010

When a user logs in, they are redireced to files within members folder. When a user happens to log in and gets redireced, there is the chance they will retype the default page address and go to the homepage, which is accessable to everyone. The issue is, the log in status control shows "Logout". how do I check if a user accesses the homepage, if they are logged in and if they are send them elsewhere. I've tried different codes, but not getting the result. Here is one code I tried...

[Code]....

View 4 Replies

Yetanotherforum Get Logged In Users Details?

Mar 8, 2011

I can get the logged in username from membership system:

// Get user details
var user = Membership.GetUser();
IsLoggedIn = (user != null);


But how do I get things like their avatar, user ID and the rest?

View 1 Replies

Security :: Best Way To Identify All Users Currently Logged In?

Feb 10, 2011

I know how to identify the current user during a specific browsing session and can thus control the data, etc, made visible to that individual user. I also know how to find out how many users logged in within the recent past, using:

Membership.GetNumberOfUsersOnline()
.... which I believe calculates the number of users who have logged in within the past 15 minutes. However, I would like to know if there is any way to identify all the users who are logged in at a point in time. Is this possible?

View 9 Replies

Security :: Getting A Unique ID For Logged In Users?

Mar 8, 2011

I am using ASP.Net Forms based security with the login control. On my site a user will make a number of selections that will be written to a database. Is their a unique user id that I can get from the AspNetSqlProvider that I can use to id users in my database? When a user logs back in after being away I want to be able to retireve the users information using this id.

View 7 Replies

Security :: Securing URL For Logged In Users?

Oct 26, 2010

I need something to secure my PDF files link ...

i have a page like http......../folder/userName.pdf

i need to to encrypt the file name ( i put it "login userName" ) ...

how do i let logged in users download their pdf files without knowing the URL above , for security reasons only ...

View 4 Replies

Security :: Listing Logged In Users - VB.NET Membership?

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

C# - How To Use Wkhtmltopdf In Page That Requires Users To Be Logged In

Mar 2, 2011

I have created a simple ASP.Net page to create self printable tickets so non-technical people can change the text and layout of a ticket. Obviously the user has to be logged in to be able to print their tickets.

When providing the URL for wkhtmltopdf to convert, the tickets are not created because wkhtmltopdf does not have a session to prove the user is logged in.

Is it possible to pass the session to wkhtmltopdf in the URL, or is their a better solution?

View 1 Replies

Using EWS From Within A Website, Is It Possible To Use The Current Logged In Users Identity?

Feb 20, 2010

I have a web application using Forms authentication provided by AD. I would like to know if it's possible to use EWS to send mail as the currently logged in user without having to supply credentials, or; would I be required to set up an account with impersonating access which will send mail on behalf of the currently logged in user?

View 1 Replies

Web Forms :: Number Of Logged In Users In A Website?

Mar 1, 2011

I developed a website in asp.net,c# and SQL server2000. In each and every page I want to show the logged in users name with green color text.

I used Forms authentication.

View 4 Replies

How To Redirect Logged In Users To Separate Pages

Apr 21, 2010

I have basic login functionality implemented using SQL Server and the LoginView, LoginStatus, and LoginName controls.I have two roles defined: one for Administrators and one for Users.I have two users defined, one for each role. I would like to redirect those authenticated as users to one page and those authenticated as administrators to another. Do I need to define RoleGroups to do this? Is there a good, basic way to accomplish this? I'm not sure what to do next.

View 3 Replies

State Management :: IIS Keeps Users Logged In Forever

Apr 22, 2010

I have created a simple website in asp.net using forms authendications but when I publish my website in IIS 6 on a Windows Server 2003 machine it keeps the users logged in for ever even though I have set the web.config to expire after 30 min. My website has 2 pages a login.aspx and a home.html. When I run the website in my development machine using the ASP.NET Development Server I have no problem the website works as expected meaning the users can not access the home.html unless the have been authendicated by the login.aspx page.

Also once loged in, after clearing the browser cookies the web site asks for login again which is again the behavior that I am trying to accomplish. However once the website is on IIS does not take in account the authendication that I have set up on my web.config. What is overriding my web.config? Do I need to make some changes to the global configuration of IIS?

View 2 Replies

Security :: Inactive Users Being Logged Out Too Quickly?

Dec 5, 2010

I have a site where the admin can log in to make changes to his content, but while making changes (using a specific asp.net control) with no page loads or callbacks while editing, the user is sometimes being logged out.

I want to increase the time it takes for the system to wait before logging-out inactive users.

I'm using the standard membership provider.

View 1 Replies

Security :: Keep The Pages From Time Out When Users Are Logged In?

Mar 6, 2011

How do I keep the pages from time out when users are logged in?

View 3 Replies

C# - Get A List Of Users Currently Logged In (Authenticated) To IIS6?

Feb 19, 2010

Need to get a list of currently loggedn in(authenticated) users from IIS6, and to display them in updatepanel (ajax).

View 1 Replies

Security :: Assuming Identity Of Other Logged In Users In Web Application

Nov 1, 2010

I have a web application with a login form. A user enters a user name and password. If they exist in the database the user is authenticated using these two lines:
[Code]....

The problem is that when a user logs in at first he is logged in as himself. When navigating on the web application for a while the user assumes the identity of another logged in user. This happens all the time. In my web.config the authentication mode looks like this:
[Code]....

The site does not use ASP.NET session variables. Instead each page initializes a Singleton class, which stores itself in a static class variable, always accessing the users data already read from the database. The Singleton implementation is:
[Code]....

Could the problem with assuming another logged in users "session" be related to static classes in my application or a Forms Authentication configuration or a configuration in IIS (e.g. is it possible for users to have their own process?).

View 12 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved