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

ASP.NETÊý¾Ý¿âÁ¬½Ó×Ö·û´®µÄ¼ÓÃÜÓë½âÃÜ


ASP.NETÊý¾Ý¿âÁ¬½Ó×Ö·û´®µÄ¼ÓÃÜÓë½âÃÜ
ASP.NETÊý¾Ý¿âÁ¬½Ó×Ö·û´®µÄ¼ÓÃÜÓë½âÃÜ
ASP.NET web.configÖУ¬Êý¾Ý¿âÁ¬½Ó×Ö·û´®µÄ¼ÓÃÜÓë½âÃÜ¡£
¿ªÊ¼--->ÔËÐÐ,ÊäÈëcmd£¬½Ó×ÅÊäÈëÒÔÏÂÄÚÈÝ
¼ÓÃÜ£º
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -pef "connectionStrings" "ÄãµÄWebÏîĿ·¾¶"
¸´ÖÆ´úÂë
½âÃÜ£º
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -pdf "connectionStrings" "ÄãµÄWebÏîĿ·¾¶"
¸´ÖÆ´úÂë
.NETΪ°æ±¾µÄ·¾¶×ÔÐÐÐ޸ģ¬ÆäÖÐconnectionStringsÁ¬½Ó×Ö·û´®µÄÃû³Æ¡£
ÐèҪעÒâµÄÊÇ£¬¼ÓÃܹý³ÌÖÐʹÓÃÁËÒ»¸ö»ùÓÚ±¾»úµÄÃÜÔ¿£¬ÕâÒâζ׎âÃܹý³Ì±ØÐëÔÚͬһ̨¼ÆËã»úÉÏÍê³É¡£Èç¹ûÊǽ«¼ÓÃܺóµÄWeb.configÎļþÒƶ¯µ½ÆäËü¼ÆËã»úÉÏ£¬ÄÇôWeb.configÎļþÖеÄÁ¬½Ó×Ö·û´®½«²»Äܹ»Õý³£½âÃÜ¡£
ASP.net2.0ÌṩÁ˼ò±ãµÄ¼ÓÃÜ·½·¨£¬¼´Ê¹ÓÃaspnet_iis.exeÃüÁ¸ÃÃüÁîλÖÃÈçÏ£º
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
×¢Ò⣬¾ßÌåÇé¿öÊÓϵͳλÖü°°æ±¾ºÅÓÐËù²îÒì
ÔÚÃüÁîģʽϽøÈë¸ÃĿ¼¼´¿ÉÔËÐУ¬ÍêÕûÃüÁîΪ£º
aspnet_iis -pef "connectionStrings" "Web.cofing¾ø¶Ô·¾¶£¨×¢£º²»ÐèÒªÊäÈëweb.config£©"
¸´ÖÆ´úÂë
Èç¹ûÕý³£»áÌáʾ“³É¹¦”£¬´Ëʱ´ò¿ªWeb.config»á·¢ÏÖ×Ö·û´®ÒѼÓÃÜ
½âÃÜÃüÁîΪ£º
aspnet_iis -pdf "connectionStrings" "Web.cofing¾ø¶Ô·¾¶£¨×¢£º²»ÐèÒªÊäÈëweb.config£©"
¸´ÖÆ´úÂë
×¢ÒâµÄÊǼÓÃÜ¡¢½âÃܱØÐëÔÚһ̨»úÆ÷ÉÏÍê³É¡£
£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­
ÏÂÃæÏÔʾµÄÊÇͨ¹ý´úÂ뷽ʽ¶ÔÊý¾Ý¿âÁ¬½Ó×Ö·û´®¼ÓÃÜ£¬´úÂëÈçÏ£º
Configuration config = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath);
ConfigurationSection configSection = config.GetSection("connectionStrings");
if (configSection.SectionInformation.IsProtected)
...{//Èç¹ûÒѾ­¼ÓÃÜ£¬¾Í²»ÓÃÔÙ¼ÓÃÜÁË
configSection.SectionInformation.UnprotectSection();
config.Save();
}
else
...{
configSection.SectionInformation.ProtectSection ("DataProtectionConfigurationProvider");
config.Save();
}
¸´ÖÆ´úÂë


Ïà¹ØÎĵµ£º

Asp.net³£ÓÃÓï¾ä20Ìõ.//µ¯³ö¶Ô»°¿ò.µã»÷תÏòÖ¸¶¨Ò³Ãæ


1.//µ¯³ö¶Ô»°¿ò.µã»÷תÏòÖ¸¶¨Ò³Ãæ
Response.Write(" <script>window.alrt('¸Ã»áԱûÓÐÌá½»ÉêÇë,ÇëÖØÐÂÌá½»£¡') </script>"); Response.Write(" <script>window.loation='http://www.cnblogs.com/kevin1031" target="_blank">http://www.cnblogs.com/kevin1031' </script>");
2.//µ¯³ö¶Ô»°¿ ......

dz̸ASP.net°²È«±à³Ì

ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔÇ°µÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕ߶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......

asp.netÃæÊÔÌâ(8)

121.ÃèÊöÒ»ÏÂc#ÖÐË÷ÒýÆ÷µÄʵÏÖ¹ý³Ì£¬ÊÇ·ñÖ»Äܸù¾ÝÊý×Ö½øÐÐË÷Òý£¿    
 
´ð£º²»ÊÇ¡£¿ÉÒÔÓÃÈÎÒâÀàÐÍ¡£   
 
 
 
122.ÔÚc££ÖУ¬string str = null Óë string str = " " Ç뾡Á¿Ê¹ÓÃÎÄ×Ö»òͼÏó˵Ã÷ÆäÖеÄÇø±ð¡£   
 
´ð£ºnullÊÇÃ»Ó ......

ASP.NETÖеķþÎñÆ÷¿Ø¼þºÍ¿Í»§¶Ë¿Ø¼þ

 1. ·ÃÎÊ HTML¿Ø¼þµÄÖµÊÇvalueÊôÐÔ
     ·ÃÎÊ ASP.NET¿Ø¼þµÄÖµÊÇtextÊôÐÔ
 --------------------------------------------------------
2.·Ö±ðÐèÒªµÄÃû×Ö¿Õ¼äΪ£º
using System.Web.UI.HTML.Controls;
using System.Web.UI.WebControls;
-------------------------------------------- ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ