Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ASP.NET


ASP.NET ÅäÖÃÎļþ¹¦ÄÜÓë ASP.NET ³ÉÔ±×ʸñ¡¢ASP.NET ½ÇÉ«¹ÜÀíÒÔ¼°ÆäËû ASP.NET ¹¦ÄÜʹÓÃͬһ»ùÓÚÌṩ³ÌÐòµÄ½á¹¹¡£ASP.NET ÅäÖÃÎļþ¹¦ÄÜÊÇÒ»¸ö·Ö²ãϵͳ£¬ÆäÖÐÅäÖÃÎļþ¹¦ÄܵŦÄÜ£¨ÌṩÀàÐÍ»¯ÊôÐÔÖµ²¢¹ÜÀíÓû§±êʶ£©Óë»ù´¡Êý¾Ý´æ´¢Çø·ÖÀë¡£ÅäÖÃÎļþ¹¦ÄÜÒÀÀµÓÚÅäÖÃÎļþÌṩ³ÌÐò£¨Êý¾ÝÌṩ³ÌÐò£©À´Ö´Ðд洢ºÍ¼ìË÷ÅäÖÃÎļþÊôÐÔÖµËùÐèµÄºó¶ËÈÎÎñ¡£
 
1¡¢Ä¬ÈÏÅäÖÃÎļþÌṩ³ÌÐò
ASP.NET °üº¬Ò»¸öʹÓà Microsoft SQL Server ´æ´¢Êý¾ÝµÄÅäÖÃÎļþÌṩ³ÌÐò¡£Ä¬È쵀 ASP.NET ¼ÆËã»úÅäÖðüº¬Ò»¸öÃûΪ AspNetSqlProfileProvider µÄ SqlProfileProvider ĬÈÏʵÀý£¬¸ÃʵÀýÁ¬½ÓÖÁ±¾µØ¼ÆËã»úÉ쵀 SQL Server¡£Ä¬ÈÏÇé¿öÏ£¬ASP.NET ÅäÖÃÎļþ¹¦ÄÜʹÓÃÌṩ³ÌÐòµÄ´ËʵÀý¡£»òÕߣ¬¿ÉÒÔÔÚÓ¦ÓóÌÐòµÄ Web.config ÎļþÖÐÖ¸¶¨Ò»¸ö²»Í¬µÄĬÈÏÌṩ³ÌÐò¡£
ÈôҪʹÓà SqlProfileProvider£¬Ê×ÏȱØÐë´´½¨ SqlProfileProvider ʹÓÃµÄ SQL Server Êý¾Ý¿â¡£¿ÉÒÔͨ¹ýÔËÐÐÒÔÏ·¾¶ÖÐµÄ Aspnet_regsql.exe ÃüÁîÀ´´´½¨Êý¾Ý¿â£º
systemroot\Microsoft .NET\SDK\°æ±¾
ÔËÐиù¤¾ßʱ£¬¿ÉÖ¸¶¨ -Ap Ñ¡Ïî¡£ÏÂÃæµÄÃüÁîÑÝʾÌض¨µÄÓï·¨£¬´ËÓï·¨ÓÃÓÚ´´½¨Ê¹Óà SqlProfileProvider ´æ´¢ ASP.NET ÅäÖÃÎļþËùÐèµÄÊý¾Ý¿â£º
aspnet_regsql.exe -Ap
ÉÏÃæµÄʾÀýûÓÐΪ´´½¨µÄÊý¾Ý¿âÖ¸¶¨Ãû³Æ£¬Òò´Ë½«Ê¹ÓÃĬÈÏÃû³Æ¡£Ä¬ÈϵÄÊý¾Ý¿âÃû³ÆΪ Aspnetdb¡£
Èç¹ûͨ¹ýʹÓü¯³É°²È«ÐÔµÄÁ¬½Ó×Ö·û´®¶ÔÅäÖÃÎļþÌṩ³ÌÐò½øÐÐÅäÖã¬Ôò ASP.NET Ó¦ÓóÌÐòµÄ½ø³ÌÕÊ»§±ØÐë¾ßÓÐÁ¬½ÓÖÁ SQL Server Êý¾Ý¿âµÄȨÏÞ¡£
˵Ã÷£º Èç¹ûʹÓà SQL Server 2005 Express Edition Êý¾Ý¿â£¬¶ø°²×°¸ÃÊý¾Ý¿âʱʹÓõÄÊÇĬÈÏÅäÖã¬ÇÒ¸ÃÊý¾Ý¿âÓë Web ·þÎñÆ÷ÔÚͬһ̨¼ÆËã»úÉÏ£¬Ôò ASP.NET ½«×Ô¶¯´´½¨ÅäÖÃÎļþÊý¾Ý¿â¡£
 
2¡¢×Ô¶¨ÒåÅäÖÃÎļþÌṩ³ÌÐò
ÔÚÓÐЩÇé¿öÏ£¬¿ÉÄÜÏ£Íû´´½¨ºÍʹÓÃ×Ô¶¨ÒåÅäÖÃÎļþÌṩ³ÌÐò¡£Èç¹ûÒѾ­¾ßÓÐÒ»¸ö´æ´¢Óû§ÐÅÏ¢µÄÊý¾Ý¿â£¨ÈçÔ±¹¤Êý¾Ý¿â£©£¬Èç¹ûÐèҪʹÓà Microsoft SQL Server Ö®ÍâµÄÊý¾Ý¿â£¬»òÕßÐèҪʹÓò»Í¬µÄÊý¾Ý´æ´¢Çø£¨Èç XML Îļþ£©£¬Ôò¾­³£ÐèÒªÕâÑù×ö¡£
Óû§ÅäÖÃÎļþÖд洢µÄÊôÐÔ¿ÉÍêÈ«Óɲ»Í¬µÄÅäÖÃÎļþÌṩ³ÌÐòÌṩ·þÎñ¡£Òò´Ë£¬¿ÉÒÔ¶ÔÀ´×Ô¶à¸öÊý¾ÝÔ´µÄÊý¾Ý½øÐйÜÀí£¬ÒÔ´æ´¢µ¥¸öÓû§ÅäÖÃÎļþµÄÐÅÏ¢¡£


Ïà¹ØÎĵµ£º

asp.net¿Í»§¶Ë½Å±¾µ÷ÓÃÒ³Ãæ·½·¨

  µÚÒ»²½£º
½«Ä³¸öÒ³ÃæµÄ·½·¨ ÓÐ webmethod  attribute;
[WebMethod]
//Ö»ÄÜÊÇ public static µÄ·½·¨
public static DateTime GetCurrentTime()
{
return DateTime.UtcNow;
}
µÚ¶þ²½£º
 Ò³ÃæÓÐÒ»¸öScriptManager ÉèÖÃËüµÄenablepagemethod=true;
asp:ScriptManager ID="Scri ......

ʲôÊÇAsp.NetÓ¦ÓóÌÐò

 ASP.NET defines an application as the sum of all files, pages, handlers, modules, and executable code that can be invoked or run in the scope of a given virtual directory (and its subdirectories) on a Web application server. For example, an "order" application might be published in the "/order ......

ASP.NETÒ³Ãæ¶ÔÏó

 Ò»¡¢Cookie ¸ÅÊö
1¡¢·½°¸
Cookie ÌṩÁËÒ»ÖÖÔÚ Web Ó¦ÓóÌÐòÖд洢Óû§Ìض¨ÐÅÏ¢µÄ·½·¨¡£ÀýÈ磬µ±Óû§·ÃÎÊÄúµÄÕ¾µãʱ£¬Äú¿ÉÒÔʹÓà Cookie ´æ´¢Óû§Ê×Ñ¡Ïî»òÆäËûÐÅÏ¢¡£µ±¸ÃÓû§ÔٴηÃÎÊÄúµÄÍøվʱ£¬Ó¦ÓóÌÐò±ã¿ÉÒÔ¼ìË÷ÒÔÇ°´æ´¢µÄÐÅÏ¢¡£
 
2¡¢±³¾°
      Cookie ÊÇһС¶ÎÎı¾ÐÅÏ¢£ ......

ASP.NETÒ³Ãæ¶ÔÏó – User

 »ñÈ¡Óйط¢³öÒ³ÇëÇóµÄÓû§µÄÐÅÏ¢¡£
Ò»¡¢HttpContext Àà
·â×°Óйظö±ð HTTP ÇëÇóµÄËùÓÐ HTTP Ìض¨µÄÐÅÏ¢¡£
HttpContext ÀàÐ͹«¿ªÒÔϳÉÔ±¡£
 ¹¹Ô캯Êý
Ãû³Æ
˵Ã÷
HttpContext
ÒÑÖØÔØ¡£ ³õʼ»¯ LinePragmaCodeInfo ÀàµÄÒ»¸öÐÂʵÀý¡£
 ·½·¨
Ãû³Æ
˵Ã÷
AddError
½«Òì³£Ìí¼Óµ½µ±Ç° HTTP ÇëÇóµÄÒ ......

ASP.NET


      ÔÚÐí¶àÓ¦ÓóÌÐòÖУ¬ÐèÒª´æ´¢²¢Ê¹ÓöÔÓû§Î¨Ò»µÄÐÅÏ¢¡£Óû§·ÃÎÊÕ¾µãʱ£¬Äú¿ÉÒÔʹÓÃÒÑ´æ´¢µÄÐÅÏ¢ÏòÓû§ÏÔʾ Web Ó¦ÓóÌÐòµÄ¸öÐÔ»¯°æ±¾¡£¸öÐÔ»¯Ó¦ÓóÌÐòÐèÒª´óÁ¿µÄÔªËØ£º±ØÐëʹÓÃΨһµÄÓû§±êʶ·û´æ´¢ÐÅÏ¢£¬Äܹ»ÔÚÓû§ÔٴηÃÎÊʱʶ±ðÓû§£¬È»ºó¸ù¾ÝÐèÒª»ñÈ¡Óû§ÐÅÏ¢¡£ÈôÒª¼ò»¯Ó¦ÓóÌÐò£¬¿ÉÒÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ