申请开始 [英] Application Start

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

问题描述

这又是我了。


我会采取另一种方式,因为昨天我提出了一个问题,

我可能没有做我清楚所以你不理解我的问题。


我想知道是否有办法将方法注册到

应用程序启动事件。我知道有一种方法,在Global.asax写的

代码


Application_Start


但是这样对我来说是不可能的,因为我需要在没有

的情况下在global.asax中实现这些方法。

我需要的是:


AnyDotNetFrameworkClass.ApplicationStart + = new EventHandler(My_Method);


你知道ApplicacionStart事件是否在

的某处宣布框架,所以我可以注册吗?

提前谢谢


费尔南多·阿兰布鲁

解决方案

你试过制作一个httpmodule吗?


KG


"FernandoArámburu" < FE ************** @ speedy.com.ar>在消息中写道

新闻:Ou ************** @ TK2MSFTNGP10.phx.gbl ...

这是我再说一遍。

我会采取另一种方式,因为昨天我提出了一个问题,
可能我没有说清楚,所以你不理解我的问题。

我想知道是否有任何方法可以将方法注册到
Application Start事件。我知道有一种方法,在Global.asax中编写

Application_Start

但这种方式对我来说是不可能的,因为我需要这样做而没有
在global.asax中实现这些方法

我需要的是:

AnyDotNetFrameworkClass.ApplicationStart + = new
EventHandler(My_Method);

你知道如果在
框架的某处宣布ApplicacionStart事件,那么我可以注册吗?
提前致谢

FernandoArámburu



您可以实现自定义HTTP模块:
http://msdn.microsoft.com/library/de...ttpmodules .asp


有init()方法....


Karl


-

我的ASP.Net教程
http://www.openmymind.net/ - 新增和改进(是的,弹出窗口是

烦人)
http://www.openmymind.net/ faq.aspx - 非官方新闻组常见问题解答(更多内容

来了!)

"FernandoArámburu" < FE ************** @ speedy.com.ar>在消息中写道

新闻:Ou ************** @ TK2MSFTNGP10.phx.gbl ...

这是我再说一遍。

我会采取另一种方式,因为昨天我提出了一个问题,
可能我没有说清楚,所以你不理解我的问题。

我想知道是否有任何方法可以将方法注册到
Application Start事件。我知道有一种方法,在Global.asax中编写

Application_Start

但这种方式对我来说是不可能的,因为我需要这样做而没有
在global.asax中实现这些方法

我需要的是:

AnyDotNetFrameworkClass.ApplicationStart + = new
EventHandler(My_Method);
你知道ApplicacionStart事件是否在
框架的某个地方宣布,所以我可以注册吗?
提前致谢

FernandoArámburu


HttpModules无法处理Application_Start,Application_End,Session_Start

或Session_End事件。它们不是正确的事件 - 在ASP.NET中有代码

'是硬编码来查找这些并直接调用它们。


-Brock

DevelopMentor
http:// staff.develop.com/ballen

你试过制作一个httpmodule吗?

KG

FernandoArámburu < FE ************** @ speedy.com.ar>在消息中写道
新闻:Ou ************** @ TK2MSFTNGP10.phx.gbl ...

这是我再说一遍。

我会采取另一种方式,因为昨天我提出了一个问题,可能我没有说清楚,所以你不理解我的问题。

我想知道是否有办法将方法注册到
Application Start事件。我知道有一种方法,在Global.asax
中编写代码




但这种方式对我来说是不可能的,因为我需要这样做而不需要
在global.asax中实现这些方法

我需要的是:

AnyDotNetFrameworkClass.ApplicationStart + = new
EventHandler(My_Method);

你知道如果在
框架的某处宣布ApplicacionStart事件,那么我可以注册吗?
提前致谢
FernandoArámburu




Hi , it′s me again.

I will take another way because yesterday I make a question and,
probably I didn′t make myself clear so you didn′t understand my question.

I want to know if there is any way to register a method to the
Application Start event. I know there is one way, in Global.asax writing
code in

Application_Start

but this way is not possible for me because I need to do it without
implementing those methods in global.asax

What i need is something like:

AnyDotNetFrameworkClass.ApplicationStart += new EventHandler(My_Method);

Do you know if ApplicacionStart event is declared somewhere on the
framework so I can register to it?
Thanks in advance

Fernando Arámburu

解决方案

Have you tried making an httpmodule to do this?

KG

"Fernando Arámburu" <fe**************@speedy.com.ar> wrote in message
news:Ou**************@TK2MSFTNGP10.phx.gbl...

Hi , it′s me again.

I will take another way because yesterday I make a question and,
probably I didn′t make myself clear so you didn′t understand my question.

I want to know if there is any way to register a method to the
Application Start event. I know there is one way, in Global.asax writing
code in

Application_Start

but this way is not possible for me because I need to do it without
implementing those methods in global.asax

What i need is something like:

AnyDotNetFrameworkClass.ApplicationStart += new
EventHandler(My_Method);

Do you know if ApplicacionStart event is declared somewhere on the
framework so I can register to it?
Thanks in advance

Fernando Arámburu



Well, you can implement a Custom HTTP Module:
http://msdn.microsoft.com/library/de...ttpmodules.asp

which has the init() method....

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Fernando Arámburu" <fe**************@speedy.com.ar> wrote in message
news:Ou**************@TK2MSFTNGP10.phx.gbl...

Hi , it′s me again.

I will take another way because yesterday I make a question and,
probably I didn′t make myself clear so you didn′t understand my question.

I want to know if there is any way to register a method to the
Application Start event. I know there is one way, in Global.asax writing
code in

Application_Start

but this way is not possible for me because I need to do it without
implementing those methods in global.asax

What i need is something like:

AnyDotNetFrameworkClass.ApplicationStart += new EventHandler(My_Method);
Do you know if ApplicacionStart event is declared somewhere on the
framework so I can register to it?
Thanks in advance

Fernando Arámburu



HttpModules can''t handle the Application_Start, Application_End, Session_Start
or Session_End events. They aren''t proper events -- there''s code in ASP.NET
that''s hard coded to look for these and call them directly.

-Brock
DevelopMentor
http://staff.develop.com/ballen

Have you tried making an httpmodule to do this?

KG

"Fernando Arámburu" <fe**************@speedy.com.ar> wrote in message
news:Ou**************@TK2MSFTNGP10.phx.gbl...

Hi , it′s me again.

I will take another way because yesterday I make a question and,
probably I didn′t make myself clear so you didn′t understand my
question.

I want to know if there is any way to register a method to the
Application Start event. I know there is one way, in Global.asax
writing code in

Application_Start

but this way is not possible for me because I need to do it without
implementing those methods in global.asax

What i need is something like:

AnyDotNetFrameworkClass.ApplicationStart += new
EventHandler(My_Method);

Do you know if ApplicacionStart event is declared somewhere on the
framework so I can register to it?
Thanks in advance
Fernando Arámburu




这篇关于申请开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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