473,326 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Problem in Accepting Xml Data in TextBox

I am Developing a Web Application in ASP.NET 1.1 with C#.
I want to accept Xml Data with proper tags through Text Box in my page.
But when I press Submit Button to upload the data, it gives me the
following Error

Server Error in '/' Application.
--------------------------------------------------------------------------------

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

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 (TextBox1="<Property><Propertie...").]
System.Web.HttpRequest.ValidateString(String s, String valueName, String collectionName)
System.Web.HttpRequest.ValidateNameValueCollection (NameValueCollection nvc, String collectionName) +99
System.Web.HttpRequest.get_Form() +113
System.Web.UI.Page.GetCollectionBasedOnMethod() +69
System.Web.UI.Page.DeterminePostBackMode() +47
System.Web.UI.Page.ProcessRequestMain() +2106
System.Web.UI.Page.ProcessRequest() +218
System.Web.UI.Page.ProcessRequest(HttpContext context) +18
System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication+IExecutionStep.Execute() +179
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +87


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573


Please help me. Thanks in advance.
Regards,
Sandeep Singh Sekhon

Jul 6 '06 #1
3 4696
Hi,

Thank you for your post.

ASP.NET 1.1 added the ValidateRequest attribute to protect your site from
cross-site scripting. For more information on cross-site scripting, you can
refer to following article:

#Cross-site scripting
http://en.wikipedia.org/wiki/Cross_site_scripting

By default, request validation is enabled in Machine.config. You can turn
off this feature in web.config:

<system.web>
<pages validateRequest="false" />
</system.web>

Or you can disable request validation on a page-by-page basis:

<%@ Page Language="C#" ValidateRequest="false" %>

Hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 6 '06 #2
Walter Wang [MSFT] wrote:
Hi,

Thank you for your post.

ASP.NET 1.1 added the ValidateRequest attribute to protect your site from
cross-site scripting. For more information on cross-site scripting, you can
refer to following article:

#Cross-site scripting
http://en.wikipedia.org/wiki/Cross_site_scripting

By default, request validation is enabled in Machine.config. You can turn
off this feature in web.config:

<system.web>
<pages validateRequest="false" />
</system.web>

Or you can disable request validation on a page-by-page basis:

<%@ Page Language="C#" ValidateRequest="false" %>

Hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Thanks Wang for your reply. My Application now works with your solution.

Regards,
Sandeep
Jul 7 '06 #3
Hi Sandeep,

Appreciate your update and response. I am glad to hear that the problem has
been fixed. If you have any other questions or concerns, please do not
hesitate to contact us. It is always our pleasure to be of assistance.

Have a nice day!

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
3
by: Mad Bull | last post by:
I am a newbie. I have created a page which upon load connects to SQL Server and runs a stored procedure. The data returned from this is assigned to some asp:labels and asp:textbox controls. This...
2
by: DC | last post by:
The Code <%@ import namespace="System" %> <%@ import namespace="System.Web" %> <%@ import namespace="System.Web.UI" %> <%@ import namespace="System.Web.UI.HtmlControls" %> <%@ import...
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
2
by: Vbbeginner07 | last post by:
Hi all Wonder if anyone can help me out to solve this: please find the code of textbox that accepts only characters and one textbox that accepts only numbers: (vb) textbox for accepting...
9
by: =?Utf-8?B?dHBhcmtzNjk=?= | last post by:
OK I have some Chinese text in sql server column that looks like this: 12大专题调研破解广东科学发展难题 This is unicode? Anyway, I put this data into a text area like this:...
2
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to...
4
by: pankajsingh5k | last post by:
Hi guys, These question is for all the experts... Please help me before my brain explodes The problem is again with the formview control.. I have a formview and i have to use it that...
2
by: pankajsingh5k | last post by:
Dear All, Please help me... I had read an article to lazy load a tab in a tabcontainer using an update panel on http://mattberseth.com/blog/2007/07/how_to_lazyload_tabpanels_with.html ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.