ASP.NET µ¥µãµÇ¼
ÒëÎÄÔÎĵØÖ·
http://www.cnblogs.com/hl13571/archive/2008/01/28/1056671.html
Ó¢ÎÄÔÎĵØÖ·
Understanding Single Sign-On in ASP.NET 2.0
Àí½âASP.NET 2.0Öеĵ¥µãµÇ¼
Published: 16 Jan 2008
ÕªÒª
ÔÚÕâƪÎÄÕÂÖУ¬MasoudÌÖÂÛÁËÓ¦ÓÃASP.NETÖÐͳһÉí·ÝÑé֤ģÐͽøÐпçÓ¦ÓóÌÐòÑéÖ¤µÄÎÊÌ⣬°üÀ¨£ºMembership Providers, web.configÅäÖÃ,ÅäÖÃÎļþµÄ¼ÓÃܽâÃܵȡ£ÔÚÎÄÕµÄ×îºó£¬×÷ÕßÌṩÁËͨ¹ýASP.NET login controlsÀ´ÑéÖ¤µÄ³ÌÐò¡£
by Masoud Tabatabaei:
Ŀ¼
¼ò½é
ʲôÊÇSSO£¿ËüÊÇÔõÑù¹¤×÷µÄ£¿
ϵͳÌõ¼þ
¹¤×÷
ÏÂÔØ
½áÂÛ
¼ò½é
ͨ³£ÔÚÄãҪʵÏÖASP.NET webÓ¦ÓóÌÐòµÄÉí·ÝÑé֤ʱ£¬ÄãÐèҪΪÄãµÄÿһ¸öÓ¦ÓóÌÐò´´½¨Ò»¸öµÇ¼ҳÃæ¡£ÏëÏóһϣ¬Èç¹ûÄãÓÐÁ½¸ö»òÕ߸ü¶àµÄ»¥Ïà¹ØÁªµÄwebÓ¦ÓóÌÐò£¬Äã¿ÉÄÜÏ£Íûͨ¹ýijÖÖ»úÖÆΪÄãµÄËùÓдø¹ØÁªµÄÓ¦ÓóÌÐòʵÏÖ½ö³öÏÖÒ»´ÎµÇ¼ҳÃæ¡£ÕâÑù£¬Ò»µ©ÄãµÇ¼ÁËÒ»´Î£¬Äã¾Í¿ÉÒÔä¯ÀÀËùÓеĹØÁª³ÌÐò£¬¶ø²»ÔÙÐèÒª¶îÍâµÄµÇ¼ÁË¡£µ¥µãµÇ¼£¨SSO£©¾ÍÊÇÕâÑùµÄ·ÃÎÊ¿ØÖÆ»úÖÆ£¬ËüÔÊÐíÒ»¸öÓû§Í¨¹ýÒ»´ÎÑéÖ¤¾Í¿ÉÒÔ·ÃÎÊËùÓÐÈí¼þϵͳ×ÊÔ´¡£
ÊÔÏëÄãÔÚÄãµÄ·þÎñÆ÷ÉÏ´´½¨ÁËÁ½¸ö»òÕ߸ü¶àµÄwebÕ¾µã¡£¾ÍÏñÆäËûµÄwebÕ¾µãÒ»Ñù£¬ÄãÖ»ÊÇʹÓÃASP.NETȨÏÞÑéÖ¤»úÖÆÀ´ÑéÖ¤ÄãµÄÓû§¡£ÄÇô£¬ÄãµÄÕâЩվµã¿ÉÄÜÐèÒªÒ»¸ö»ò¸ü¶àµÄµÇ¼ҳÃæ¡£ÏÖÔÚÄãÕýÊÔͼ֤Ã÷ÔõôÑùͨ¹ý¸ü¸ÄÄãµÄÅäÖÃÀ´ÊµÏÖ¿ç³ÌÐòµÇ¼¡£»»¾ä»°Ëµ£¬ÎÒÃÇÖ»Ïë¸øÎÒÃǵijÌÐòÅäÖÃÒ»¸öµÇ¼ҳÃ棬²¢ÇÒÒ»µ©Óû§Í¨¹ýÁËÑéÖ¤£¬Ëû¾Í¿ÉÒÔä¯ÀÀÆäËûËùÓеÄÕ¾µã£¬¶ø²»ÐèÒªÁíÍâµÄµÇ¼¡£ÔÚÕâƪÎÄÕµĸ½Â¼ÖУ¬ÄãÒ²¿ÉÒÔ¿´µ½ÈçºÎ¼ÓÃÜÄãµÄÅäÖÃÎļþ¡£
ʲôÊǵ¥µãµÇ¼£¿ËüÊÇÔõÑù¹¤×÷µÄ£¿
ÔÚÐí¶àµÄ¹«Ë¾ÀËûÃÇÓÐһЩÒÔwebÕ¾µã»òwebÓ¦ÓóÌÐòΪ±íÏÖ²ãµÄϵͳ¡£×ÔÈ»£¬ÓÉÓÚ°²È«ÒéÌâËûÃǽ«ÐèҪͨ¹ý»ùÓÚASP.NET 2.0£¬Í¨¹ýMembership Provider ºÍ Role Provider »òÕ߶¨ÖÆʵÏÖȨÏÞÑéÖ¤ºÍȨÏÞÑé֤ϵͳ¡£²»ÂÛÔõÑù£¬ËùÓеÄÕ¾µã¶¼»áĬÈÏÓÐÒ»¸öÈ·¶¨Óû§µÄIDºÍÃÜÂëÔÚÊý¾Ý¿âÖÐÊÇ·ñÓÐЧµÄ”login.aspx” web´°Ìå.µ±ÄãÖ»ÓÐÒ»¸öÕ¾µã»òÕßÕâЩվµã¶¼ÊǶÀÁ¢ÔËÐÐʱ£¬ÕâÑù×öÊÇûÓÐÎÊÌâµÄ¡£µ«Êǵ±ÄãÓÐÁ½¸ö»ò¶à¸öÕ¾µã£¬¶øÇÒÕ¾µã¼äÊǹØÁªÔÚÒ»Æð»òÁ´½ÓÔÚÒ»ÆðµÄ£¬Äãû׼¾Í»áÎÊ£ºÎªÊ²Ã´Ã¿¸öÓ¦ÓóÌÐòÄ㶼±ØÐëµÇ¼һ´Î£¿ÎªÊ²Ã´Äã²»¿ÉÒÔÖ»ÓÐÒ»¸ö”login.aspx”À´ÊµÏÖÑéÖ¤£¬²¢ÈÃËùÓв»¹ØÁª³ÌÐòÕæÕýͳһÆðÀ´¡£ÐÒÔ˵ÄÊÇ£¬ÔÚASP.NET 2.0ÖÐÄã¿ÉÒÔͨ¹ýͬÑùµÄÅäÖÃÀ´ÊµÏÖ¿çÓ¦ÓóÌÐò·ÃÎÊ£¬²»ÂÛÊÇÄãµÄеÄÕ¾µã»¹ÊÇÒѾ´æÔÚµÄ
Ïà¹ØÎĵµ£º
Èç¹û¶Ô΢ÐͼÆËã»úÓ²¼þϵͳÓÐ×ã¹»µÄÁ˽⣬ÄÇôÎÒÃǶÔÓÚCacheÕâ¸öÃû´ÊÒ»¶¨ÊǶúÊìÄÜÏêµÄ¡£ÔÚCPUÒÔ¼°Ö÷°åµÄоƬÖУ¬¶¼ÒýÈëÁËÕâÖÖÃûΪ¸ßËÙ»º³å´æ´¢Æ÷£¨Cache£©µÄ¼¼Êõ¡£ÒòΪCacheµÄ´æÈ¡ËٶȱÈÄÚ´æ¿ì£¬Òò¶øÒýÈëCacheÄܹ»ÓÐЧµÄ½â¾öCPUÓëÄÚ´æÖ®¼äµÄËٶȲ»Æ¥ÅäÎÊÌâ¡£Ó²¼þϵͳ¿ÉÒÔÀûÓÃCache´æ´¢CPU·ÃÎʸÅÂʸߵÄÄÇЩÊý¾Ý£¬µ±CPUÐèÒª· ......
ʹÓà ASP.NET UpdatePanel ¿Ø¼þ¿ÉÉú³É¹¦ÄܷḻµÄ¡¢ÒÔ¿Í»§¶ËΪÖÐÐÄµÄ Web Ó¦ÓóÌÐò¡£Í¨¹ýʹÓà UpdatePanel ¿Ø¼þ£¬¿ÉÒÔË¢ÐÂÒ³µÄÑ¡¶¨²¿·Ö£¬¶ø²»ÊÇʹÓûط¢Ë¢ÐÂÕû¸öÒ³Ãæ¡£Õâ³ÆΪִÐГ²¿·ÖÒ³¸üД¡£°üº¬Ò»¸ö ScriptManager ¿Ø¼þºÍÒ»¸ö»ò¶à¸ö UpdatePanel ¿Ø¼þµÄ ASP.NET ÍøÒ³¿É×Ô¶¯²ÎÓ벿·ÖÒ³¸üУ¬¶ø²»ÐèÒª×Ô¶¨Òå ......
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
´«ËͲÎÊý£º
response.write("£¼script£¾window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')£¼/script£¾")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1.Attributes.Add("o ......
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Sy ......
ÕâÀïÎÒÃǽ«½éÉÜASP.NET»º´æµÄ¹¤×÷ÔÀí£¬°üÀ¨¼òµ¥µÄ¶¨Ò壬Êý¾Ý»º´æÒÔ¼°»º´æµÄÉèÖõȵÈÄÚÈÝ¡£Ï£Íû±¾ÎÄÄܶԴó¼Ò½ñºóµÄ¹¤×÷ÓÐËù°ïÖú¡£
ÈçºÎ±ÜÃâASP.NET»º´æÕ¼ÓÃϵͳ×ÊÔ´
ÔÙ̸ASP.NET»º´æ»úÖÆ£º¿ª·¢Ð§ÂÊÓëÓÅ»¯µÄ..
ASP.NET»º´æ»úÖÆ»ù´¡¸ÅÄî
ASP.NET»º´æÊý¾ÝÌí¼Ó·½·¨Ò»ÀÀ
ASP.NET»º´æÊý¾Ý¼¼ÇÉÈýÔò
½éÉÜ
»º´æÊÇÔÚÄÚ´æ´ ......