473,387 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Same Session for 2 different Applications

hi

i'd like to be able to access the same objects in the session but by
different applications on the same webserver.

example:
C#-WebApp creates Session-Object "xxx" and redirect to a VB-WebApp which
should be able to read this Session-Object "xxx".
how can i do this?

thanx for ever hint.
regards, jazper
Nov 18 '05 #1
3 1889
Hi Jazper,
You can pass data (for example session state, session id or Session-Object
"xxx") between two application using "Application" property:
App A write:
Application["someInt"] = iSomeInt;
App B read:
int iSomeInt = (int)Application["someInt"];

To pass data between two apps (thread) within one session use "Session"
property (as above).
To to make these methods thread - safe, use lock() or if you store a
collection, you can use, ICollection.Synchronized(ICollection) method
Regards,
MK

"Jazper" <ej*****@hotmail.com> wrote in message
news:eV****************@TK2MSFTNGP10.phx.gbl...
hi

i'd like to be able to access the same objects in the session but by
different applications on the same webserver.

example:
C#-WebApp creates Session-Object "xxx" and redirect to a VB-WebApp which
should be able to read this Session-Object "xxx".
how can i do this?

thanx for ever hint.
regards, jazper

Nov 18 '05 #2
hi Maciej

thank you but it did not work with Application! neither with Session!
App A can write AND read the "someInt" but App B is getting null everytime!

App A write:
Application["someInt"] = iSomeInt;

App A read:
int iSomeInt = (int)Application["someInt"]; //everything OK

App B read:
int iSomeInt = (int)Application["someInt"]; // !! Application["someInt"]
returns null !!

does i have to set some property or capture session manually somehow?

regards, jazper


"Maciej Kolosinski" <ma***************@NOSPAM.globalintech.pl> wrote in
message news:br**********@nemesis.news.tpi.pl...
Hi Jazper,
You can pass data (for example session state, session id or Session-Object
"xxx") between two application using "Application" property:
App A write:
Application["someInt"] = iSomeInt;
App B read:
int iSomeInt = (int)Application["someInt"];

To pass data between two apps (thread) within one session use "Session"
property (as above).
To to make these methods thread - safe, use lock() or if you store a
collection, you can use, ICollection.Synchronized(ICollection) method
Regards,
MK

"Jazper" <ej*****@hotmail.com> wrote in message
news:eV****************@TK2MSFTNGP10.phx.gbl...
hi

i'd like to be able to access the same objects in the session but by
different applications on the same webserver.

example:
C#-WebApp creates Session-Object "xxx" and redirect to a VB-WebApp which
should be able to read this Session-Object "xxx".
how can i do this?

thanx for ever hint.
regards, jazper


Nov 18 '05 #3
now i found my failure!
both apps has to be in the same directory!

"Jazper" <ej*****@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
hi Maciej

thank you but it did not work with Application! neither with Session!
App A can write AND read the "someInt" but App B is getting null everytime!
App A write:
Application["someInt"] = iSomeInt;

App A read:
int iSomeInt = (int)Application["someInt"]; //everything OK

App B read:
int iSomeInt = (int)Application["someInt"]; // !! Application["someInt"] returns null !!

does i have to set some property or capture session manually somehow?

regards, jazper


"Maciej Kolosinski" <ma***************@NOSPAM.globalintech.pl> wrote in
message news:br**********@nemesis.news.tpi.pl...
Hi Jazper,
You can pass data (for example session state, session id or Session-Object "xxx") between two application using "Application" property:
App A write:
Application["someInt"] = iSomeInt;
App B read:
int iSomeInt = (int)Application["someInt"];

To pass data between two apps (thread) within one session use "Session"
property (as above).
To to make these methods thread - safe, use lock() or if you store a
collection, you can use, ICollection.Synchronized(ICollection) method
Regards,
MK

"Jazper" <ej*****@hotmail.com> wrote in message
news:eV****************@TK2MSFTNGP10.phx.gbl...
hi

i'd like to be able to access the same objects in the session but by
different applications on the same webserver.

example:
C#-WebApp creates Session-Object "xxx" and redirect to a VB-WebApp which should be able to read this Session-Object "xxx".
how can i do this?

thanx for ever hint.
regards, jazper



Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: W1ld0ne [MCSD] | last post by:
I am working on a site that utilises multiple applications (on IIS) written in either VB.Net and or C#.Net. All these applications run under the same domain, yet the session variables are not...
2
by: Sean | last post by:
I have an ASP.NET web application that needs to be rolled out to a number of clients. The functionality is the same in all applications, but each client has its own database. At the moment, I...
6
by: Angel | last post by:
I am trying to save private information such as user id and password from one application and send it to another application. I tried saving the information in the Session Object and when the user...
1
by: Antonio Lopez Arredondo | last post by:
hi all !!! I have an HTML page with two links: link1 point to page1.aspx link2 point to page2.aspx page1.aspx and page2.aspx are two different ASP.NET applications, that require user...
5
by: Oleg Ogurok | last post by:
Hi all, Is there a way to read other people's session variables? I understand it makes sense that session state is on per-user basis, but still... Is there a way to get a collection of all...
2
by: ryan.d.rembaum | last post by:
Hello, I am trying to build a standardized login screen that several different web application could use. What I would like is for the login screen to detect where the user has come from. ...
1
by: David Gaudine | last post by:
(This is a bit like the recent thread "PHP Switching Sessions".) I use session_start(). When I open my web-based application in two windows on the same system, there's a definite clash; I can't...
7
by: Nils Hedström | last post by:
I have a web farm that uses a state server for session management. A user logs on to a website (www1.mysite.com). When the same user visits www2.mysite.com I want the user to be logged in. Right...
5
by: jehugaleahsa | last post by:
Hello: What is the point of using a DataTable in ASP .NET? We are unsure how you can use them without 1) rebuilding them every postback, or 2) taking up precious memory. We are not sure how to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.