相关疑难解决方法(0)

Application_End应该在自动App Pool Recycle上启动吗?

我看了这个,这个,这个这个加上一打其他职位/博客.

我在共享主机中有一个ASP.Net应用程序,经常回收.我们使用NLog并在global.asax中包含以下代码

void Application_Start(object sender, EventArgs e) 
{
    NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
    logger.Debug("\r\n\r\nAPPLICATION STARTING\r\n\r\n");
}
protected void Application_OnEnd(Object sender, EventArgs e)
{
    NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
    logger.Debug("\r\n\r\nAPPLICATION_OnEnd\r\n\r\n");
}

void Application_End(object sender, EventArgs e) 
{
        HttpRuntime runtime = (HttpRuntime)typeof(System.Web.HttpRuntime).InvokeMember("_theRuntime", BindingFlags.NonPublic  | BindingFlags.Static  | BindingFlags.GetField,  null,  null,  null);

if (runtime == null)
    return;

string shutDownMessage = (string)runtime.GetType().InvokeMember("_shutDownMessage",  BindingFlags.NonPublic  | BindingFlags.Instance  | BindingFlags.GetField,  null,  runtime,  null);

string shutDownStack = (string)runtime.GetType().InvokeMember("_shutDownStack",   BindingFlags.NonPublic  | BindingFlags.Instance  | BindingFlags.GetField, …
Run Code Online (Sandbox Code Playgroud)

asp.net iis memory-management

8
推荐指数
1
解决办法
5608
查看次数

Windows Server 2012 内存限制上的 IIS 工作进程

我有一个在 IIS 上运行的 ASP.NET 4.0 应用程序,该应用程序托管在Windows Server 2012 下,总物理内存为 8 GB。

我注意到随着用户登录应用程序并执行任务,IIS 工作进程的大小显着增加。

我真的不知道如何设置这个应用程序以避免内存中断或应用程序崩溃。

我的问题是,IIS 工作进程在具有 8GB RAM的Windows Server 2012上可以达到的最大大小是多少?

您建议我以32 位模式还是64 位模式运行应用程序池?

您是否建议我使用Web Gardening(增加 IIS 工作进程的数量)?使用此选项有什么副作用?

c# asp.net iis

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

asp.net ×2

iis ×2

c# ×1

memory-management ×1