473,321 Members | 1,667 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,321 software developers and data experts.

C# Session State in all projects

Hi,
I have some projects (webs applications)
and i want to shared Session between the projects but, they are differents
"dll/aplications". Like this:
Session["user"] i want to see then value in all applications
how can i do this?
Using sql-server? How?
thanks a lot....

---------------------------------------------------------
Alexandre Santos
Softway - Sistemas
Tel: (48) 9101-1167 || (48) 251-8664
al**************@softway.com.br
www.softway.com.br
----------------------------------------------------------

Nov 15 '05 #1
4 5366
It seems that you don't understand the meaning of Session variables. A
Session is bind to a specific user, and only one, that access your web
application, so even another user that uses that application cannot see that
variable (but by using a static classes you can do that). Sharing an
information between the users of the same application is done usually
through Application level collection.
So to have an information shared between applications I think you have two
options:
1. bind one application as a client to the second and keep the shared
information at application level in the second
2. use an external repository for that info (DB, file or whatever)
--
Horatiu Ripa

"Alexandre" <al**************@softway.com.br> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
Hi,
I have some projects (webs applications)
and i want to shared Session between the projects but, they are differents "dll/aplications". Like this:
Session["user"] i want to see then value in all applications
how can i do this?
Using sql-server? How?
thanks a lot....

---------------------------------------------------------
Alexandre Santos
Softway - Sistemas
Tel: (48) 9101-1167 || (48) 251-8664
al**************@softway.com.br
www.softway.com.br
----------------------------------------------------------

Nov 15 '05 #2
It seems that you don't understand the meaning of Session variables. A
Session is bind to a specific user, and only one, that access your web
application, so even another user that uses that application cannot see that
variable (but by using a static classes you can do that). Sharing an
information between the users of the same application is done usually
through Application level collection.
So to have an information shared between applications I think you have two
options:
1. bind one application as a client to the second and keep the shared
information at application level in the second
2. use an external repository for that info (DB, file or whatever)
--
Horatiu Ripa

"Alexandre" <al**************@softway.com.br> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
Hi,
I have some projects (webs applications)
and i want to shared Session between the projects but, they are differents "dll/aplications". Like this:
Session["user"] i want to see then value in all applications
how can i do this?
Using sql-server? How?
thanks a lot....

---------------------------------------------------------
Alexandre Santos
Softway - Sistemas
Tel: (48) 9101-1167 || (48) 251-8664
al**************@softway.com.br
www.softway.com.br
----------------------------------------------------------

Nov 15 '05 #3
"Alexandre" <al**************@softway.com.br> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
Hi,
I have some projects (webs applications)
and i want to shared Session between the projects but, they are differents "dll/aplications". Like this:
Session["user"] i want to see then value in all applications
how can i do this?
Using sql-server? How? Configure your webapps inside web.config file to use a state server that
would be in memory or use a SQL State server.

See the online help how to do that...

see this section and change it...
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="20"/>
--
thanks a lot....

---------------------------------------------------------
Alexandre Santos
Softway - Sistemas
Tel: (48) 9101-1167 || (48) 251-8664
al**************@softway.com.br
www.softway.com.br
----------------------------------------------------------


Nov 15 '05 #4
"Alexandre" <al**************@softway.com.br> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
Hi,
I have some projects (webs applications)
and i want to shared Session between the projects but, they are differents "dll/aplications". Like this:
Session["user"] i want to see then value in all applications
how can i do this?
Using sql-server? How? Configure your webapps inside web.config file to use a state server that
would be in memory or use a SQL State server.

See the online help how to do that...

see this section and change it...
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="20"/>
--
thanks a lot....

---------------------------------------------------------
Alexandre Santos
Softway - Sistemas
Tel: (48) 9101-1167 || (48) 251-8664
al**************@softway.com.br
www.softway.com.br
----------------------------------------------------------


Nov 15 '05 #5

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

Similar topics

4
by: Bill Dodd | last post by:
Is there really no way to have different asp.net applications share session variables? The problem I'm running into is that I have numerous asp.net (and asp) applications that were written as...
1
by: Bill Reynen | last post by:
Hello, Working in ASP.NET. I want to create several projects on the web server /Online /Online/App1 /Online/App2 /Online/App3
14
by: Schoo | last post by:
I have an asp.net app that uses session objects (ag. session("UserID")). The app works fine in development/debug mode. I released it to the test server (Windows 2000 server with other .NET...
3
by: grooby | last post by:
I would like to develop an asp.net Web application using muliple web projects under one solution file and share the session information between web applications( or projects). Is this possible?
5
by: JezB | last post by:
I have various web pages in two different "web application" project assemblies (WebClient1 and WebClient2), and another "class library" assembly WebLib. I have methods in the library which set and...
3
by: Mark | last post by:
Ok, I know that .net inherently does not share session data across asp.net projects, but is there any decent work around to this. We already have a big chunk of our application using the asp.net...
31
by: Harry Simpson | last post by:
I've come from the old ASP camp where session variables were not used. When i started using ASP.NET in 2001, I started using them again because it was ok from what I'd read. I've been merrily...
1
by: yoshibebe | last post by:
Hi, I have developed a project on my local machine. The session state variables are working fine on my local machine. When I port it into a another server called v-projects, and I try to run the...
4
by: Cirene | last post by:
In my web.config I added <pages enableSessionState="true">. In each of my pages I also added EnableSessionState="True" to the Page declaration. (I didn't think this was necessary, but...) ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.