ASP性能问题 [英] ASP performance issues

查看:53
本文介绍了ASP性能问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面链接到其他页面传递它查询

字符串,它然后读取配置文件,显示几个表单中的一个,获取

发布到自己,取决于用户的响应可能会显示不同的

表格等等。


我想获取配置数据并通过全局变量读取.asa和

然后使用应用程序(VariableName)来引用它。


i也想获取初始查询字符串并将它们加载到session

变量。


问题是,globals.asa文件是什么样的?我如何建立一个?

如何在我的页面中引用它?


Thanx

Woody

我所做的任何消息或评论都应首先检查

有效性和适当性,然后再假设我有任何想法

我在说什么。我不负责任何你可以看到附带我姓名的b $ b。我认为。


***通过Devdex发送 http://www.devdex.com ***

不要只是参加USENET ...获得奖励!

解决方案

嗯......这与global.asa有什么关系?据我所知

你的目标与它无关。但也许如果你更多

清楚你的解释它会帮助...


________________________________________

Atrax。 MVP,IIS
http://rtfm.atrax.co.uk/


newsflash:Atrax.Richedit 1.1测试版与Mozilla兼容性。
http://rtfm.atrax.co.uk/infinitemonk...trax.RichEdit/


***通过Devdex发送 http://www.devdex.com * **

不要只是参加USENET ......获得奖励!


Woody写道:

我有一个页面链接到其他页面,通过它查询字符串,然后读取配置文件,显示几个表单中的一个,
发布到自己,取决于用户的响应可能显示一个不同的形式等等。

我想获取配置数据并通过globals.asa读取然后使用应用程序ion(VariableName)引用它。

我也想把初始查询字符串加载到
会话变量中。

问题是,什么是globals.asa文件看起来像?我如何建立一个?如何在我的页面中引用它?




这是由Interdev创建的默认global.asa页面:


************************************************** ****************

< SCRIPT LANGUAGE = VBScript RUNAT =服务器>


''你可以在此文件中添加特殊事件处理程序,当

''特殊Active Server Pages事件发生时,将自动运行

。要创建这些处理程序,只需

创建一个

''子程序,其下面的列表中的名称对应于您想要的事件



''使用。例如,要为Session_OnStart创建事件处理程序,您可以将

''以下代码放入此文件中(不带注释):


''Sub Session_OnStart

''**把你的代码放在这里**

''结束子


''EventName描述

''Session_OnStart第一次用户在你的

应用程序中运行任何页面时运行

''Session_OnEnd运行时用户的会话超时或退出

申请

''Application_OnStart当您的申请的第一页运行时运行一次
运行任何用户第一次使用

''Application_OnEnd在网络服务器关闭时运行一次


< / SCRIPT>

< SCRIPT LANGUAGE = VBScript RUNAT =服务器>

Sub Application_OnStart

End Sub

< / SCRIPT>

***************************** ********************* *********


global.asa页面随时都会运行发生上述

评论部分中提到的4个事件之一。您不在任何

其他页面中引用global.asa。您只需使用可在global.asa中创建的应用程序和会话变量




HTH,

Bob Barrows

-

Microsoft MVP - ASP / ASP.NET

请回复新闻组。这个电子邮件帐户是我的垃圾邮件陷阱所以我

不经常检查它。如果你必须离线回复,那么删除

没有垃圾邮件


这不会造成性能问题吗?不是global.asa得到每个脚本每次读取

?如果你在

global.asa中有很多arb的东西会发生什么,它只在一个脚本中使用,每个项目都需要

?这不会对整个网站产生性能影响吗?


-


亲切的问候

Rudi Ahlers

+27(82)926 1689

更大的爱没有比这更好的了,他为朋友们献出了生命

(约翰福音15:13)。

Bob Barrows [MVP]" <再****** @ NOyahoo.SPAMcom>在消息中写道

新闻:#g ************** @ TK2MSFTNGP11.phx.gbl ...

Woody写道:< blockquote class =post_quotes>我有一个链接到其他页面的页面,它通过它查询字符串,然后读取一个配置文件,显示几个表单中的一个,
发布给自己,取决于用户的响应可能会显示不同的形式等等。

我想获取配置数据并通过globals.asa读取然后使用应用程序(" ; VariableName")引用它。

我也想把初始查询字符串加载到
会话变量中。

问题是,什么是globals.asa文件看起来像?我如何建立一个?如何在我的页面中引用它?




这是由Interdev创建的默认global.asa页面:


************************************************** ****************

< SCRIPT LANGUAGE = VBScript RUNAT =服务器>


''你可以在此文件中添加特殊事件处理程序,当

''特殊Active Server Pages事件发生时,将自动运行

。要创建这些处理程序,只需

创建一个

''子程序,其下面的列表中的名称对应于您想要的事件



''使用。例如,要为Session_OnStart创建事件处理程序,您可以将

''以下代码放入此文件中(不带注释):


''Sub Session_OnStart

''**把你的代码放在这里**

''结束子


''EventName描述

''Session_OnStart第一次用户在你的

应用程序中运行任何页面时运行

''Session_OnEnd运行时用户的会话超时或退出

申请

''Application_OnStart当您的申请的第一页运行时运行一次
运行任何用户第一次使用

''Application_OnEnd在网络服务器关闭时运行一次


< / SCRIPT>

< SCRIPT LANGUAGE = VBScript RUNAT =服务器>

Sub Application_OnStart

End Sub

< / SCRIPT>

***************************** ********************* *********


global.asa页面随时都会运行发生上述

评论部分中提到的4个事件之一。您不在任何

其他页面中引用global.asa。您只需使用可在global.asa中创建的应用程序和会话变量




HTH,

Bob Barrows

-

Microsoft MVP - ASP / ASP.NET

请回复新闻组。这个电子邮件帐户是我的垃圾邮件陷阱所以我

不经常检查它。如果您必须离线回复,请删除

无垃圾邮件


I have a page that is linked into by other pages that pass it query
strings, it then reads a config file, displays 1 of several forms, gets
posted to itself, depending upon users response may display a different
form etc etc.

I want to take the config data and have that read by a globals.asa and
then use application("VariableName") to reference it.

i also want to take the initial query strings and load them into session
variables.

Problem is, whats does a globals.asa file look like? how do i build one?
how do i make it referenced in my page?

Thanx
Woody
any sugestion or comment made by me should be examined first for
validity and appropriateness before assuming i have any idea at all
what the heck i am talking about. I am not responsible for anything you
may see with my name attached to it, i think.

*** Sent via Devdex http://www.devdex.com ***
Don''t just participate in USENET...get rewarded for it!

解决方案

ummm... what does this have to do with global.asa? as far as I can see
your objective has nothing to do with it. but maybe if you were more
clear about your explanation it''d help...

________________________________________
Atrax. MVP, IIS
http://rtfm.atrax.co.uk/

newsflash : Atrax.Richedit 1.1 in beta with Mozilla-compatibility.
http://rtfm.atrax.co.uk/infinitemonk...trax.RichEdit/

*** Sent via Devdex http://www.devdex.com ***
Don''t just participate in USENET...get rewarded for it!


Woody wrote:

I have a page that is linked into by other pages that pass it query
strings, it then reads a config file, displays 1 of several forms,
gets posted to itself, depending upon users response may display a
different form etc etc.

I want to take the config data and have that read by a globals.asa and
then use application("VariableName") to reference it.

i also want to take the initial query strings and load them into
session variables.

Problem is, whats does a globals.asa file look like? how do i build
one? how do i make it referenced in my page?



Here is the default global.asa page created by Interdev:

************************************************** ****************
<SCRIPT LANGUAGE=VBScript RUNAT=Server>

''You can add special event handlers in this file that will get run
automatically when
''special Active Server Pages events occur. To create these handlers, just
create a
''subroutine with a name from the list below that corresponds to the event
you want to
''use. For example, to create an event handler for Session_OnStart, you would
put the
''following code into this file (without the comments):

''Sub Session_OnStart
''**Put your code here **
''End Sub

''EventName Description
''Session_OnStart Runs the first time a user runs any page in your
application
''Session_OnEnd Runs when a user''s session times out or quits your
application
''Application_OnStart Runs once when the first page of your application is
run for the first time by any user
''Application_OnEnd Runs once when the web server shuts down

</SCRIPT>

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
End Sub
</SCRIPT>
************************************************** *********

The global.asa page is run whenever one of the 4 events mentioned in the
comments section above occurs. You do NOT refer to global.asa in any of your
other pages. You simply use the application and session variables that may
have been created in global.asa.

HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don''t check it very often. If you must reply off-line, then remove the
"NO SPAM"


Doesn''t this impose a performace issue? doesn''t global.asa get read
everytime, by every script? What happens if you have a lot of arb stuff in
global.asa, which is only used in one script, each one of those items as
needed? Won''t this have performance implications on the whole site?

--

Kind Regards
Rudi Ahlers
+27 (82) 926 1689

Greater love has no one than this, that he lay down his life for his friends
(John 15:13).
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:#g**************@TK2MSFTNGP11.phx.gbl...
Woody wrote:

I have a page that is linked into by other pages that pass it query
strings, it then reads a config file, displays 1 of several forms,
gets posted to itself, depending upon users response may display a
different form etc etc.

I want to take the config data and have that read by a globals.asa and
then use application("VariableName") to reference it.

i also want to take the initial query strings and load them into
session variables.

Problem is, whats does a globals.asa file look like? how do i build
one? how do i make it referenced in my page?



Here is the default global.asa page created by Interdev:

************************************************** ****************
<SCRIPT LANGUAGE=VBScript RUNAT=Server>

''You can add special event handlers in this file that will get run
automatically when
''special Active Server Pages events occur. To create these handlers, just
create a
''subroutine with a name from the list below that corresponds to the event
you want to
''use. For example, to create an event handler for Session_OnStart, you would
put the
''following code into this file (without the comments):

''Sub Session_OnStart
''**Put your code here **
''End Sub

''EventName Description
''Session_OnStart Runs the first time a user runs any page in your
application
''Session_OnEnd Runs when a user''s session times out or quits your
application
''Application_OnStart Runs once when the first page of your application is
run for the first time by any user
''Application_OnEnd Runs once when the web server shuts down

</SCRIPT>

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
End Sub
</SCRIPT>
************************************************** *********

The global.asa page is run whenever one of the 4 events mentioned in the
comments section above occurs. You do NOT refer to global.asa in any of your
other pages. You simply use the application and session variables that may
have been created in global.asa.

HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don''t check it very often. If you must reply off-line, then remove the
"NO SPAM"



这篇关于ASP性能问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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