易截截图软件、单文件、免安装、纯绿色、仅160KB

ASP.NET MVC及IIS6.0配置总结

1. config结构
     Framework\Config\Machine.config, 为所有config的根,特别只有它才能具有<processMode>节,该节修改后必须重启IIS方能生效,而其它节的改动,只要一保存,就有效了,这是IIS6的一大进步。
    以下分别是从上往下的几个家族类(为继承关系,这种设计可以大量减少重复代码)
    Frameework\Config\Web.config
    网站的Web.config
    虚拟目录的Web.config
    各级子目录的Web.config
    <location path='some path' />可以直接访问这个家族树上的任意一个Web.config
2.常用section和sectionGroup, 可参见msdn
    <system.Web>
     <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </httpModules>  就是来定义MVC, 其实这种设计,已经有AOP的思想了
3.自定义配置
  <configSections>
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>


相关文档:

ASP.NET URL Rewrite. URL重写

URL 重写是截取传入 Web 请求并自动将请求重定向到其他 URL 的过程。
  比如浏览器发来请求hostname/101.aspx ,服务器自动将这个请求中定向为http://hostname/list.aspx?id=101。
url重写的优点在于:
    缩短url,隐藏实际路径提高安全性
    易于用户记忆和键入。
 &nbs ......

asp.net 图片 画线

Bitmap srcImg = new Bitmap(300, 300); //也可以读入一张图片
Graphics graphics = Graphics.fromImage(srcImg);
Font font = new Font("宋体", 16); //字体与大小
Brush brush = new SolidBrush(Color.Red);
graphics.DrawString("www.cftea.com", font, brush, 50, 50); //写字,最后两个参数表示位置
Pen pen = ne ......

C# asp.net macaddr

<HTML><HEAD><TITLE>WMI Scripting HTML</TITLE>
<META http-equiv=Content-Type c>
<SCRIPT language=JScript event="OnCompleted(hResult,pErrorObject, pAsyncContext)" for=foo>
var MACaddress=unescape(MACAddr);
alert(MACaddress);
document.forms[0].txtMACAddr.value=u ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号