asp.net主机设置经验
您可以通过以下设置控制asp.net对服务器内存的占用。并能设置aspnet进程定时重建(类似IIS6中AppPool里的定时重启),这样可以避免服务器长时间运行aspnet占用大量空闲内存,有利于提高aspnet运行效率。
aspnet配置文件位置为
CWINDOWSMicrosoft.NETFrameworkv1.1.4322CONFIGmachine.config
用文本编辑器打开该文件,找到以内容按注释修改
processModel
enable=true
timeout=010000 --超时时间,指定多长时间后重建aspnet进程,建议设为数小时,格式小时分钟秒
idleTimeout=002000 --aspnet多长时间无动作时关闭进程,建议数十分钟
...
memoryLimit=40 --aspnet最多占用服务器内存数,默认40%
-------------------
默认情况下web.config修改后,asp.net程序会被重启。为了防止程序重启,要修改machine.config 文件。
machine.config默认在C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG目录下。
<section name="appSettings" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
restartOnExternalChanges="false" requirePermission="false" />
restartOnExternalChanges设置为false,程序就不会重启了。
文章出处:DIY部落(http://www.diybl.com/course/1_web/webjs/20071128/88711.html)
相关文档:
Asp.Net程序的高级功能,有很多都是基于IHttpHandler接口来实现的,在Winwods Server 2003 下,配置IIS6的 Web服务扩展非常简单。最近用Win7+IIS7.5的人越来越多,在这个环境下配置Asp.Net的Web服务扩展就有些麻烦。以下内容,就是在Win7和IIS7.5环境下配置过程。
& ......
//default.aspx.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Runtime.InteropService ......
关于ClientID的使用我遇到一下问题:
获取由 ASP.NET 生成的服务器控件标识符。
问题一: 用户控件的页面JavaScript中需要使用Asp.net的控件ID,出现不一致。
问题二:母版页的子页面JavaScript中需要使用Asp.net的控件ID,出现不一致。
解决办法:
document.getElementById("<% ......
使用asp.net 开发wap 网站,在ishtml32下,如果手机浏览器支持ishtml32,但是 SupportsCss=False 时,想加载css文件时,采用重写mobile:form的方法来实现
using System;
using System.Configuration;
using System.Web.UI.MobileControls;
using System.Web.UI.MobileControls.Adapters;
public class MyForm : Form
{ ......
在网上搜集整理的资料,希望对大家有所帮助
1.<%=...%>与<%#... %>的区别:
答:<%=...%>是在程序执行时调用,<%#... %>是在DataBind()方法之后被调用
2.控件接收哪些类型数据?
答:接收Bind的控件,一般有dropDownList,DataList,DataGrid,ListBox这些集合性质的控件,而被捆绑 ......