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

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 8363
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(application) space?

Richard


"Scott M." <s-***@BADSPAMsnet.net> wrote in message news:<O7**************@TK2MSFTNGP12.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.sessionID)

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*****@bowmansoft.com> wrote in message
news:9c*************************@posting.google.co m...
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(application) space?

Richard


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

news:<O7**************@TK2MSFTNGP12.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*************@TK2MSFTNGP12.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.sessionID)

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
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...
10
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...
2
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
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...
7
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)....
5
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...
1
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...
2
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...
3
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...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.