¹ØÓÚ ASP.NET Èý²ã¼Ü¹¹
Ò»°ã¶ÔÓÚÓùý ¶¯Èí.net´úÂëÉú³ÉÆ÷µÄÈËÀ´Ëµ£¬Ê¡Á˺öàÊÂÇé¡£ model £¨ÊµÌå²ã£©, dal£¨Êý¾Ý·ÃÎʲ㣩, bll£¨ÒµÎñÂß¼²ã£©
model ¾Í²»ÓÃ˵ÁË dalÊý¾Ý·ÃÎʲãÓеÄʱºòÒªµ÷Óô洢¹ý³Ì£¬ÒÔÇ°ºÜÉÙд£¬¾õµÃ²ÎÊýµÄµ÷ÓÃͦ·Ñ¾¢µÄ£¬´ó¼ÒÓÐʲôºÃµÄ°ì·¨ÄÜÌá¸ß´æ´¢¹ý³ÌÂ𣡣¡£¡£¡£¡£¡£¡£¡£¡£¡
Ïà¹ØÎĵµ£º
ÔÚ ASP.NET ÍøÒ³µÄĬÈÏÄ£ÐÍÖУ¬Óû§»áÓëÒ³½»»¥£¬µ¥»÷°´Å¥»òÖ´Ðе¼Ö»ط¢µÄһЩÆäËû²Ù×÷¡£´Ëʱ½«ÖØд´½¨Ò³¼°Æä¿Ø¼þ£¬²¢ÔÚ·þÎñÆ÷ÉÏÔËÐÐÒ³´úÂ룬ÇÒа汾µÄÒ³±»³ÊÏÖµ½ä¯ÀÀÆ÷¡£µ«ÊÇ£¬ÔÚÓÐЩÇé¿öÏ£¬ÐèÒª´Ó¿Í»§¶ËÔËÐзþÎñÆ÷´úÂ룬¶ø²»Ö´Ðлط¢¡£Èç¹ûÒ³ÖеĿͻ§¶Ë½Å±¾Î¬»¤Ò»Ð©×´Ì¬ÐÅÏ¢£¨ÀýÈ磬¾Ö²¿±äÁ¿Öµ£©£¬ÄÇô·¢ËÍÒ³ºÍ»ñÈ¡Ò ......
ÔÚʹÓÃasp.net±àдwebserviceʱ£¬Ä¬ÈÏÇé¿öÏÂÊDz»Ö§³ÖsessionµÄ£¬µ«ÎÒÃÇ¿ÉÒÔ°ÑWebMethodµÄEnableSessionÑ¡ÏîÉèΪtrueÀ´ÏÔʽµÄ´ò¿ªËü£¬Çë¿´ÒÔÏÂÀý×Ó£º
1 н¨ÍøÕ¾WebSite
2 н¨web·þÎñWebService.asmx£¬Ëü¾ßÓÐÒÔÏÂÁ½¸ö·½·¨£º
[WebMethod(EnableSession = true)]
public string Login(string name)
{
  ......
ÎÒÃÇÔÚÊ״β¿ÊðmvcµÄÏîĿʱͨ³£»áÓöµ½Ò»µãÎÊÌâ¡£M$ÒѾÔÚGlobal.asax.csÎļþÖаüº¬ÁËÕâÁ½¾ä×¢Ê͵ÄÌáʾ¡£
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
// visit http://go.microsoft.com/?LinkId=9394801
µ«ÊÇÎÒÃÇ·ÃÎÊÕâ¸öÍøÖ·¿´µ½ÉÏÃæµÄÎÄÕ¶Ôiis5.1(win ......
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Xml;
using System.Text; ......
±¾ÆªÎÄÕ½éÉÜÁËÔÚASP.Net 2.0ÈçºÎ×ö´°ÌåÉí·ÝÑéÖ¤£¬²¢ÇÒ½²½âÁËIISºÍASP.Net2.0´°ÌåÉí·ÝÑéÖ¤»úÖÆÊÇÈçºÎ½áºÏÔÚÒ»ÆðµÄ¡£ÎÒÃÇ»¹»áÏêϸ½²½âÒ»ÏÂ2.0ÖйØÓÚ´°ÌåÉí·ÝÑéÖ¤µÄÒ»¸öÀࣺFormsAuthenticationModule¡£
l ×ÛÊö
µ±Ä³Ò»¸öÓû§Ê¹ÓÃÓû§Ãû³É¹¦µÇ½Íøվʱ£¬FormsAuthenticatio ......