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...
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,...
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!
...
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...
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...
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...
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
...
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 ...
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();
...
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...
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...
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 ...
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" />
...
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...
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...
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...
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...
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
...
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...
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...