| | |
Potentially Dangerous Request.Form? Error
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Jun 2005
Posts: 28
Reputation:
Solved Threads: 0
When I run my crawler once it works on any page. Run it again on another page or the same page and I get this error
At this point it's simply reading a string. html/text that has already been imported.
I know because the error always occurs in the same spot. After the AspTear Component has been closed.
I do have some Google Ads on my page that might cause this error, I'm guessing.
Here is the Sub where the error is occuring if it's helpful:
Maybe I will try discarding the Google Script
( Probably a good idea anyway )
ASP.NET Syntax (Toggle Plain Text)
Server Error in '/WebApplication5' Application. -------------------------------------------------------------------------------- A potentially dangerous Request.Form value was detected from the client (txtBody="...e customer’s experience,..."). 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 (txtBody="...e customer’s experience,..."). 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: [HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (txtBody="...e customer’s experience,...").] System.Web.HttpRequest.ValidateString(String s, String valueName, String collectionName) System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, String collectionName) System.Web.HttpRequest.get_Form() +113 System.Web.UI.Page.GetCollectionBasedOnMethod() System.Web.UI.Page.DeterminePostBackMode() System.Web.UI.Page.ProcessRequestMain() System.Web.UI.Page.ProcessRequest() System.Web.UI.Page.ProcessRequest(HttpContext context) System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
At this point it's simply reading a string. html/text that has already been imported.
I know because the error always occurs in the same spot. After the AspTear Component has been closed.
I do have some Google Ads on my page that might cause this error, I'm guessing.
Here is the Sub where the error is occuring if it's helpful:
ASP.NET Syntax (Toggle Plain Text)
Private Sub Extract_Body() Dim strBody Dim lenBody Dim chkBody Dim arrBody Dim lenStr Dim i On Error Resume Next strBody = Left(strRetval, InStr(strRetval, LCase("</body")) - 1) chkBody = InStr(strBody, LCase("<body")) lenBody = Len(strBody) strBody = Right(strBody, lenBody - chkBody + 1) arrBody = Split(strBody, ">") lenBody = UBound(arrBody) For i = 0 To lenBody strBody = Left(arrBody(i), InStr(arrBody(i), "<")) strBody = Replace(strBody, "<", "") txtBody.Text = txtBody.Text & strBody & vbCrLf Next i End Sub
Maybe I will try discarding the Google Script
( Probably a good idea anyway )
•
•
Join Date: Jun 2005
Posts: 28
Reputation:
Solved Threads: 0
Well I studied the error and found a WorkAround.
Not real happy with the idea, but it looks like the only option for now.
ASP.NET Syntax (Toggle Plain Text)
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.
ASP.NET Syntax (Toggle Plain Text)
<%@ Page validateRequest=false .....
Not real happy with the idea, but it looks like the only option for now.
•
•
Join Date: Jul 2008
Posts: 39
Reputation:
Solved Threads: 6
0
#3 23 Days Ago
Watch this video:
http://www.asp.net/learn/videos/video-8605.aspx
http://www.asp.net/learn/videos/video-8605.aspx
![]() |
Similar Threads
- CustomValidate, another problem (ASP.NET)
- cdoMessage.To=Request.Form("email") (ASP)
- request.form is not working in asp.net (ASP.NET)
- integration in c++ (C++)
- help connecting a form to a database.. error message (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Summary validation problem
- Next Thread: GridView in ASP.NET
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol ajax alltypeofvideos asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# c#gridviewcolumn cac checkbox class commonfunctions compatible confirmationcodegeneration content contenttype countryselector courier dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deployment development dgv dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv formatdecimal forms formview gridview gudi homeedition iis javascript jquery listbox menu microsoft mouse mssql nameisnotdeclared news opera panelmasterpagebuttoncontrols problem redirect registration relationaldatabases reportemail schoolproject security serializesmo.table sessionvariables silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl textbox tracking treeview unauthorized validatedate validation vb.net video videos vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webdevelopment webprogramming webservice youareanotmemberofthedebuggerusers





