传统的ASP / ASP.NET应用程序变量 [英] Classic ASP/ASP.NET Application Variables

查看:319
本文介绍了传统的ASP / ASP.NET应用程序变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们继承了一个网站,是〜40GB的大小(主要是从用户提交的内容),有与之相关联的传统的ASP,在线.Net和并编译的.Net的混合物。有技术上这点,以节省磁盘空间我故意设置IIS有指向同一个文件夹两个物理站点,但有独立的应用程序池的工作进程分开。两个相关网站

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.

我们正在运行到的问题是偶尔,当您访问的网站之一,似乎从皮卡莫名其妙其他站点Application变量。从一切,我已经看到了这里/冰,工作进程应该是独立的,因为独立的应用程序池,但我想知道如果传统的ASP抛出了断不知何故?鉴于可以想象的一切的混合物(有〜4200物理的.asp /的.aspx后者大多与03_出发,因为这是选择开始迁移到.NET我参与之前,方法文件),是它更好地具备这些作为独立的网站和文件夹?我似乎无法找出原因Application变量越来越翻转中流,但它造成的许多问题 - 特别是因为连接字符串也是应用程序变量,有这件事情背后的两个数据库。

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.

任何提示吗?从应用程序中的变量/工作进程的角度不同做传统的ASP工作?

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

附注 - 我知道Application变量在.NET世界可怕的选择,尤其是对于连接字符串。我在试图纠正这一过程中,但它是一个艰巨的任务,其中零文档或意见存在,这些东西都是用的处处的。

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.

推荐答案

除非有经典的ASP网站和.NET应用程序之间交换故意甚至**同一站点上(!),但由于显而易见的原因,单独的应用程序池中运行,例如,使用应用程序变量来存储值,所以没有办法,传统的ASP将通过变量.NET应用程序。即使会话变量是不是经典的ASP和NET之间共享。它必须在code有意这样做的。

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.

有关,如果你使用iframe和传递变量中的URL字符串从NET应用到传统的ASP页面或背面,或从传统的ASP页面只调用NET应用程序,传递变量中的URL字符串或诗与例子。

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.

**或使用cookie,如果你在同一域中运行共享应用程序之间的值。

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

这篇关于传统的ASP / ASP.NET应用程序变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆