简体   繁体   English

经典ASP / ASP.NET应用程序变量

[英]Classic ASP/ASP.NET Application Variables

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. 我们继承了一个大小约为40GB(主要来自用户提交的内容)的网站,该网站混合了经典的ASP,内联.Net和与之相关的已编译.Net。 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. 从技术上讲,有两个与此相关联的站点并为了节省磁盘空间,我有意将IIS设置为具有指向同一文件夹的两个物理站点,但是具有独立的应用程序池来分隔工作进程。

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? 从我在这里/必应中看到的所有内容来看,由于独立的应用程序池,工作进程应该分开,但是我想知道经典的ASP是否会以某种方式解决问题? 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? 考虑到所有可能的混合情况(大约有4,200个物理.asp / .aspx文件,后者主要从03_开始,因为在我参与其中之前,这是选择开始迁移到.Net的方法),最好使用这些文件作为独立的站点和文件夹? 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? 从应用程序变量/工作人员流程的角度来看,经典ASP的工作方式是否有所不同?

Side note - I know Application variables are a terrible choice in the .Net world, especially for connection strings. 旁注-我知道应用程序变量在.Net世界中是一个糟糕的选择,尤其是对于连接字符串而言。 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 . 我正在尝试纠正此问题,但这是一项艰巨的任务,其中零文档或注释存在,并且这些内容在各处都得到使用。

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. 除非Classic ASP站点和NET应用程序**之间有意交换,即使是在同一站点上运行(!!!),但由于明显的原因(例如,使用应用程序变量存储值)而将应用程序池分开,否则Classic asp不可能将变量传递给NET应用程序。 Even session variable is not shared between Classic ASP and NET. 甚至会话变量也不在Classic ASP和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. 例如,如果您使用iframe并将url字符串中的变量从NET应用程序传递到经典ASP页面或返回,或者仅从经典ASP页面中调用NET应用程序,然后将变量传递到URL字符串或verse中。

** Or using cookies to share values between application if you running under same domain. **如果您在同一个域中运行,或者使用Cookie在应用程序之间共享值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM