Click to See Complete Forum and Search --> : simple Session question


jhammer
June 13th, 2006, 02:06 AM
I have two aspx pages in two different web projects.
From one aspx I want to redirect to the other web page, passing session variables.
The second aspx does not recieve the variables, they are equal to null.

When doing the above in the same web project (both pages in the same project) it works.

What am I doing wrong?

Shuja Ali
June 13th, 2006, 02:16 AM
I guess it is because the ASPX pages belong to two different applications. Session objects are valid within the current AppDomain for that particular AppDomain.

Cann't you pass the Session variables using a query string to the second ASPX page and save them there?

jhammer
June 13th, 2006, 04:00 AM
I tried QueryString, and it worked.
The thing is, that I want to pass lots of parameters, some of them I wish to be hidden from users. QueryString is not so suitable for this. I would prefer to use Session. There is no possible way to do it?

Shuja Ali
June 13th, 2006, 04:14 AM
As I said Session Variables belong to one particular application and as your second ASPX page belongs to a totally different application, it might be little bit difficult to achieve that.

Alsvha
June 13th, 2006, 04:46 AM
The way easiest method of doing is this as already suggested by the previous poster - querystrings.

Other alternatives exists (such as for example using HttpWebRequest to send forms from one application to the other containing the data etc) however they'll all take some development to implement.

jhammer
June 13th, 2006, 05:26 AM
Ok, thank you both for your input.
I will stick to querystrings at the moment.

jasonli
June 19th, 2006, 10:38 AM
Maybe you could try another way using database.