Asp.net - Session Variables Lost In A Specific Scenario?

Dec 23, 2009

I've got a problem losing session variables in an ASP/VB.NET application. The application allows searching for an item or it can show an item if provided with a unique link (in the browser). It holds information about the item in session variables. In the webpage showing an Item a user can click a button which opens a window with additional information about the item - obtained from a session variable. When I search for the item using the search engine and click the button - it works OK.

When I copy the link to a browser: the item is shown, however clicking the button returns a 'null exception' - the session variables with information about the item are lost. Moreover when I provide the link for the second time the button works, the variables are there!

View 1 Replies


ADVERTISEMENT

C# - Redirect Page When Session Lost?

Dec 4, 2009

If my sessions time out I want to re-direct the page to another URL: Say the home page. On my page I make use of a GridView that uses Session variables. If the session variable time expire(currently at 60min) and the user click on a row in the GridView I want to re-direct him/her to the home page of my site.

View 3 Replies

Session Lost When New Window Is Opened By A WebBrowser Control?

Apr 11, 2012

I am developing an application which has a WebBrowser control, and it navigates to a tal.ki forum. Now tal.ki allows users to sign in using existing accounts in google or facebook, and opens a new window for the same.Now when i click log in, a new IE window opens up, which asks me to log in, i provide the information, the window closes, but the user is not logged into the forum.I have heard that session plays some part here, but i don't know anything i can do for this. I tried WebKitBrowser but that not even opens a window to log in.

View 1 Replies

Session State Lost After HttpWebRequest Within AJAX Post?

Dec 21, 2011

I have a bit of strange behaviour in an asp.net web application that involves the session state being lost.

Process A user logs into the application and the session is set. They then fill out 1 field, and the application then does an AJAX POST to a .asmx web service. Within the web service, I am using a HttpWebRequest to grab data from another server.

This data is then output to the browser.A few more fields are then filled in, and the data is then again Post to the same web service via an AJAX POST.

[Code]...

View 2 Replies

Asp.net - Using Session Variables In IE?

May 14, 2012

I have an ASP.NET application that I am developing. I'm using session variables within the app.In Firefox & Chrome, they all work.But in IE (ver 9), there's one variable that's not working. I'm not sure if it's a storage or a retrieval (or both) at this point. The variable in question that I'm storing is a List(T) type. It's the only one of it's kind that I'm using. Can't help but think there's a correlation there.One other old post mentioned the possibility that cache is causing the problem, but I didn't understand the answer very well.

Dim Rec_IDs As New List(Of String)
Rec_IDs = Session("Rec_IDs")
and
Dim Rec_IDs As New List(Of String)

[code].....

View 1 Replies

Get Data And Set It To Session Variables?

May 14, 2010

I am using a sqlDataReader to get data and set it to session variables. The problem is it doesn't want to work with expressions. I can reference any other column in the table, but not the expressions. The SQL does work. The code is below.

[Code]...

View 3 Replies

Passing Session Variables

Jan 21, 2009

I have an ASP.NET 2003 web application. There is a .vb module file within that application. Is there anyway I can pass a session variable into this .vb module from a aspx.vb page?

View 2 Replies

Save Variables From One Session To The Next?

Dec 28, 2010

what is the best way to save variables from one session to the next.when the program starts i want the defaults to be the same but as they are changed in the program the stored value should update.

View 2 Replies

Session Variables And Arrays

May 18, 2011

I loading an array with data from my data base and then putting into a session Variable. I do not get any errors on that code. When I try to put the session Variable back into an array in my .aspx page I receive the following error message: [code]

View 5 Replies

Asp.net - Session Variables On An Intranet ASP/.NET Page?

Jul 8, 2010

I'm planning to use some session variables on an intranet ASP/VB.NET page, and want to make sure that I'm not missing out on anything important I should know, or that I have my information mixed up. So here's what I (think) I know about session variables.They:are stored on the server, so if I have a lot of users then they'll each be using some more memory which could lead to a slowdown.are inaccessible by the user unless I expose access. hang around/persist across user requests (i.e. each time the user makes a request from the page the data will still be there - until it times out). This also means that I need to make sure that the variable doens't have "left over" data in it.

Is there anything that I've got totally wrong, or anything I'm missing? I'd prefer not to get bitten by a bug down the road because I think I understand what's going on.

View 1 Replies

Do Desktop Applications Need Session Variables

Jan 18, 2011

I am trying to create an application similar to a quiz engine. I was wondering if I need session variables to store information between different pages or I can pull the data directly out of textboxes.I am using C-sharp,dot net and WPF.

View 4 Replies

Efficient / Preferred Way Of Using Session Variables?

Jan 28, 2011

I have an ASP DataGrid and I'm applying sorting to it. Well, as I was looking at an example, they had a function similar in function, different in name, to[code]...

View 3 Replies

Javascript Equivalent For Session Variables In VB?

May 31, 2011

I have some VB code, which I can no longer use (long story). It goes like this:

Session.Contents("LetterVariables") = Nothing

Is there a javascript equivalent?

View 2 Replies

Losing Session Variables When Loging In With IE?

Jun 10, 2009

I am trying to fix an ASP.NET application that is also written is VB and uses session variables to store the information from the logging page. In Firefox, the application runs just fine, but in IE (I am using IE 8), when I summit the logging credentials, the session variables become empty (takes me back to the logging pageThe weird thing is that when I move the privacy settings in IE (doesn't matter if high to low, or low to high) and enter the logging information again, the runs great. Also if I restart IIS 6.0 the application runs great. What's going on?

View 5 Replies

Accessing Public Class Variables In Asp.net Without Session?

Feb 15, 2012

I am using this example I found to learn how to load class files and access variables through them. This is in a file called Class1.vb in the App_Code folder (this is not an app project):

Imports Microsoft.VisualBasic
Public Class my_class
Public Shared Sub my_sub()

[Code]....

How could I access the vartest variable without using a session, since if this is accessed by multiple functions at the same time the variable can be overwritten I assume. Is it possible to go the other way, where a variable is sent to a class file?

View 4 Replies

GridView - Using Session To Pass Variables From Page

Aug 3, 2011

I have a gridview and use a session to pass the variables from the page to an edit page. This works perfectly, until you search for a number. When you search the correct record displays in gridview, but when you click edit, it passes the wrong record.

Private Sub gridview1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing
Session("wr_id") = GridView1.Rows(e.NewEditIndex).Cells(2).Text & "~/~" & _
GridView1.Rows(e.NewEditIndex).Cells(3).Text & "~/~" & _
GridView1.Rows(e.NewEditIndex).Cells(4).Text & "~/~" & _
[Code] .....

I realize not all of the code is pasted in here, because it would take too much space. Any Ideas? I'm guessing it has something to do with e.NewEditIndex

View 2 Replies

Asp.net - Use Session Variables To Prevent Infinite Web Form Popups?

Apr 6, 2012

I have a web application that allows a user to view family members.

When the user clicks on a family member, it displays the member's basic info. There is also a grid displaying that family member's related family members. (e.g. User can click on the Father link. From that popup, they can then click on the Father's Father link, then click on the Father's Father's Grandson link, etc.).

To reduce the number of popups that appear on the screen, I want to prevent the user from continually clicking on family links past three members.

What is the best way to keep track on how many data forms have popped up? Or can this reliably be done with a web application?

View 2 Replies

Asp.net Mvc - Session Variables Not Saving On Initial Page Load?

Mar 25, 2011

I have an MVC application which sets some session variables based on internal static IP addresses.I have built an ApplicationController to override the OnActionExecuted sub in MVC for data that I need to use throughout my application.However, the code below, which is just a snippet of my code but is edited for my post, only partially works. On initial page load, the session variables aren't saved, but after a page refresh they are. The issue I have is that these need to be saved on the initial page load.

If Session("Item1") = Nothing Then
If IpAddressShort <> "" Then
Dim locInfo = cmsRepository.GetInfoBasedOnLocation(IpAddressShort).SingleOrDefault()
If locInfo IsNot Nothing Then

[code]....

Theoretically, if I'm correct, if there is no Session("Item1") set/if Session("Item1") is empty, then the rest of the snippet should run and set those variables.How come this isn't setting those variables on the first time the page load?

View 2 Replies

SQL Server - Storing And Retrieving Session Variables During Login

Feb 20, 2009

Is there a way to set session variables during login that are then available to reports? We have a reporting services server where we move and denormalize data from our transaction system for reporting purposes. In order to allow our users to login with the same user name and password from the transactional system we have set up custom forms authentication and after much trial and error it is finally working. In addition we have the authorization accessing our transactional system so that any changes in user authority is immediately reflected in Reporting Services.

Our problem now is that we would like to add some additional features such as locking down parameters depending on user authority/groups in our transactional system. We have found a way to do it but it's inefficient, basically we have stored procedures that will query our transactional system to check for access. The problem is that these queries will often be run for every report request even though the answer is unlikely to change. It would be nice to have access to session level data that can be set once during log in and then accessed from the reports.

View 3 Replies

Creating A Session Specific Global Variable?

May 12, 2012

Is it possible to create a variable that is global for each session in ASP.NET? Usually I do this with Session:

Session("my_variable") = 10
But this necessitates casting it every time I want to use it like so:
Dim my_variable as String = CInt(Session("my_variable"))

[code]......

View 2 Replies

Application That Opens A Session To A Specific IP Port / Writes To A Test File Everything It Receives

Feb 20, 2009

I've had a search through a number of extremely useful articles on the forums, however rather than reinvent the wheel I thought I would ask if anyone already had what I am looking for..A simply little VB app that opens a session to a specific IP port and then writes to a test file everything it receives. If the connection drops, simply re-stablish it and keep listening for text to write to the file.

View 1 Replies

Sharing User Specific Variables?

Jun 9, 2011

I am building an ASPX web site which has several pages and multiple users.I grab specific info about each user such as UserName, ID, etc. when they start a session and I need to retain this info and have access to it from each page (which has it's own class).I know i can create a global file and share variables publicly, but i need the variable values to be specific to the user, not the entire application.

View 2 Replies

Asp.net - Adding A Session ID To A Link For Automatic Session Start?

Dec 8, 2011

I am storing a session variable that a user types into a textbox. With their valid input, their session gets created and they get a little more functionality than the regular end users of the site.I was wondering if it is possible to find a way to add someone's session variable to the end of a URL. This way we can email a link to one of our clients, they click it, and their session has automatically begun. They already have the textbox to enter their code into, but I was told that it would be much easier for the users to just click a link that will start their session.

View 1 Replies

Get A NullReferenceException In The Following Scenario?

Jun 8, 2010

How can I get a NullReferenceException in the following scenario?

Dim langs As IEnumerable(Of SomeCustomObject) = //some LINQ query
If langs Is Nothing Then Return Nothing
If langs.Count = 1 Then //NullReferenceException here

What am I missing here? Debug shows that langs is really just a LINQ queryresult without any results...

View 3 Replies

Steps To Take For My Scenario Using WCF?

Mar 6, 2011

I should start a project where several clients are included. There is a wcf web service controler that after a call from an specific client about a certain question it will retrive data from a server in London and then it will pass it back to the corresponding client in a different country e.g.

Clients and service are far away. the only way of transportation is through HTTP and intenet connection. Service should be able to callback also so i guess it will be dualHttpBinding.

View 2 Replies

How To Approach Scenario / Approve Changes

Apr 11, 2010

I'm working on a system where there can be 2 level of users "Admin" or "Researcher".We have the requirement to allow the researcher to change fields for a record a record, but they want the original values to stay in the record and have an admin "accept" or "approve" the changes before the real record gets updated.Has anyone run into this scenario before? I'm trying to think of the best way to do this.

View 3 Replies

Removing Bad Data In A Scenario?

Jul 21, 2011

If we have an input text file such as:

ac 5
as 3
bc 5

[code].....

and in the given situation i dont need "bad data line", what would the codes be to remove it?

View 3 Replies

Session Id Or Session Number Of The Connection With Mssql?

May 28, 2009

On startup of my software which i developed in vb.net, it connects to mssql server. I want to have session id or session number of the connection with mssql. I'm sure it is unique number and i want to use this session in my software for different purposes. My question is

1. is there anything like session id or session unique number when you connection mssql server

2. if yes to 1 then how i can get it in vb

View 1 Replies

Write Pseudocode/algorithm For A Scenario?

Apr 21, 2010

I have a class exercise that I need to do by next week. The problem is that I don't know how to write it.What I have to do is write pseudocode/algorithm for a scenario.I understand that I need to use a 5 step process for it but I don't know how to turn it into pseudocode.This is the scenario (there are 3 from memory that I need to do this is just one)"you want to estimate the number of hours it will take you to complete all of the levels in a new video game based on your past perfomance with other games."

I know I need to break it down into inputs, outputs and processes? I think that's right, but I'm struggling with writing it and getting it started.I don't need to use any actual code for the exercise. I just have to do the pseudocode and a flow chart for each scenario.

View 6 Replies

.net - StreamReader Scoping In Exception Thrown Scenario?

Aug 24, 2011

In the following subroutine, will the StreamReader be closed properly when the exception is thrown? Or do I have do something myself to ensure this?

[Code]...

View 2 Replies







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