Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

Xml web control and request validation error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Aamir Ghanchi - 20 Mar 2008 17:26 GMT
Hi,

I hope there is a solution for this other than lowering guard by
turning off ValidateRequest property of the page (or in webconfig)

On page load I move xml string value into an Xml web control's
DocumentContent property (not the XmlDataSource) and enableviewstate
to true. When the page posts back, I get the error as follows:

"A potentially dangerous Request.Form value was detected from the
client ..."

It's obviously freaking out on the angled brackets in the content.
Being an asp control I thought it should be given  a special treatment
by asp through some internal encodeing etc. I tried HtmlEncode, but it
will throw some other xml exception of being not well formed or
msissing root. Any way I gave up and am using a HiddenField instead to
hold the value between the trips, but it would be nice to use xml
control to hold xml data.

Any ideas?

TIA
Peter Bromberg [C# MVP] - 20 Mar 2008 21:25 GMT
Well, as you've discovered, you don't have to use an Xml Control. In fact,
you don't need any control at all to "hold" the Xml string - you could store
it in Session state.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net

> Hi,
>
[quoted text clipped - 19 lines]
>
> TIA

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.