C# – How to set IIS website’s default encoding

asp-classicasp.netcencodingiis

My website is a combination of classic ASP and ASP.NET

My pages' default encoding is currently ISO-8859-1.

Even if there's no <meta> tag, the response page will be encoded ISO-8859-1.

How to change it to UTF-8?

Best Answer

The content encoding is set in the Machine.config file when the .NET Framework is installed. You can edit this file which will affect the response encoding of all ASP.NET sites, or you can override it on a per-site basis using the <globalization> element in each site's Web.config file.

MSDN Link