1

We inherited a website that is ~40GB in size (mostly from user-submitted content) that has a mixture of classic ASP, inline .Net and and compiled .Net associated with it. There are technically two sites associated with this and to conserve disk space I intentionally setup IIS to have two physical sites pointing to the same folder, but with independent application pools to separate the worker processes.

The problem we're running into is occasionally when you visit one of the sites it seems to pickup Application variables from the other site somehow. From everything I've seen on here/Bing, the worker processes should be separate because of the independent application pools but I'm wondering if classic ASP is throwing that off somehow? Given the mixture of everything imaginable (there are ~4,200 physical .asp/.aspx files with the latter mostly starting off with 03_ because that was the method chosen to start migrating to .Net before I got involved), is it better to have these as independent sites and folders? I can't seem to figure out why Application variables are getting flipped mid-stream, but it's causing numerous problems - specifically because connection strings are also application variables and there are two databases behind this thing.

Any tips? Does classic ASP work differently from an Application variable/worker process perspective?

Side note - I know Application variables are a terrible choice in the .Net world, especially for connection strings. I'm in the process of trying to rectify this, but it's a massive undertaking where zero documentation or comments exist and these things are used everywhere.

Scott Salyer
  • 2,165
  • 7
  • 45
  • 82
  • Sounds like you're missing an application pool somewhere look around for folders in the classic asp site with `global.asa` file in these should be configured as applications in IIS. – user692942 Apr 18 '14 at 15:35
  • There's only one global.asa file (and one global.asax) and none of the inner folders were configured as applications/virtual directories. Essentially there are just two sites off the same physical directory structure so in that sense it's relatively straight-forward. It's just gotten weird otherwise. – Scott Salyer Apr 21 '14 at 13:04
  • Then in that case I would double check that the classic asp and an asp.net sites are not sharing the same application pool. You might also need to make sure the classic asp application pool is set to "Classic" Managed Pipe Mode, also check that "Framework" is set to "No Managed Code". – user692942 Apr 21 '14 at 16:19
  • The sites are a mixture of classic ASP/.Net (both sites read from the same physical folder structure, though they are independent in IIS as sites and application pools). It's something where an upgrade to .Net was started, then abandoned so now there are a ton of classic ASP and .Net files in use on the site together. So in that sense they have to share stuff and all of that works fine. The problem I'm hitting is sometimes the Application variables from one site (and application pool) are overlapping on to another site (and application pool) which doesn't make sense since they are independent. – Scott Salyer Apr 22 '14 at 13:37

1 Answers1

2

Unless there is intentional exchange between Classic ASP site and NET application** even running on the same site(!!!) but separate app pools for obvious reason, for example using application variable for storing values, there is no way that Classic asp would pass variable to NET application. Even session variable is not shared between Classic ASP and NET. It has to be done intentionally in code.

For example if you using iframe and passing variable in url string from NET app to classic ASP page or back or just calling NET app from classic ASP page and passing variables in URL string or verse versus.

** Or using cookies to share values between application if you running under same domain.

All Blond
  • 802
  • 1
  • 8
  • 16
  • Sadly, there is. When you login on the aspx page, it redirects you to a classic ASP page that gets all of the Session variables it needs for auth in the query string which then redirects you to wherever you're going. It's a pretty special app to say the least. – Scott Salyer Apr 21 '14 at 13:06
  • sadly you did not provided any codding to support your claims. Take a look how it redirects and what aspx passes to redirection URL.What applications are configured and what app pools configurations are. .NET application and Classic ASP can not run from the same app pool even under best of circumstances.. You missing something. – All Blond Apr 21 '14 at 13:37
  • take a look what you have to do to achieve what you just explained: http://msdn.microsoft.com/en-us/library/aa479313.aspx. And after you read article examine your sites to see if you have something similar. – All Blond Apr 21 '14 at 13:44
  • @digitall One more thing, since you obviously using same domain for your site did you bother to look at cookies? Those could be passing values between your Classic ASP and ASPX pages especially on login pages and shopping carts... – All Blond Apr 23 '14 at 20:31
  • They are two different domains in conjunction with two different sites. They just share the same codebase. – Scott Salyer Apr 23 '14 at 20:45
  • 2
    @digitall In that case report this issue to Microsoft as new discovery of the communication between Classic ASP and NET application. Potentially it may concern them as security threat. You exclude: cookies - different domains, sessions - since it is classic ASP and NET and since it is on different app pools there is no way to share application variables as well. What remains is either intentional sharing of data in code or security bug(breach). – All Blond Apr 23 '14 at 20:54
  • Got it - thanks! As a "get it working now" fix, I just made a full copy of the site (eating up 40GB more disk space) and point each domain to its own folder now instead. It's just easier. – Scott Salyer Apr 26 '14 at 14:49