ASP.NET°²È«ÈÏÖ¤ ËÄ
——ÇÉÃîʵÏÖ Form ±íµ¥ÈÏÖ¤¿çÕ¾µã¡¢¿ç·þÎñÆ÷µÄµ¥µãµÇ¼£¨Single Sign On£©
×÷Õߣºº®Óð·ã(cityhunter172)
µÚËIJ¿·Ö Form ÈÏÖ¤µÄ²¹³ä
Ç°ÈýƪÔÚ CSDN ÂÛ̳¹«²¼ºó£¬Ð§¹ûÈçͬ“ÉñÏÉ·Åƨ——¹ûÈ»²»Í¬·²£¨·´£©Ï씡£Îª¸Ðл¹ã´óÍøÓѵÄÈÈÇéÓëÖ§³Ö£¬Õâ²»£¬¾¹ýÕâÒ»Õó×ÓµÄÔÍÄð¡¢ÐÞÁ¶£¬ÌØÒâ×¼±¸ÁËÕâµÚËÄÏì¡£
֮ǰÎÒÃǽ²ÊöµÄʹÓà Form ÈÏ֤ʵÏÖµ¥µãµÇ¼£¬ÕýÈçÍøÓÑËù˵µÄÄÇÑù£¬Ö»ÄÜÔÚͬһÓòÃûÏÂʹÓ᣶ÔÓÚ¿çÓòÃûµÄµ¥µãµÇ¼£¬³ýÁËʹÓà Passport ÈÏÖ¤Í⣬ÎÒÃÇ»¹ÊÇ¿ÉÒÔÓà Form ÈÏÖ¤µÄ£¬Ö»ÊÇÒª½²¾¿·½·¨¶øÒÑÀ²¡£ÕýËùν“ɽ²»×ªË®×ª£¬È˲»×ªÐÄת”¡£
Ò»¡¢ ¿çÓòÃûµÄ½â¾ö˼·
ÔÚMSDN 2003 ÉÏËÑË÷¹Ø¼ü×Ö“Passport”£¬Å¼ÕÒµ½Ò»Æª“Passport Éí·ÝÑéÖ¤Ìṩ³ÌÐò”¡£ÎÄÕ½²ÊöÁË Passport µÄÈÏÖ¤ÔÀí£¬¹² 8 Ìõ£¬ÎҾͲ»¶à˵ÁË£¬´ó»ï×Ô¸ö¿´°É¡£ÆäÖÐÓÐÒ»¾ä»°£¬ÒýÆðżµÄ×¢Ò⣺“……ÏìÓ¦ÔÚ²éѯ×Ö·û´®Öаüº¬Ò»¸ö¼ÓÃÜµÄ Passport Cookie……”¡£Ò²ÕýÊǴ˾ä²ÅÓÐÁËÏÂÃæµÄ˼·¡£
ËùνÈÏÖ¤µÄͨ¹ýÓë·ñ£¬ÆäʵÖʾÍÊǼì²âÓÐÎÞ·¢·ÅÓÐЧµÄ Cookie £¬Ê¹Óà Form Ò²ºÃ£¬ÔËÓà Passport Ò²°Õ£¬¶¼ÊÇ Cookie ÔÚÆð×÷Óá£Ò²¾ÍÊÇ˵£¬ÎÒÃÇÖ»Òª°ÑÓÐЧµÄ Cookie ÔڵǼºóÒ»´ÎÐÔ·¢·Å¸ø¿Í»§¶Ë¾ÍµÃÁË¡£
¶þ¡¢ ¿çÓòÃû¡¢¿ç·þÎñÆ÷µÄµ¥µãµÇ¼·½·¨
1¡¢ ÈçºÎÔÚ±¾»úÄ£Äâ¿çÓòÃû¡¢¿ç·þÎñÆ÷µÄSingle Sign On
Ö»Òªä¯ÀÀÍøÖ·²»Í¬¾ÍÏ൱ÓÚ²»Í¬ÓòÃû£¬ÔÚ±¾»úÖÁÉÙÓÐÒÔÏÂÈýÖÖ¡£ËüÃÇËäÈ»ÊÇͬһÏîÄ¿£¬±Ë´ËÈ´²»Äܹ²Óà SessionÓë Cookie £¬Ò²¾ÍÎÞ·¨¹²ÏíÉí·ÝÑé֤Ʊ£º
a). http://localhost/FormTest/Login.aspx
b). http://127.0.0.1/FormTest/Login.aspx
c). http://My_Computer_Name/FormTest/Login.aspx //ÒÔµçÄÔÃû³Æä¯ÀÀÕ¾µã
d). http://192.168.0.8/FormTest/Login.aspx //ÒÔÍø¿¨µØÖ·ä¯ÀÀÕ¾µã
e). http://172.meibu.com/FormTest/Login.aspx //ÓµÓйú¼ÊÓòÃû
2¡¢ ÔÚ ASP.NET ÖÐÈçºÎÌá½»¸øÆäËüÒ³Ãæ
ÓùýViewState µÄ´ó¸Å¶¼ÖªµÀ£¬ViewStateÊDZ£´æÔÚ¿Í»§¶ËµÄ¡£²»Öª´ó»ï×¢ÒâûÓУ¬ASP.NET ΪÿÕÅ .aspx Ò³Ã涼Å䱸Á˶À×﵀ ViewState£¬ÇÒ±»½âÎöºó¶¼ÊÇÒÔÒ»¸ö name=" __VIEWSTATE" µÄÒþ²Ø¿Ø¼þÖµÀ´±£´æViewState¡£Ã¿´ÎÒ³ÃæÌá½»£¬·þÎñÆ÷¶¼»á¼ì²é¸Ã¿Ø¼þµÄÖµÓÐÎÞ±»´Û¸Ä£¬Èç´ËÒ»À´¾Í×¢¶¨ .aspx Ö»ÄÜÌá½»¸ø±¾Ò³¡
Ïà¹ØÎĵµ£º
asp.net±ÏÒµÉè¼Æ¾ÍÊÇÓÃC#ÓïÑÔ¿ª·¢µÄWEBµÄ±ÏÒµÉè¼Æ£¬ÏÖÔںöà´óѧ¶¼Ñ¡ÔñÓÃasp.netÀ´×ö±ÏÒµÉè¼Æ£¬±¾Õ¾¿ªÊ¼×ö±ÏÒµÉè¼Æ¾ÍÑ¡ÔñÁËasp.net¿ª·¢±ÏÒµÉè¼Æ±ðµÄÉè¼Æ²»×ö¡£
¶¨×öasp.net±ÏÒµÂÛÎÄרÏߣº
±à³ÌÁªÃËÕ¾³¤
QQ£º153933864 êdzƣºÐÇÆÚ°Ë
ÁõÏÈÉú£ºÊÖ»ú£º13733310210
ÎÒÃǵÄasp.net±ÏÒµÉè¼Æ³ÉÆ·Ö÷Òª²¿·ÖÔÚÏÂÃæÁгö£º
±¾Õ¾ÒÔ¶ ......
×öÍøÕ¾Óë¸ã°²È«Ò»°ã¶¼Àë²»¿ªÈ¨ÏÞ·ÖÅä,ÍøվȨÏÞÒ»°ã¶¼Ö±½ÓÉèÖÃÕ¾µãËùÔÚµÄÐéÄâĿ¼µÄ,Ò²¾ÍÊÇÔÚÐéÄâĿ¼µÄ°²È«ÀïÌí¼ÓinternetÀ´±öÕË»§,²¢·ÖÅä³ýÍêÈ«¿ØÖÆÍâµÄËùÓÐȨÏÞ;Èç¹ûÊÇ.NET,»¹±ØÐë¸øASP.NETÓû§ÅäÖóýÍêÈ«¿ØÖÆÒÔÍâµÄȨÏÞ!
Ò»°ãÇé¿öÏÂ,ÕâÑù¾ÍOKÁË,·þÎñÆ÷ÉϵÄÒ»°ãÍøÕ¾¶¼¿ÉÒÔÕý³£ÔËÐÐÁË!µ«ÏÖÔÚÎÒ·¢ÏÖ:C\WINDOWS ......
string destFileName = "ok.txt";
destFileName = Server.MapPath(".") + "\\"+destFileName;
destFileName = Server.UrlDecode(destFileName);
&nbs ......
×÷Õߣºº®Óð·ã(cityhunter172)
Ðò
´úÂëд N ¾ÃÁË£¬×ÜÏëдµÃ±ðµÄ¡£Õâ²»£¬ÉÏͷ˵ÔÚÕûºÏÁ½¸öÏîÄ¿£¬×ö³Éµ¥Ò»µÇ¼£¨Single Sign On£©£¬Ò²ÓÐÈ˳Æ֮Ϊ“µ¥µãµÇ¼”¡£²éÔÄÏà¹ØÎĵµºó£¬ÖÕÓÚʵÏÖÁË£¬ÏÖÔÚ°ÑËüÄóöÀ´Óë´ó¼ÒÒ»Æð·ÖÏí¡£»òÐí´ó¼Ò»áÎÊ£º“ÕâÓë±êÌâ²»·ûѽ£¿”±ð¼±£¬ÔÚϱÊ֮ǰ£¬ÎÒÄÔ×ÓÀïÏëµ½ÁËÎÒ¸ÕʹÓà ......