multiple vitrual directories in one httpcontext

  • Thread starter Thread starter dinosaur8000
  • Start date Start date
D

dinosaur8000

Hi,
I have two ASP.NET solutions in my website, located in two directories:

c:\projects\mainsite -- the main web site solution
c:\projects\newmodule -- a module I'm adding on solution

My web site's root is pointing to "c:\projects\mainsite", and I've
created a virtual directory called "newmodule" pointing to
"c:\projects\newmodule".

*** My goal is, I'd like to make it so that .aspx files within the
newmodule directory can access the HTTPContext of the mainsite.

In IIS settings, I've set the newmodule directory to be an application.
In this case, it seems to have its own HTTPContext separate to that of
the main site. If I remove the IIS Application designation from
newmodule and leave it just as a virtual directory, all its .aspx pages
give me a 404 when I try to bring them up in a browser.

Is it possible to have these two solutions share HTTPcontext? I realize
I could combine the solutions into a single directory with one bin
directory and web.config, but I need alternatives more this particular
problem. Thanks!
--Frank
 
It might be easier to take a step back and say "how do I share state
across two applications on the same server?" - because this question
will have more workable options available. Possible answers include
cookies, web services, and common database tables.

You either have to be inside the same process or you can't share
context - it's application specific.
 
Back
Top