session-variables

ASP.Net Session data lost between pages

I came across a weird behavior today w/ my web application. When I navigate from a page to another, I lose one particular session variable data. I'm able to launch the app in firefox and able to see that the session data is not lost. I use Response.Redirect(page2, false) to redirect to another page. Below code was used to track sessi...

How to work with session variables in php mvc pattern

Hello, I just found out that I loose any reference to the session array if I create a new view and try to set a session variable in the controller. The array just comes out as empty. I actually try to use the session array to store the post vars from a multistep registration form. This was actually working when the php was spachetticode,...

ASP.NET and Session State/Login info

Are Session variables (in ASP.NET) the safest way to store data relating to whether a user is logged in or not? i.e. Session["LoggedIn"] = 'No' I know Session variables can be spoofed so I assume there must be a safer way. Any ideas for ASP.NET? Thanks! ...

What is the best way to manage one's session variables?

In my .NET web app, I keep basic user info in a user session object. I also usually keep a director class in the session; which is basically just has info about whatever thing it being worked on on that screen (like a customer id). I am trying to keep from adding a ton of sessions. I also want to make sure at any given time ONLY the ses...

Is it Advisable to store Gridview search results in Session?

Good Morning, I have created an ASP.NET 3.5 webform that allows users to search a parts list. The two textbox controls supply the input paramenters to the stored procedure. The gridview returns the search results from the stored procedure. I have enhanced the gridview to include a template field with a textbox for Quantity, as well...

(php) how to properly 'save' info in forms completed thus far

So i have a form that on paper is 40 pages long. I was going to take the natural sections of this form, and make separate html forms for each section, with the idea that on the first page there would be a first form, then you hit 'Continue to next section' which essentially is the 'submit' button, which moves the user to section two, etc...

ASP.NET Session or global variables?

Hi, I am creating an ASP.NET page where I need a couple of variables which hold pathnames and a chosen language etc... Not that many, let's say about 5. Should I use session variables for this? Atm I'm using public static variables but I'm not sure if this is the right way to do this. Any thoughts? Thx ...

Removing $_SESSION['layout']['action'] globally from all users!

Ok, I am storing a session variable like so to load up users layouts faster if it's set instead of calling the database. But since the layout can be changed via the Administrator, I'd like to be able to globally remove all sessions where $_SESSION['layout']['action'] is set for all users. $_SESSION['layout']['action'] = array(a ton of ...

How can i get the value of a session variable inside a static method in c#?

I am using asp.net pagemethods with jquery.... How to get the value of a session variable inside static method in c#... protected void Page_Load(object sender, EventArgs e) { Session["UserName"] = "Pandiya"; } [WebMethod] public static string GetName() { string s = Session["UserName"].ToString(); ...

Rails Sessions current practices (especially for rails 3)

Anyone have any "best practices" tips for Rails and sessions? The default session type for Rails3 is still cookie store, right? I used SqlSessionStore for a while and it worked well, but I may move away from that in favor of CookieStore. Is it still not a good idea to use CookieStore for sensitive info, even with salted info or is that...

How do I pass session variables from one domain to another in PHP

Hi everyone, I have encountered a situation where I need to pass $_SESSION variables from one domain to an iFrame page from another domain. I have spent the last 16 days trying various methods to no avail. I think that the only logical way would be to encode the variables in the url that calls the iFrame and decode them in th iFrame pag...

Display gridview in new window

Hello all. Just a bit of advice needed really in terms of how I should handle my current scenario: I have a web page that searches for products/category information the results of which are at present displayed in a gridview on the same page. However, said gridview is a bit of a beast and as such, I would like to have a page that the ...

Can I use an <asp:SessionParameter Direction="Output"/> to *set* a variable?

If I have a SqlDataSource with InsertCommand="INSERT [Applications] ([UserID]) VALUES (@UserID);SELECT @ApplicationID=SCOPE_IDENTITY()" Can I use a SessionParameter to store the returned value? <asp:SessionParameter SessionField="__ApplicationID" Name="ApplicationID" Type="int32" Direction="Output" DefaultValue="-1" /> ...

Issue Querying LDAP DirectoryEntry in ASP.NET

I have users login to my application via Active Directory and then pull from their AD information to garner information about that user like so: Dim ID as FormsIdentity = DirectCast(User.Identity, FormsIdentity) Dim ticket as FormsAuthenticationTicket = ID.Ticket Dim adDirectory as New DirectoryEntry("LDAP://DC=my,DC=domain,DC=com") Dim...

Session Objects not Updating ASP.NET

I set a session object at one juncture in my code: Session("my_name") = "Dave" Later in my code I give the user a chance to update this object: Session("my_name") = TextBox1.Text I reload my page and display a little hello statement like this: Label1.Text = "Hello" & CStr(Session("my_name")) The result is: "Hello Dave" no matter...

Session variable getting lost using Firefox, works in IE

I am setting a Session variable in an HttpHandler, and then getting its value in the Page_load event of an ASPX page. I'm setting it using public void ProcessRequest(HttpContext context) { HttpPostedFile file = context.Request.Files["Filedata"]; context.Session["WorkingImage"] = file.FileName; } (And befor...

How to get Session Data with out having HttpContext.Current, by SessionID

I am searching to find a way to read and write on session data but with out having the HttpContext.Current. Why I won to do that ?, because I wish to make some action with the user Session after the page have been close and unloaded. For example, a user load and see a page, then I create a thread to make some action and let user go. I...

ASP.NET/PHP: How to pass session variable from PHP to ASP.NET

I was wondering if it's possible to pass a session coming from PHP by simply clicking a link from the PHP site from PHP site: Click here and then the ASP.NET site (www.123company.com) will get the value of id=1 and use it to validate an existing function. Is it possible? Comments and suggestions are welcome. Thanks ...

Pass Session data to a Class Library without using a bunch of constructors?

Hi all, I've got my application here where literally every object has a lastUpdatedBy property. The information I put into here is the person's username, which is retrieved from the session("username") variable. How can I pass this data to my DAL in the class library? At first I was just passing in the value into each method, but thi...

Session cookie issue in IE8 for Classic ASP code running on IIS 7.5 (Windows 7)

I needed to run a development server for our Classic ASP intranet application on a Windows 7 machine at home, and managed to install it with no problems, except that session data does not seem to store on IE8 browsers, but works fine on other browsers. If I write a simple script just to see the session ID and see what happens when I ref...