473,652 Members | 2,979 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Having two ASP.NET projects share a single Session

I need to split apart my web application into multiple projects to allow it
to be distributed in parts, but all of the projects need to work together
(ie. they need to share session information). Does anyone have any
suggestions or solutions to this problem?

Thanks,
Richard Bowman
Jul 19 '05 #1
3 8395
From what I can see when developing in VB.NET, each project represents
a single assembly, and each VB-based ASP.NET Web Application project
represents its own application, running in its own application space
in IIS. As such, the session information is being maintainted at the
application level, and one web application's session is not the same
as anothers.

How would I go about developing two seperate assemblies that function
inside the same project(applica tion) space?

Richard


"Scott M." <s-***@BADSPAMsnet .net> wrote in message news:<O7******* *******@TK2MSFT NGP12.phx.gbl>. ..
Why would they have different session data? The fact that the code will be
split between 2 assemblies doesn't mean that the user will be given 2
different session ids as they access pages from each assembly.

The web server will issue a session id when the client first connects to the
site. That session id will remain in memory on the client and the server
until the user closes their browser, the server abandons the session or the
session times out. If a user accesses a page from assembly A and then
accesses a page from assembly B, the session will not have changed.


"AARON PECORARO" <aa***********@ verizon.net> wrote in message
news:Zr******** ******@nwrddc01 .gnilink.net...
I need to split apart my web application into multiple projects to allow

it
to be distributed in parts, but all of the projects need to work together
(ie. they need to share session information). Does anyone have any
suggestions or solutions to this problem?

Thanks,
Richard Bowman

Jul 19 '05 #2
In VS .NET you can have 2 or more projects (assemblies) comprise 1 solution
by opening one project and choosing File...Add Project. You'll still have 2
assemblies, but they can interact for 1 solution. This is similar to the
Visual Basic 6 Project Group concept.

You are correct in thinking that having multiple assemblies running causes
them to run in different processes, but (AFAIK) that is not where the
session data would be stored.

Here's a simple test you can do to see:

Create 2 different ASP .NET projects.
In each project place the following code into the Page_Load event of the
page that is automatically generated for you (WebForm1.aspx) :

response.write (session.sessio nID)

Run one of the pages and look at the ID.
Type in the address of the other page and look at the ID again.

They should be the same and if they are, session data can be passed between
them.
"Richard Bowman" <ri*****@bowman soft.com> wrote in message
news:9c******** *************** **@posting.goog le.com...
From what I can see when developing in VB.NET, each project represents
a single assembly, and each VB-based ASP.NET Web Application project
represents its own application, running in its own application space
in IIS. As such, the session information is being maintainted at the
application level, and one web application's session is not the same
as anothers.

How would I go about developing two seperate assemblies that function
inside the same project(applica tion) space?

Richard


"Scott M." <s-***@BADSPAMsnet .net> wrote in message

news:<O7******* *******@TK2MSFT NGP12.phx.gbl>. ..
Why would they have different session data? The fact that the code will be split between 2 assemblies doesn't mean that the user will be given 2
different session ids as they access pages from each assembly.

The web server will issue a session id when the client first connects to the site. That session id will remain in memory on the client and the server until the user closes their browser, the server abandons the session or the session times out. If a user accesses a page from assembly A and then
accesses a page from assembly B, the session will not have changed.


"AARON PECORARO" <aa***********@ verizon.net> wrote in message
news:Zr******** ******@nwrddc01 .gnilink.net...
I need to split apart my web application into multiple projects to allow
it
to be distributed in parts, but all of the projects need to work

together (ie. they need to share session information). Does anyone have any
suggestions or solutions to this problem?

Thanks,
Richard Bowman

Jul 19 '05 #3
Solutions are exactly no more than a project group, a logical grouping
of individual projects which still function autonomously. Much like
projects in the same solution still need to have explicit references
to each other, ASP.NET Web Projects (in the same solution or not) are
definitely seperated from each other. Each project, as I've mentioned
earlier, runs in its own IIS application space and does not share
session data, no matter the solution they are present in.

What I need is a solution to this problem that allows multiple
projects to share a session. I can't imagine I am the only person who
has run into this; it seems preposterous to assume that enourmous
websites must be managed in a single application.

"Scott M." <s-***@BADSPAMsnet .net> wrote in message news:<e2******* ******@TK2MSFTN GP12.phx.gbl>.. .
In VS .NET you can have 2 or more projects (assemblies) comprise 1 solution
by opening one project and choosing File...Add Project. You'll still have 2
assemblies, but they can interact for 1 solution. This is similar to the
Visual Basic 6 Project Group concept.

You are correct in thinking that having multiple assemblies running causes
them to run in different processes, but (AFAIK) that is not where the
session data would be stored.

Here's a simple test you can do to see:

Create 2 different ASP .NET projects.
In each project place the following code into the Page_Load event of the
page that is automatically generated for you (WebForm1.aspx) :

response.write (session.sessio nID)

Run one of the pages and look at the ID.
Type in the address of the other page and look at the ID again.

They should be the same and if they are, session data can be passed between
them.

Jul 19 '05 #4

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

Similar topics

1
1944
by: Simon Neve | last post by:
Hello, This question is related to sharing .Net projects across solutions and is reposted from the SourceSafe group. We have several different solutions and want to share common assemblies across them. Is it best to share the project and its files to each solution (each solution has it's own shared project), or have each solution point to the same file location of the project?
10
2067
by: Gerben van Loon | last post by:
Hi there, hope someone can help me on this: I'm planning to deploy several ASP.NET projects to a production server. Normally I used the "Project / Copy project" option in VS.NET, but to this production server I only have FTP access. I tried copying the files with a FTP tool, but it seems that every application needs to have an own virtual directory, is this true? Or is it possible to just make 1 virtual directory and put al the projects...
2
3005
by: Ahmed | last post by:
Dear All, I have three web applications that I want to provide one single web interface to all of them. If I am able to share the session between them, It will be great. so is this possibel?
2
3005
by: Roy | last post by:
Hey all, Is it possible to pass session variables between pages in separate projects? For example: inetpub\thisproject\blah.aspx has a session variable and response.redirects the user to inetpub\anotherproject\test.aspx
7
399
by: AARON PECORARO | last post by:
I need to split apart my web application into multiple projects to allow it to be distributed in parts, but all of the projects need to work together (ie. they need to share session information). Does anyone have any suggestions or solutions to this problem? Thanks, Richard Bowman
5
2166
by: Joe | last post by:
I have an application which runs in a non-secure environment. I also have an application that runs in a secure environment (both on the same machine). Is there any way to share the session data for this? Most of the site allows the user to add things to a cart (non-secure), once they choose to check-out, I need this information which was stored in the session to be read by the payment page(secured). Hope this makes sense. It's probably...
1
5648
by: Hans Kesting | last post by:
Hi, Is it possible to share sessions between subdomains? Say: the user logs in at www.company.com, and is redirected to my.company.com. This is a different url for the same application. Can I keep the session (so I still know WHO has logged in)? The problem (as I see it) is the session-cookie. If that has a domain of "www.company.com", it will not be transferred to "my.company.com".
2
3103
by: Paul Cheetham | last post by:
Hi, We are developing a large modular application, and in order to simplify splitting of work between developers etc. we want to develop it using several different projects, and then combine the results into a single site. We plan to do this by having a 'Site' folder in which the main project will sit, with each of the other projects as a sub-folder of this. The main project has master pages defined, as well as custom error pages etc....
3
2360
by: Roger | last post by:
Hi there I have several bigger applications programmed with the old ASP (vbscript). A lot of data is stored in the session object. Now I have to extend the application with new functionality (-complete new part). My idea is to develop the new part in ASP.NET (C#) and leave the old parts in the ASP environment. With this way I can migrate the old code step by step into C# and I don't need to migrate the whole project in one step (-> I...
0
8367
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8811
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
8703
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...
1
8467
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8589
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...
0
5619
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4145
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
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1591
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.