When Using FormsService.signIn, What Is Actually Stored In Session

Jul 27, 2010

The Setup:Account controller with the typical logon / logoff stuff that comes baked in from the template. Not much modification here on the logon page. Using a custom membership provider (SQL), but I don't think that is impacting what I am trying to do here.The Requirements:The client wants to handle licensing by limiting concurrent users and not by total users. So, after referencing this post here, I set out to make this work for what I need to do. And that is to track maximum and current users for each organization that has signed up for our application. No problem, just have an application("max") and application ("current") which are both hashtables with the key being the organization id and the value being current or max users for the organization. On Session_Start, I would increment the current users, check if it exceeds max and either a) redirect to an error page or b) let them go on with what they need to do. On Session_End, I would decrement the count.

The Problem:When using formsService.signIn, what is actually stored in session? I cannot seem to gather any information about my session in the session_start except for the session ID. So, I cannot increment the correct number for user tracking. And I cannot add a variable to session as session_start will have already fired before I get the opportunity.

View 1 Replies


Similar Messages:

State Management :: Which Place(exact Folder) The Session & Session Id Will Be Stored

May 3, 2010

which place(exact folder) the session & session id will be stored?

View 8 Replies

Mix Cookieless With Cookie Session Stored Session Data?

Mar 19, 2011

Is it possible to use mixed cookieless sessions with cookie sessions? I've an application that captured user details and then redirect for payment to an ssl page. I was wondering if this is possible? [URL] redirects to [URL] Note: the session Id in the latter url. So in essence, we use the standard cookie session for the majority of the application but when we transfer to an ssl page we pass the SessionId to the https url to pick up the session. I've tried this locally but it starts a new session.

View 1 Replies

How To SignIn Action Located At The Account Controller

Jan 21, 2010

I'm trying to do a site like http://example.com which goes to my SignIn action located at the Account controller. After signing in, I want to redirect to something like http://example.com/id where id is the user's ID.

I already have this code in my Global.asax.cs.
routes.MapRoute("Login2",
"{bg}/{controller}/{action}",
new { controller = "Account", action = "SignIn", bg = "" }
);
routes.MapRoute("Login",
"{controller}/{action}",
new { controller = "Account", action = "SignIn" }
);
routes.MapRoute("Default",
"{bg}/{controller}/{action}",
new { controller = "Home", action = "Index", bg = "" }
);

When I go to http://example.com/id and the user is not yet authenticated, the sign-in form is displayed and it goes to the page I want it to redirect after signing in. In the case of just going to http://example.com, I'm doing some server-side validation to know the user's id and it also does it job.

When I'm in http://example.com/id and I want to sign-up, there's a link which goes to http://example.com/id/account/signup. It actually goes to the sign-up page. But when I go to http://example.com and I tried to hover the sign-up link, the link becomes http://account/signup instead of http://example.com/account/signup.

View 2 Replies

Create Login For Website When Signin Button Is Clicked?

May 13, 2010

I want to create a login in my website. I have 2 textbox one for importing the username and the other one for importing the password and I have a button for sign in. How can we create a login when the signin button is clicked? I want to write my codes with session.

View 3 Replies

Security :: Signin As A Different User Functionality In Web App With Windows Authentication

Apr 19, 2010

We have an ASP.NET Web App, where we want to provide a link 'Sign in as a different user' on a page. Authentication mode is Windows. Went through a couple of articles (like setting the statuscode =401). We want to authenticate the user, and then redirect him to a specific page (say 'ReviewTask.aspx');

View 2 Replies

Invoke A Forms Auth Login Modal Dialog Instead Of Redirecting To A LoginUrl Signin Page?

Dec 21, 2010

I've just finished implementing a modal dialog login popup for my ASP.NET website. The experience is similar to what you get with [URL]. When you log in, you get a fancy popup modal dialog (provided by the JQuery Tools Overlay control). The dialog is an ASCX file in the Master Page, so it's available globally. It uses a PageMethod to validate the current user. If the validation succeeds, I call window.location.reload(); in the PageMethod's success callback.

This works great when logging in on a page that doesn't require authentication, but what about when non-auth users are trying to navigate to a page that requires auth?

Is it possible to modify my web.config file so that instead of redirecting to a SignIn.aspx page for non-authenticated users I simply invoke the modal dialog instead?

Let's say a non-authenticated user is on Default.aspx which doesn't require auth. He wants to navigate to "Add.aspx" which does require auth. What's the best way to handle this with a modal dialog popup?

If I have to use a dedicated page, I guess I'll just have a SignIn.aspx page that invokes the dialog when it loads and if authentication succeeds, it'll use JavaScript to redirect to the destination page.

But ideally, I'd like to do the login from the Default.page and then redirect to "Add.aspx" with script.

View 1 Replies

Web Forms :: Get The Datasource That Is Stored In A Session?

Mar 12, 2010

I have stored the datasource of my datagrid in a session

Session["datagrid"]=dataSource.ID;

On retriveing I am setting the gridview datasource to the session.

resultgrid.DataSourceID=Session["datagrid"].ToString();

resultgrid.DataBind();

But I am not getting anything on the page.

View 1 Replies

DataTable In Session Or Stored Procedure Paging In C#

Apr 4, 2011

keeping 1000 records in a datatable in session and do paging using that?

Or

doing paging in stored procedure level and requesting 35 records each time?

more info:

datatable of 40 columns
number of users is 200 users
7 application are running on IIS
Oracle DB server is not the same server for IIS

Edit: the user may update a row, and submit it to database. which will refresh the grid by requesting the whole data from database.

Edit2: Every user is loading different datatable which coming from same table in database

View 2 Replies

Looping Through Jagged Array Stored In Session?

Feb 24, 2010

im having some problems with jagged arrays stored in session for ASP.net i have some code which creates a jagged array, them populates, and then stores this populated jagged array into session

protected string[][] answersJArray;
answersJArray[0] = new string[4]("test","test1","test2","test3"};
answersJArray[1] = new string[4]("test","test1","test2","test3"};
Session.Add("answersJArray", answersJArray);

how would i loop through each jagged array in the session ?? if they were not in session i no i could do the following

for (j = 0; j < answersJArray[1].Length; j++)
{
label.Text = (answersJArray[1][j].ToString());
}

how would i do the above by looping through the session ??

View 2 Replies

How To Read Back An Object Stored In A Session

Jun 2, 2010

First of all, here comes the load part.

Structure MainStruct
Dim Ans1 As String
Dim Ans2 As String
End Structure [code]....

The question is how can i read back the contents of the list, stored in the Session?

I mean something like...Build = Session("MyData")

View 2 Replies

Web Forms :: AbsoluteURI Stored In Session - Not Working In IE?

Nov 1, 2010

This is a really strange problem for something that should be simple.I'm storing a URL - which contains search strings - into a session so I can create a 'back to search' link on the item page. It works in Firefox but in IE it only brings back the URI without any parameters

[Code]....

and then to read it...

[Code]....

In Firefox I get the full URI but in IE it only returnshttp://localhost:6666/Search/Default.aspx

View 4 Replies

DataSource Controls :: Stored Procedure And Session?

Jun 1, 2010

ALTER PROCEDURE insertdetails2

View 9 Replies

How To Rebind The Grid With Cached Dataset Stored In Session

Aug 19, 2010

I have a grid with one TemplateField which is a checkbox and say 2 bound fields.

In Page_Load on postback I rebind the grid with cached dataset stored in session. If user selects checkbox on the grid, upon postback i can iterate on the grid and get those checked values, everything works fine.

If I move the code of grid binding on postback to OnInit instead of Page_Load then i loose those user checked checkbox data. Why? Should the postback data not overlay on top of the grid after oninit?

It does work with page_load, I'm assuming that when i rebind the grid, I'm overlaying my data on grid which has postback data, since the checkbox column is not bound i do not overwrite postback data.

NOTE: viewstate is disabled on my grid, i bind data (stored in session) on everyback postback. Also something weird, when I'm using OnInit, on every postback i get the first page of the grid, no matter which page the postback was triggered.

View 3 Replies

State Management :: Navigate Through A List Stored In Session?

Aug 31, 2010

I would have a dataset that I would break into 5 new generic LIST<>. Now the user needs to see one record at a time and navigate through the list

Fields like
From date : Text box with calendar
To Date : Text box with calendar
Manager Reporting To : Drop down list
Buttons on Move Back and move Forward

Now I would have 4 such similar lists which I have to pick up from the audit table. When the user clicks on move back and move forward buttons he should be able to navigate through records in my list that I have fetched in the beginning . I can store itin a session or viewstate till it gets updated again. How do I achieve this.

Should I be writing a webmethod to go back and pick up the next record agian and display

Can I also a gridview instead of textboxes.

View 2 Replies

Pdf - Maximum Amount Of Data Stored In Session Variables?

Jan 11, 2011

I have a form where users can upload Pdf files(about 30 pages to one document or so). I want to delay storing these Pdfs in the database until the user submits the entire form. The problem is that the collection of files uploaded must be able to persist through postbacks. That being said, I am considering storing these as session variables, however, would this be too much data to store, or are session variables meant to store a couple strings here and there? If this method is not acceptable, is there an alternate method?

View 2 Replies

Unexpected Behaviour Of Object Stored In Web Service Session?

May 7, 2010

I'm using Session variables inside a web service to maintain state between successive method calls by an external application called QBWC. I set this up by decorating my web service methods with this attribute:

[WebMethod(EnableSession = true)]

I'm using the Session variable to store an instance of a custom object called QueueManager. The QueueManager has a property called ChangeQueue which looks like this:

[Serializable]
public class QueueManager
{

[code]...

View 1 Replies

.net - String Exists In A Collection Stored In .Net Session State?

Jan 8, 2010

I have an ASP.Net app that retrieves a collection of roles for a given user. Each role is a string. There's rarely more than 2-3 roles for any one person.I wanted to store the colelction of roles in Session state to save the time accessing the DB on each request.I basically want to write code that checks if a given string exists in the collection to test if the user has that role or not.My question is...what's the best way to do this? Is an array the best collection to store the role strings in Session with? Or is a dictionary better? I figure an array will take less memory (I don't really need a key + value) although a dictionary might lookup faster.

View 4 Replies

State Management :: Session Values Are Not Getting Stored If More Users Access The Site

Apr 2, 2010

l am facing a problem with session.

If many users access the site, the session gets crashed and data which i store to access across pages is getting lost.

a best way to store data (as session does) so that i can use the data across my web application.

View 5 Replies

C# - Is A Variable Stored In Session Deserialized Once Or Multiple Times Throughout A Page Lifecycle

Jan 27, 2010

I would like to wrap Session variables in a manner similar to that discussed on CodeProject.

[code]....

Here is my question: if I have to access CurrentUser multiple times in the same page, would I get a performance improvement by assigning it to a local variable instead of accessing the wrapping property? Or does the HttpSessionState make sure the object is only deserialized once per request, so that subsequent calls in the same http request don't cost any more?

View 4 Replies

How To Use A MembershipProvider To Carry Over Users' Session Data Stored In Cookies Set By ColdFusion

Feb 15, 2011

I'm working on adding a new webapp to an existing website. I've been directed to write the webapp in ASP.NET. The existing website is written in ColdFusion. For the most part, the ASP.NET webapp is completely stand-alone, but it needs to interact with the ColdFusion code in one important way - if somebody logs in to the ColdFusion site, we don't want them to have to log in again when visiting an ASP.NET page.

When someone logs in to the ColdFusion site, their username is stored in a cookie, along with a login token that can be looked up in our database. My .NET is a little rusty, so I'm having trouble visualizing how the ASP.NET code should use this data. I've already written a simple MembershipProvider that can be used to log in/out out the ASP.NET app using the data in our existing database tables, which are shared with the ColdFusion code.

What I'd like to know is - how can I make sure the ASP.NET app detects the cookies set by the ColdFusion app (I imagine they'd be sent to the ASP.NET pages, since everything is hosted on one domain), and automatically logs the user in using the MembershipProvider and Forms Authentication, using the credentials supplied in the cookie? I'm thinking that putting some kind of cookie check and log in function in the Global.asax file, set to run every page load for every page... but that seems kind of clunky. Also, do people still use the Global.asax file anyway? I had thought there was a more modern method.... Also, how can I manually log someone in using Forms Authentication and a custom membership provider? Currently my code allows the user to log in using the provided login control, but I'm not sure how to log the user in without them having to do anything.Looking over the MembershipProvider tutorials and the MSDN documentation it seems to me like the answer should be staring me in the face, but for some reason I just can't see it. Maybe not enough coffee....

View 3 Replies

State Management :: Lost Some Values From Collection Stored In Session Variable?

Jul 27, 2010

I am creating a presentation on basis of some selected values and maitaning the selected values in a session variable named Session("userPref") in collection form.

Now I am opening a TablePreview.aspx page by javascript window.open() function.

On Page_Load of TablePreview.aspx I am reading some values of Session("userPref") and doing some operatons.

For saving the presentation I have created a page wizardsave.aspx.

Now I am opening the wizardsave.aspx from TablePreview.aspx by window.open() function for saving presentation, but on Page_Load of wizardsave.aspx. I found that some value from collection stored in Session("userPref") have lost.

View 4 Replies

State Management :: Session Variable Be Hacked As They Are Stored In An External Data Source?

May 30, 2010

i have done the following

void Session_Start(object sender, EventArgs e)
{
// Code that runs when a new session is started [code]...

basically am using them to store user id and status, so that pages can be validated, by there use.i can stop person from accessing home directly wihtout signing is and so on.can session variable be hacked as they are stored in an external data source and are available to the full website?

View 3 Replies

C# - List Output / On Click Add Data To The List Which Is Then Stored Into A Session Variable?

Dec 1, 2010

How would I create a list then on click add data to the list which is then stored into a session variable, then on another page retrieve the variable and output them? Currently I have:

Page Load:

List <myClass> listName=new List<myClass>

OnClick:

listName.add(3);
listName.add(4);

Session["IDs"]=listName;
Second Page

I need to get the whole list and add output the list so I can output (hopefully) the '3' and '4'.

View 1 Replies

Forms Data Controls :: Populate Drop Down List Using Stored Stored Procedure

Mar 14, 2010

i want data to drop down list using stored procedure .

However im not able to do that.

View 3 Replies







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