PDA

View Full Version : می دونید خطای زیر رو چه جوری باید برطرف کرد؟



ali1381
دوشنبه 04 تیر 1386, 07:46 صبح
من توی صفحه ام از یک freetextbox استفاده کردم وقتی اونرو پر می کنم و فرم رو ارسال می کنم با خطای زیر مواجه می شم می دونید برای رفع کردنش باید چه کار کنم؟


A potentially dangerous Request.Form value was detected from the client (NewsText="<P>dddd</P> <P>fhfg...").
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.

brida_kh
دوشنبه 04 تیر 1386, 08:22 صبح
این کد رو به ابتدای صفحه aspx تون اضافه کنید




<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/cPanel/MasterPage.master" CodeFile="نام صفحه.aspx.cs" Inherits="News" ValidateRequest="false" %>

ali1381
دوشنبه 04 تیر 1386, 11:22 صبح
با تشکر درست شد