asp.net Éí·ÝÑéÖ¤£¨·ÖĿ¼Ñé֤ƪ£©
ÔÚÉÏһƪ²©ÎÄ¡¶asp.netÖеÄÉí·ÝÑéÖ¤£¨×î¼òµ¥Æª£©¡·ÖеÄÉí·ÝÑéÖ¤ËäÈ»ºÜ¼òµ¥£¬µ«ÊÇÓÐÒ»¸öȱµã£¬¾ÍÊÇ·ÃÎÊÕû¸öÍøÕ¾¶¼±ØÐëÒª¾¹ýÉí·ÝÑéÖ¤£¬¶øÊÂʵÉÏ£¬ºÜ¶àÍøÕ¾¶¼²»»áÕâôҪÇóµÄ¡£
±ÈÈçÒ»¸öÐÂÎÅϵͳ£¬Í¨³£Ö»ÓÐÔÚ·¢²¼ÐÂÎŵÄÍøÒ³²ÅÐèÒªÉí·ÝÑéÖ¤£¬¶øÓû§ä¯ÀÀÐÂÎÅÊDz»ÐèÒªÉí·ÝÑéÖ¤µÄ¡£¶ÔÓÚÕâÖÖÇé¿ö£¬¾ÍÒªÕë¶Ô²»Í¬µÄÍøÒ³À´½øÐÐÉí·ÝÑéÖ¤ÁË¡£
ҪʵÏÖÕâÖÖ¹¦ÄÜ£¬Ò²Ö»Òª½«¡¶asp.netÖеÄÉí·ÝÑéÖ¤£¨×î¼òµ¥Æª£©¡·ÉÔ×÷Ð޸쬾ßÌå²Ù×÷·½Ê½ÈçÏÂËùʾ£º
µÚÒ»²½¡¢´´½¨Ò»¸ö×ÓÎļþ¼Ð£¬½«ËùÓÐÒªÑéÖ¤µÄÍøÒ³¶¼·ÅÔÚÕâ¸öÎļþ¼ÐÖУ¬ÉèÖøÃÎļþ¼ÐµÄÃû×ÖΪ“admin”¡£
µÚ¶þ²½¡¢ÐÞ¸Äweb.configÎļþ¡£
1¡¢ÔÚ<system.web>ºÍ</system.web>ÖÐÕÒµ½<authentication>½Ú£¬½«Æä¸ÄΪ“<authentication mode="Forms"><forms loginUrl="~/admin/AdminLogin.aspx"></forms></authentication>”£¬ÆäÖÐForms´ú±íʹÓÃ±íµ¥ÈÏÖ¤£»loginUrlÓÃÓÚÖ¸¶¨µÇÂ¼Ò³ÃæURL£¬¸öÈ˱ȽÏϲ»¶½«µÇÂ¼Ò³ÃæÒ²·ÅÔÚadminÎļþ¼ÐÖУ¬ËùÒÔÔÚ´ËÒªÖ¸¶¨µÇÂ¼Ò³ÃæURL£¬Èç¹û»¹ÊÇÏëʹÓøùĿ¼ÖеÄlogin.aspxÒ³Ãæ×÷ΪµÇÂ¼Ò³Ãæ£¬Ôò¿ÉÒÔÊ¡ÂÔ<forms>½Ú¡£
2¡¢ÔÚ<system.web>ºÍ</system.web>ÖÐÌí¼Ó“<authorization><allow users="?"/></authorization>”£¬ÆäÖГ<allow users="?"/>”´ú±íÔÊÐíËùÓеÄÄäÃûÓû§¡£×¢Òâ´Ë´¦Óë¡¶asp.netÖеÄÉí·ÝÑéÖ¤£¨×î¼òµ¥Æª£©¡·µÄÇø±ð£¬ÔÚ¡¶asp.netÖеÄÉí·ÝÑéÖ¤£¨×î¼òµ¥Æª£©¡·ÖУ¬´Ë´¦Ê¹ÓõÄÊÇ“<deny users="?"/>”£¬ÓÃÓھܾøËùÓÐÄäÃûÓû§¡£
µÚÈý²½¡¢ÔÚÐèÒªÉí·ÝÑéÖ¤µÄ×ÓÎļþ¼ÐÖÐÌí¼ÓÒ»¸öweb.configÎļþ£¬ÔÚ±¾ÀýÖÐΪÔÚ“admin”Îļþ¼ÐÖÐÌí¼Ó¸ÃÎļþ¡£
µÚËIJ½¡¢ÐÞ¸ÄÐèÒªÉí·ÝÑéÖ¤µÄ×ÓÎļþ¼ÐÖеÄweb.configÎļþ£¬ÔÚ±¾ÀýÖÐΪ“admin”Îļþ¼ÐÖеÄweb.configÎļþ¡£
ÔÚ<system.web>ºÍ</system.web>ÖУ¬Ìí¼Ó“<authorization><deny users="?"/></authorization>”£¬ÓÉÓÚÔÚ¸ùĿ¼ÖеÄweb.configÎļþÖÐÉùÃ÷ÁËÔÊÐíËùÓÐÄäÃûÓû§·ÃÎÊ£¬ËùÒÔÔÚ²»ÄÜÔÊÐíÄäÃûÓû§·ÃÎʵÄ×ÓÎļþ¼ÐÖУ¬±ØÐëҪʹÓÓ<deny users="?"/>”À´¾Ü¾øÄäÃûÓû§·ÃÎÊ¡£ÁíÍ⣬ÔÚ×ÓÎļþ¼ÐÖеÄweb.configÎļþÖпÉÒÔûÓÐ<authentication>½Ú¡£
µÚÎå²½¡¢ÔÚ“admin”×ÓÎļþ¼ÐÖд´½¨AdminLogin.aspxÎļþ¡£Èç
Ïà¹ØÎĵµ£º
Page Ö´ÐÐÖн«°´ÕÕÈçÏÂ˳Ðò¼¤»îʼþ£º
Page.PreInit
Page.Init
Page.InitComplite
Page.PreLoad
Page.Load
Page.LoadComplete
Page.PreRender
Page.PreRenderComplete
Èç¹ûÒ³Ãæ´ÓÁîÒ»¸öÒ³Ãæ¼Ì³Ð£¬ÈçBasePage:System.Web.UI.Page£¬ÔÚBasePageÖÐ×öÁËһЩÀ©Õ¹£¬ÈçȨÏÞ¼ì²é£¬¶øÆäËûÒ³Ãæ´ÓBasePage¼Ì³Ð£¬ÔòBasePageºÍ×î ......
¾³£Óõ½¶à×ֶεÄÄ£ºý²éѯ£¬ÉÏÃæµÄº¯Êý¿ÉÒÔʵÏÖ£¬ÀýÈçstrKeyWordsֵΪ“½Å±¾Ö®¼Ò”ʱ
string strField = "id|className|classAdd";
string strKeyWords = this.tbxKeyWords.Text.Trim();
string strSql = dbexe.searchText("select * from class", strField, strKeyWords);
¾³£Óõ½¶à×ֶεÄÄ£ºý²éѯ£¬ÉÏà ......
ÔÚÍøÂç¾³£¿´µ½ÍøÕ¾±»¹ÒÂí¡¢Ö÷Ò³±»Ð޸ĵÄÐÂÎÅ£¬ÆäʵÕâЩÎÊÌâ¿ÉÄÜÊÇ¶à·½ÃæµÄ£¬·þÎñÆ÷£¬ÍøÕ¾³ÌÐòµÈµÈ¡£¡£¡£µ«ÊÇÏÖÔÚÒç³öÒѾ±»ÈËÃÇÖØÊӺͷþÎñÆ÷µÄ²»¶ÏÍêÉÆ£¬·þÎñÆ÷ϵͳ©¶´Ò²²»ÊÇÄÇôÈÝÒ×·¢¾ò£¬µ±È»Ò²Òª±£Ö¤µÚÈý·½µÄÈí¼þ°²È«¡£
×öÏîĿҲÓÐÒ»¶Îʱ¼äÁË¡£ÔÚ³ÌÐòÖÐÒ²Óöµ½ºÜ¶à°²È«·½ÃæµÄÎÊÌâ¡£Ò²¸Ã×ܽáÒ»ÏÂÁË¡£Õâ¸öÏîÄ¿ÊÇÒ»¸öCMSÏ ......
.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(".")); ......
ÔÚ´´½¨ÍøÕ¾ÖУ¬³£³£»áʹÓõ½Éí·ÝÑéÖ¤¡£asp.netÖÐÄÚÖÃÁ˼¸ÖÖÉí·ÝÑéÖ¤µÄ·½Ê½£¬ÈçWindows¡¢froms¡¢PassportµÈ¡£Õ⼸ÖÖÉí·ÝÑéÖ¤µÄ·½Ê½¸÷Óв»Í¬¡£
Ò»°ãÀ´Ëµ£¬ÍøÕ¾µÄÉí·ÝÑéÖ¤·½Ê½¶¼»á¾¹ýÒÔϼ¸¸ö²½Ö裺
1¡¢ÊäÈëÓû§ÃûºÍÃÜÂ룬µ¥»÷È·¶¨°´Å¥¡£
2¡¢ÔÚºǫ́ÅжÏÓû§ÃûºÍÃÜÂëÊÇ·ñÕýÈ·£¬Èç¹û´íÎó·µ»ØÌáʾ£»Èç¹ûÕýÈ·£¬½øÈë¿É·ÃÎʵÄÒ ......