C#Ashx谷歌xml站点地图生成错误

我正在使用ashx为Google提供我的网站站点地图。直到最近我才完美地工作。 在http://www.naughtyfancydress.com/sitemap.ashx上请求Google中的站点地图时,我得到:     XML解析错误:格式不正确     地点:http://naughtyfancydress.com/sitemap.ashx     第1行,第1列:`I %& /m {J 我在ashx中删除的代码如下:
context.Response.ClearHeaders();
context.Response.ClearContent();
context.Response.ContentType = "text/xml";
context.Response.ContentEncoding = Encoding.UTF8;
context.Response.Cache.SetExpires(DateTime.Now.AddSeconds(3600));
context.Response.Cache.SetCacheability(HttpCacheability.Public);

var writer = new XmlTextWriter(context.Response.OutputStream, Encoding.UTF8);
writer.Formatting = Formatting.Indented;

writer.WriteStartDocument();
writer.WriteStartElement("urlset");
writer.WriteAttributeString("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
writer.WriteAttributeString("xsi:schemaLocation", "http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd");
writer.WriteAttributeString("xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9");

writer.WriteStartElement("url");
writer.WriteElementString("loc", "http://www.naughtyfancydress.com/");
writer.WriteElementString("changefreq", "daily");
writer.WriteElementString("priority", "1.0");
writer.WriteEndElement();

writer.WriteEndElement();
writer.WriteEndDocument();
writer.Flush();
writer.Close();
任何关于如何解决的想法都会受到欢迎。 编辑:如果你检查Chrome上面的链接没有显示任何内容,我相信这是一个Chrome问题,请检查与FireFox的链接。     
已邀请:
对于其他任何人来说,问题是在Global.asax中,在Application_PreRequestHandlerExecute方法中,我的内容是gzip。 这显然将内容编码从utf-8更改为gzip,即使它已在上面指定。这是修复,确保站点地图处理程序不发送内容为gzip。     

要回复问题请先登录注册