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

Server 2003 SP1 introduced "enableBestFitResponseEncoding" setting

Hello,

SP1 of Windows Server introduced a new "feature" in the GlobalizationConfig
class
called EnableBestFitResponseEncoding.

Effect is that when you set anything other than UTF8 in web.config, e.g.
<globalization requestEncoding="iso-8859-1" responseEncoding="iso-8859-1" />,
many functions will break (including HttpUtility.URLDecode) with a
MethodNotImplementedExecption in the new internal class
CodePageNoBestFitEncoding.

Analyzing with the reflector reveals, that new code was added to the
HttpResponse.ContentEncoding property:

if (!this._encoding.Equals(Encoding.UTF8))
{
string text1 = this._encoding.GetType().FullName;
if ((config1 == null) ||
!config1.EnableBestFitResponseEncoding)
{
if (text1 ==
"System.Text.MLangCodePageEncoding")
{
this._encoding =
Encoding.GetEncoding("mlang");
}
else if ((text1 ==
"System.Text.CodePageEncoding") || (text1 == "System.Text.Latin1Encoding"))
{
int num1 = this._encoding.CodePage;
this._encoding = new
CodePageNoBestFitEncoding(num1);
}
}

Assuming that EnableBestFitResponseEncoding is false by default, this property
will return a new instance of CodePageNoBestFitEncoding when you set a
responseEncoding="iso-8859-1" in web.config.

Many of the normal Encoding methods in CodePageNoBestFitEncoding will throw
the MethodNotImplemented exception which explains the above mentioned
bahavior.
Some additional analysis reveals that there is a new attribute for
<globalization > called "enableBestFitResponseEncoding". After setting this
attribute
to "true", everthing works again as normal with a responseEncoding other than
UTF8.
I did not find any documentation about this new attribute.
Can anyone give us some hints ?

Best Regards,
Torsten Sturm
hotel.de AG


Nov 19 '05 #1
0 1160

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

Similar topics

6
by: Jim | last post by:
I've just bought a new Windows Server 2003 and I am trying to move an exiting FrontPage website to this new machine. I can't get ASP pages to run. IIS 6.0 has been installed. From the snap-in,...
2
by: Christopher W. Douglas | last post by:
I have an MSDN subscription, and have all versions of Windows Server 2003 available. I have been programming in Visual Studio .NET 2002 in Windows XP and 2000, and I am setting up a new machine...
2
by: FrodoBaggins | last post by:
Dear Team, I am running Visual Studio 2003 Version 7.1.3088 on Windows Server 2003. I have written a C# application that must write to the event log. When it attempts to write to the event log,...
1
by: robertst | last post by:
I have an asp page that looks like the following (simplified): <HTML> <HEAD></HEAD> <BODY onLoad="javascript:document.frmSub.submit();"> <FORM NAME="frmSub" action="http://www.microsoft.com"...
9
by: Kevin Spencer | last post by:
We just moved an ASP.Net app to a Windows 2003 Server, and the SMTPMail fails now with the following message: System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr,...
4
by: Matthew Louden | last post by:
My ASP.NET application is working fine when I run under IIS Personal Web Server in Windows 2000 machine. However, after I upload all the files to the Windows Server 2003 machine, and tried to run...
1
by: Pedro Alves | last post by:
Hi, When executing our application ASP.NET in the Windows Server 2003 is being returned the following error: Exception Details: System.UnauthorizedAccessException: Access to the path...
4
by: Amil Hanish | last post by:
Don't reply to this unless you know what you are talking about. Installed brand spanking new 2003 Server. Configured to be application server. Then installed Visual Studio .NET. Copied over...
2
by: Marty | last post by:
Something strange is happening on my web site since my hosting provider upgraded to Server 2003 a few weeks ago. I use forms authentication in my asp.net application, with essentially the...
2
by: Dabulsta | last post by:
I am trying to design a network using Windows Server 2003 Active Directory infrastructure for the following company(below) and I was wondering if there was some sort of walk through available to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.