PDA

View Full Version : potentially dangerous Request.Form



faramarz_s
یک شنبه 21 دی 1382, 15:51 عصر
هنگامی که بخواهیم گزینه های htmlرا در آپدیت یک TextBox اعمال کنیم ،نظیر همین کلیدهای
موجود در این صفحه (B-I---U-Code-....) چکار باید بکنیم؟
یعنی درون رویداد دکه های فوق چه باید بنویسیم؟

A potentially dangerous Request.Form value was detected from the client (TextBox1="<br> <h1> a <h1/>").
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 (TextBox1="<br> <h1> a <h1/>").

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

تشکر

Vahid_Nasiri
چهارشنبه 24 دی 1382, 21:41 عصر
در asp.net نگارش یک و یک دهم کراس سایت اسکریپتینگ کنترل می شود. یعنی کاربر .... نمی تواند اسکریپت خطرناک آپلود کند. زبان فارسی هم متاسفانه بعنوان اسکریپت خطرناک شناسایی می شود!

برای حل مشکل در وب کانفیگ خط زیر را اضافه کنید


<pages validateRequest="false" />

البته قبل از


</system.web>