为什么程序会跳过Global.asax中的代码? [英] Why the program skip the code in Global.asax?
问题描述
文件Global.asax中的
我添加了一些发送邮件的代码。在Global.asax文件的顶部是
Hi,
in file Global.asax i add some code for sending mails. In the top of the Global.asax file is
<%@ Application Language="C#" Inherits="AspDotNetStorefront.Global" %>
和底部我添加
and bottom i add
<script runat="server" Language="c#">
//my code and breakpoint in same line
</script>
如果我删除
If i remove
Inherits="AspDotNetStorefront.Global"
然后发送邮件工作,但是是另一个文件的问题(没有找到一些数据 - null异常)。但是如果我留下这段代码,那么程序永远不会比
then sending mails works, but is the problem with another files (dont find some data - null exception). But if i leave this code, then program never comes farther than the
<%@ Application Language="C#" Inherits="AspDotNetStorefront.Global" %>
为什么要编程继承不执行此文件中的所有内容?我可以将我的代码移到另一个文件中吗? 但是这段代码应该一直进行,因为它是在给定时间发送电子邮件。
谢谢
Why program with Inherits does not perform all that is in this file? Can i move my code in another file? But this code should be carried out all the time, because it is sending e-mails at a given time.
Thanks
推荐答案
这篇关于为什么程序会跳过Global.asax中的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!