ÈÏʶASP.NETÅäÖÃÎļþWeb.config
Ò»¡¢ÈÏʶWeb.configÎļþ
Web.configÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¨Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½£©£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ýVB.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿öÏ»áÔÚ¸ùĿ¼×Ô¶¯´´½¨Ò»¸öĬÈϵÄ
Web.configÎļþ£¬°üÀ¨Ä¬ÈϵÄÅäÖÃÉèÖã¬ËùÓеÄ×ÓĿ¼¶¼¼Ì³ÐËüµÄÅäÖÃÉèÖá£Èç¹ûÄãÏëÐÞ¸Ä×ÓĿ¼µÄÅäÖÃÉèÖã¬Äã¿ÉÒÔÔÚ¸Ã×ÓĿ¼ÏÂн¨Ò»¸öWeb.configÎļþ¡£Ëü¿ÉÒÔÌṩ³ý´Ó¸¸Ä¿Â¼¼Ì³ÐµÄÅäÖÃÐÅÏ¢ÒÔÍâµÄÅäÖÃÐÅÏ¢£¬Ò²¿ÉÒÔÖØд»òÐ޸ĸ¸Ä¿Â¼Öж¨ÒåµÄÉèÖá£
ÔÚÔËÐÐʱ¶ÔWeb.configÎļþµÄÐ޸IJ»ÐèÒªÖØÆô·þÎñ¾Í¿ÉÒÔÉúЧ£¨×¢£º£¼processModel£¾ ½ÚÀýÍ⣩¡£µ±È»Web.configÎļþÊÇ¿ÉÒÔÀ©Õ¹µÄ¡£Äã¿ÉÒÔ×Ô¶¨ÒåÐÂÅäÖòÎÊý²¢±àдÅäÖýڴ¦Àí³ÌÐòÒÔ¶ÔËüÃǽøÐд¦Àí¡£
¶þ¡¢web.configÅäÖÃÎļþ£¨Ä¬ÈϵÄÅäÖÃÉèÖã©ÒÔÏÂËùÓеĴúÂ붼Ӧ¸ÃλÓÚ
£¼configuration£¾
£¼system.web£¾
¡¡¡¡ºÍ
£¼/system.web£¾
£¼/configuration£¾
Ö®¼ä£¬³öÓÚѧϰµÄÄ¿µÄÏÂÃæµÄʾÀý¶¼Ê¡ÂÔÁËÕâ¶ÎXML±ê¼Ç
1¡¢£¼authentication£¾ ½Ú
×÷ÓãºÅäÖà ASP.NET Éí·ÝÑéÖ¤Ö§³Ö£¨ÎªWindows¡¢Forms¡¢PassPort¡¢NoneËÄÖÖ£©¡£¸ÃÔªËØÖ»ÄÜÔÚ¼ÆËã»ú¡¢Õ¾µã»òÓ¦ÓóÌÐò¼¶±ðÉùÃ÷¡££¼authentication£¾ ÔªËرØÐèÓ룼authorization£¾ ½ÚÅäºÏʹÓá£
ʾÀý£º
ÒÔÏÂʾÀýΪ»ùÓÚ´°Ì壨Forms£©µÄÉí·ÝÑéÖ¤ÅäÖÃÕ¾µã£¬µ±Ã»ÓеǽµÄÓû§·ÃÎÊÐèÒªÉí·ÝÑéÖ¤µÄÍøÒ³£¬ÍøÒ³×Ô¶¯Ìøתµ½µÇ½ÍøÒ³¡£
£¼authentication mode="Forms" £¾
£¼forms loginUrl="logon.aspx" name=".FormsAuthCookie"/£¾
£¼/authentication£¾
ÆäÖÐÔªËØloginUrl±íʾµÇ½ÍøÒ³µÄÃû³Æ£¬name±íʾCookieÃû³Æ
2¡¢£¼authorization£¾ ½Ú
×÷Ó㺿ØÖÆ¶Ô URL ×ÊÔ´µÄ¿Í»§¶Ë·ÃÎÊ£¨ÈçÔÊÐíÄäÃûÓû§·ÃÎÊ£©¡£´ËÔªËØ¿ÉÒÔÔÚÈκμ¶±ð£¨¼ÆËã»ú¡¢Õ¾µã¡¢Ó¦ÓóÌÐò¡¢×ÓĿ¼»òÒ³£©ÉÏÉùÃ÷¡£±ØÐèÓ룼authentication£¾ ½ÚÅäºÏʹÓá£
ʾÀý£ºÒÔÏÂʾÀý½ûÖ¹ÄäÃûÓû§µÄ·ÃÎÊ£¼authorization£¾
¡¡£¼deny users="?"/£¾
£¼/authorization£¾
×¢£ºÄã¿ÉÒÔʹÓÃuser.identity.nameÀ´»ñÈ¡ÒѾ¹ýÑéÖ¤µÄµ±Ç°µÄÓû§Ãû£»¿ÉÒÔʹÓÃ
web.Security.FormsAuthentication.RedirectfromLoginPage·½·¨½«ÒÑÑéÖ¤µÄÓû§Öض¨Ïòµ½Óû§¸Õ²ÅÇëÇóµÄÒ³Ãæ.¾ßÌåµÄʵÀýÇë²Î¿¼:
FormsÑéÖ¤ http://www.fanvb.net/websample/dataauth.aspx
3¡¢£¼compilation£¾½Ú
×÷ÓãºÅäÖà ASP.NET ʹÓõÄËùÓбàÒëÉèÖá£Ä¬ÈϵÄdebugÊôÐÔΪ“True”.ÔÚ³
Ïà¹ØÎĵµ£º
asp.net×Ö·û´®½ØȡʵÏÖ´úÂ룬ÐèÒªµÄÅóÓÑ¿ÉÒԲο¼Ï¡£
1£¬°Ñ´úÂë·ÅÔÚsqlhelperÖС£
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
#region ½ØÈ¡×Ö·û´®
/// <summary>
/// ½ØÈ¡×Ö·û´®
/// </summary>
/// <param name="str_value"></param>
/// <param name="str_len"></param>
/// <returns&g ......
.NETÒ»¸öFTP²Ù×÷Àà¡£µ«Õâ¸öÀླ£³ö´í£¬Ê¹ÓÃDISCUZʹÓõÄÀà¾ÍºÃ¶àÁË¡£
ÏÈ¿´Õâ¸ö¼òµ¥µÄ
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
FTP ftp = new FTP("192.168.1.117", "ahuinan", "123456");
string oldname = this.FileUpload1.PostedFile.FileName;
string newname = dd + h + mm + ss + oldname.Substring(oldname.LastIndexOf(".")); ......
private void WriteXML()
{
StringBuilder sb = new StringBuilder();
sb.Append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?> ");
sb.Append(" <!-- ");
sb.Append("<content>");
sb.Append(& ......
Ö÷ÒªÀࣺ
¡¡¡¡System.Web.HttpRuntime
¡¡¡¡System.Web.HttpApplicationFactory
¡¡¡¡System.Web.HttpApplication
¡¡¡¡System.Web.Compilation.BuildManager
¡¡¡¡System.Web.Compilation.ApplicationBuildProvider
¡¡¡¡System.Web.Compilation.BuildProvidersCompiler
¡¡¡¡System.Web.UI.PageHandlerFactory
¡¡¡¡ÇëÇó ......
ËäÈ»ÎÒ²»Ï²»¶ÌÖÂÛÌ«¶àÀíÂÛ¸ÅÄîÉϵĶ«Î÷£¬µ«¸÷λ“ש¼Ò”»¹ÊÇÌá³öÁ˺ܶà·Ç³£ÓÐÕë¶ÔÐÔµÄÒâ¼û£¬Íû´ËÌû²»Òª³ÉΪ¿Úˮս²ÅºÃ....ÏÖ´ðÒÉÈçÏ£¨Óкܶà¸öÈËÀí½â£¬²»Ò»¶¨ÕýÈ·£©£º
ש¼ÒÒâ¼ûÇë²Î¼û£ºAsp.Net´óÐÍÏîĿʵ¼ùϵÁе¼º½
ΪʲôѡÔñNHibernate
ÀíÓÉ1£º¶ÔÏó¹ØϵӳÉä¼¼Êõ£¨ORM£©µÄ×îÖ÷ҪĿµÄÊÇΪÁ˽â¾ö¹ØϵÐÍÊý¾Ý¿âÓ ......