473,786 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.b r
www.softway.com.br
----------------------------------------------------------

Nov 15 '05 #1
4 5393
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$******** ******@TK2MSFTN GP10.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.b r
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$******** ******@TK2MSFTN GP10.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.b r
www.softway.com.br
----------------------------------------------------------

Nov 15 '05 #3
"Alexandre" <al************ **@softway.com. br> wrote in message
news:O$******** ******@TK2MSFTN GP10.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" stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se" timeout="20"/>
--
thanks a lot....

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


Nov 15 '05 #4
"Alexandre" <al************ **@softway.com. br> wrote in message
news:O$******** ******@TK2MSFTN GP10.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" stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se" timeout="20"/>
--
thanks a lot....

---------------------------------------------------------
Alexandre Santos
Softway - Sistemas
Tel: (48) 9101-1167 || (48) 251-8664
al************* *@softway.com.b r
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
1700
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 standalone apps and are now one by one being added to an umbrella project. For instance OpenOrderReport is a asp project with numerous references to third part controls, etc. It's existed a http://where-ever/Openorderreport for months and is...
1
1297
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
3384
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 applications running on it) and when I am sitting at that server running the application, it also runs fine. But, if I sit at any workstation on the LAN it does not work. I narrowed the problem down to the fact that all of the session objects contain...
3
2013
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
1536
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 read session variables. However, I'm finding that if I set a session variable in a call from WebClient1, I cannot read that session variable in a call from WebClient2. Is this normal? What can I do about this ?
3
3445
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 session object (using state service). I'd like to start breaking out our functionality into component projects, but I'd like to get this session issue worked out first. Any ideas?? I found this article , but it sounds like kind of a pain.
31
7009
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 using Session variables for three years now and i'm entering a project with my new boss who has never quite come around that session variables are ok. What's the concensus here. How can i convince him that they are ok in ASP.NET. OR
1
1800
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 project from that other server, the session state variables are being set randomly. For example, in the following code: SetSelectionSessionState();...
4
2515
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...) Any reason why even though I did this I keep getting this error.... Server Error in '/abc' Application.
0
10357
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10163
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9959
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7510
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.