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

¹ØÓÚASP.NetµÄvalidateRequest=false£¨ÑéÖ¤ÇëÇó£©

ASP.NetµÄvalidateRequest=false
      validateRequest="false"   Ö¸ÊÇ·ñÒªIISÑéÖ¤Ò³ÃæÌá½»µÄ·Ç·¨×Ö·û£¬±ÈÈ磺>,<ºÅµÈ,µ±ÎÒÃÇÐèÒª½«Ò»¶¨¸ñʽµÃhtml´úÂë»ñµÃ£¬²åÈëÊý¾Ý¿âʱºò£¬¾ÍÒª½«Õâ¸öÊôÐÔÉèÖÃΪfalse,ÀýÈçÄ㽫×ÖÌå¼Ó´ÖµÈ²Ù×÷ʱ¡£
   
ASP.Net 1.1ºóÒýÈëÁ˶ÔÌá½»±íµ¥×Ô¶¯¼ì²éÊÇ·ñ´æÔÚXSS(¿çÕ¾½Å±¾¹¥»÷)µÄÄÜÁ¦¡£µ±Óû§ÊÔͼÓÃÖ®ÀàµÄÊäÈëÓ°ÏìÒ³Ãæ·µ»Ø½á¹ûµÄʱºò£¬ASP.NetµÄÒýÇæ»áÒý·¢Ò»¸ö HttpRequestValidationExceptioin¡£Ä¬ÈÏÇé¿öÏ»᷵»ØÈçÏÂÎÄ×ÖµÄÒ³Ã棺
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
Server Error in '/YourApplicationPath' Application
A potentially dangerous Request.Form value was detected from the client
(txtName="<b>").
Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.
Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (txtName="<b>").
....
¡¡¡¡ÕâÊÇASP.NetÌṩµÄÒ»¸öºÜÖØÒªµÄ°²È«ÌØÐÔ¡£ÒòΪºÜ¶à³ÌÐòÔ±¶Ô°²È«Ã»ÓиÅÄÉõÖÁ¶¼²»ÖªµÀXSSÕâÖÖ¹¥»÷µÄ´æÔÚ£¬ÖªµÀÖ÷¶¯È¥·À»¤µÄ¾Í¸üÉÙÁË¡£ASP.NetÔÚÕâÒ»µãÉÏ×öµ½Ä¬ÈÏ°²È«¡£ÕâÑùÈö԰²È«²»ÊǺÜÁ˽âµÄ³ÌÐòÔ±ÒÀ¾É¿ÉÒÔд³öÓÐÒ»¶¨°²È«·À»¤ÄÜÁ¦µÄÍøÕ¾¡£
¡¡¡¡µ«ÊÇ£¬µ±ÎÒGoogleËÑË÷ HttpRequestValidationException »òÕß "A potentially dangerous Request.Form value was detected from the client"µÄʱºò£¬¾ªÆæµÄ·¢Ïִ󲿷ÖÈ˸ø³öµÄ½â¾ö·½°¸¾¹È»ÊÇÔÚASP.NetÒ³ÃæÃèÊöÖÐͨ¹ýÉèÖà validateRequest=false À´½ûÓÃÕâ¸öÌØÐÔ£¬¶ø²»È¥¹ØÐÄÄǸö³ÌÐòÔ±µÄÍøÕ¾ÊÇ·ñÕæµÄ²»ÐèÒªÕâ¸öÌØÐÔ¡£¿´µÃÎÒÕâ½ÐÒ»¸öµ¨Õ½Ðľª¡£°²È«ÒâʶӦ¸Ãʱʱ¿Ì¿ÌÔÚÿһ¸ö³ÌÐòÔ±µÄÐÄÀ²»¹ÜÄã¶Ô°²È«µÄ¸ÅÄîÁ˽â¶àÉÙ£¬Ò»¸öÖ÷¶¯µÄÒâʶÔÚÄÔ×ÓÀÄãµÄÕ¾µã¾Í»á°²È«ºÜ¶à¡£
¡¡¡¡ÎªÊ²Ã´ºÜ¶à³ÌÐòÔ±ÏëÒª½ûÖ¹


Ïà¹ØÎĵµ£º

ASP.NETÒ³ÃæÖ®¼ä´«µÝÖµµÄ¼¸ÖÖ·½·¨

Ò».ʹÓÃQueryString
Request.QueryString
   ÔÚASPʱ´ú£¬Õâ¸öÊǽϳ£Óõķ½·¨£¬µ½ÁËASP.NET£¬ºÃÏñÓõÄÈ˲»¶àÁË£¬µ«ÊDz»¹ÜÔõô˵£¬ÕâÊÇÒ»¸öûÓйýʱ£¬ÇÒºÜÖµµÃÍƼöµÄ·½·¨£¬ÒòΪ²»¹ÜÊÇASP»¹ÊÇASP.NET£¬×î»ù±¾µÄ¶¼»¹ÊÇ»ùÓÚHTTpЭÒéµÄ¡£ ȱµãÊǷdz£Ã÷ÏԵģ¬ÈÃÔÚ¶à¸öÒ³Ãæ´«µÝʱ£¬¿ÉÄܾÍRequest²»µ½ÁË
  ʹÓÃQu ......

dzÎöASP.NETµÄIISÓ³Éä

ASP.NETĬÈÏÀ©Õ¹ÃûΪ.aspx£¬¿ÉÊÇÎÒÃÇ¿´µ½Ðí¶àÍøÕ¾µÄÀ©Õ¹ÃûºÜÌر𣬱ÈÈçУÄÚµÄdo¡£¸öÐÔÖ®Ó໹¿ÉÒÔʵÏÖ¼òµ¥µÄα¾²Ì¬£¨¼´°Ñºó׺¸ÄΪhtml£©²»¹ýÏà¶ÔURLRewriterÀ´Ëµ£¬ÊÇÓеã¼òª£¨Ö»ÄܸĵôÁ¬½ÓÖеÄ.aspx£©£¬²»¹ý²»Ê§ÎªÒ»ÖÖ·½·¨¡£ÏÂÃæÎÒÃǾÍÀ´ÊµÏÖËû£¡
    ÏÈÀ´ËµÒ»ÏÂASP.NET 1.1Öеķ½·¨£º
    ......

ASP.NETÍøÕ¾ÓëDiscuz!NTÂÛ̳ÕûºÏ

²½Öè1£º
ÒýÈë5¸öDLLµ½ÏîÄ¿ÖÐ
·Ö±ðÊÇ
using Discuz.Common;
using Discuz.Forum;
using Discuz.Config;
using Discuz.Entity;
using Discuz.Data;
²½Öè2£º 
   public class Discuz_NT
    {
        public static ArrayList Login(string us ......

ASP.netÒ³ÃæÌøתµÄ¼¸ÖÖ·½·¨

<a>±êÇ©
1.         <a href=”test.aspx”></a>
2.         ÕâÊÇ×î³£¼ûµÄÒ»ÖÖתÏò·½·¨;
HyperLink¿Ø¼þ
1.         Asp.net ·þÎñÆ÷¶Ë¿Ø¼þ ÊôÐÔNavigateUrlÖ¸¶ ......

ÔÚASP.Net 2.0ÖÐʵÏÖ¶àÓïÑÔ½çÃæµÄ·½·¨

¡¡1£® ¸úÒÔÇ°Ò»Ñù×ö½çÃ棬ֻÊÇ×¢Ò⣬°ÑËùÓÐÐèÒªÓжàÓïÑÔ½çÃæµÄÎÄ×Ö¶¼ÓÃlabelÀ´×ö
¡¡¡¡2£® ×öÍêÒÔºó£¬ÔÚSolution ExplorerÀïÑ¡ÖÐÕâ¸öÎļþ£¬Ñ¡Tools-£¾Generate Local Resource
¡¡¡¡3£® Äã»á·¢ÏÖÉú³ÉÁËÒ»¸öĿ¼£¬App_LocalResources£»Õâ¸öĿ¼Àï¶àÁËÒ»¸öresxµÄÎļþ¡£±ÈÈçÄãµÄaspxÎļþÊÇdefault.aspx£¬Ëü¾Í»áÉú³ÉÒ»¸ö½Ð×öde ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ