473,385 Members | 2,028 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,385 software developers and data experts.

validateRequest and foreign characters

I get an error on a .net 2.0 page when I use foreign characters, such as ç or
ã. Setting validateRequest=false handles this, but is there a way to keep
validateRequest=true but allow foreign characters? I don't see how these
would be dangerous (am I missing something here?).
Mar 23 '07 #1
3 2078
Hi Gerhard,

From your description, you're getting some validation error when post some
foreign characters through ASP.NET page(with validateRequest turn on )
,correct?

According to the characters you provided, I have performed some test in my
local environment and seems faild to repro the exact behavior. Here is the
test I performed:

** create ASP.NET 2.0 web site application, request/response charset is
UTF-8

** create a very simple ASP.NET 2.0 page with "validateRequest" turn on in
@page directive

** when run the page, input those problem characters you mentioend and
submit the page, no error raised.

Are you also using input text element to submit such text/characters? Or is
there any other invisible characters that could be embeded in the submit
string or whether the request/response page charset is UTF-8 also?

Anyway, please feel free to let me know if there is anything I missed or if
you have any other finding on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

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

Mar 26 '07 #2
To duplicate it, you would need to put a text box inside a FormView. Below
is a snippet of code, where the foreign characters were in the LastName field
that was returned:

<asp:FormView ID="FormView2" runat="server"
DataKeyNames="SearchSubjectID" DataSourceID="SqlDataSourceEdit">
<ItemTemplate>
<asp:table id="tblEdit" CellSpacing="0" CellPadding="5" runat="server"
CssClass="Input">
<asp:TableRow ID="trLastName">
<asp:TableCell>
<asp:TextBox Runat="server" ID="LastName" Text='<%# Bind("LastName")
%>'></asp:TextBox>
</asp:TableCell>
</asp:TableRow>
</asp:table>
</ItemTemplate>
<RowStyle CssClass="input" />
<EditRowStyle CssClass="input" />
</asp:FormView>
"Steven Cheng[MSFT]" wrote:
Hi Gerhard,

From your description, you're getting some validation error when post some
foreign characters through ASP.NET page(with validateRequest turn on )
,correct?

According to the characters you provided, I have performed some test in my
local environment and seems faild to repro the exact behavior. Here is the
test I performed:

** create ASP.NET 2.0 web site application, request/response charset is
UTF-8

** create a very simple ASP.NET 2.0 page with "validateRequest" turn on in
@page directive

** when run the page, input those problem characters you mentioend and
submit the page, no error raised.

Are you also using input text element to submit such text/characters? Or is
there any other invisible characters that could be embeded in the submit
string or whether the request/response page charset is UTF-8 also?

Anyway, please feel free to let me know if there is anything I missed or if
you have any other finding on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

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

Mar 28 '07 #3
Thanks for your reply Gerhard,

According to your further description, I have used a page that contains
FormView and nested Table to hold the TextBox (in ItemTemplate). However,
it seems those problem characters can still be correctly submit to server
without any validate exception. I've put those characters in database and
bind them through <% # %expression. BTW, are you getting the exception
when you try submit/postback the page?

If possible, can you send me a simplified page (has hardcode characters in
aspx template) that can repro the issue? I'll help perform some further
test on my side.

If there is any other finding on this, please feel free to post here also.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 28 '07 #4

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

Similar topics

4
by: Toffe | last post by:
Hi, I've got a problem with regular expressions and strings containing Swedish characters (åäö). I basically have a PHP script that highlights certain words in a text. I found the code...
13
by: Xah Lee | last post by:
the Journey of Foreign Characters thru Internet Xah Lee, 20051101 There's a bunch of confusions about the display of non-ascii characters such as the bullet "•". These confusions are...
1
by: Benny | last post by:
Hello Experts, If the contents of a text box containing a html tag like formmated characters, i.e. <hello>, and if the validateRequest is set to true, it gives an error when post back: A...
4
by: Ray Williams | last post by:
I have a specific page that I have chosen to disable the .NET 1.1 validateRequest options by setting the page directive attribute of "validateRequest" from true to false. I manually validate all...
2
by: AFN | last post by:
I have a form with 15 fields. I want users to be able to enter "<" and ">" characters into 1 of those fields without IIS catching it and disallowing the whole page. I did some reading and I...
8
by: Max Metral | last post by:
Ok, I have a global page class derived from System.Web.UI.Page, let's call it BasePage. I have another class derived from that called MemberPage. It checks the Form collection if it's a post for...
2
by: Andy Fish | last post by:
Hi, I have one textbox on the form that needs to have ValidateRequest disabled, but it seems that it can only be enabled/disabled at a page level. assuming I have to disable it at for the...
2
by: \A_Michigan_User\ | last post by:
*WITHOUT* using: ValidateRequest="False" for the whole page (or my whole site).... How would I trap/detect that a textBox contains some illegal characters? (I'm using asp.net v1.1 and vb.net)...
0
by: \A_Michigan_User\ | last post by:
I guess I'm not understanding this correctly. I have to set "ValidateRequest=False" for my asp.net 1.1 page that has a TextBox... so that I can avoid an error... if some user enters some html or...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.