Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 在Azure Web应用程序服务上,有时会获取字符࿽;(#65533),但随后情况又恢复正常,它们';我们是同一页_.net_Azure_Azure Web App Service - Fatal编程技术网

.net 在Azure Web应用程序服务上,有时会获取字符࿽;(#65533),但随后情况又恢复正常,它们';我们是同一页

.net 在Azure Web应用程序服务上,有时会获取字符࿽;(#65533),但随后情况又恢复正常,它们';我们是同一页,.net,azure,azure-web-app-service,.net,Azure,Azure Web App Service,问题: 在Azure Web应用程序服务上,有时获取角色�(#65533),但随后一切恢复正常,它们是相同的页面,在本地iis服务器下是正常的 性格�(#65533)版本: 正常版本: ...這兩種假物件... 环境: Web.Config: 服务器:Microsoft IIS/10.0、Asp.NET 4.5.2 框架:BlogEngine.NET 我的问题: 是Azure问题还是某个Azure设置?我认为这与实现有关。在中,它将WebResourceFilter配置为context.R

问题: 在Azure Web应用程序服务上,有时获取角色�(#65533),但随后一切恢复正常,它们是相同的页面,在本地iis服务器下是正常的

性格�(#65533)版本:

正常版本:

...這兩種假物件...

环境: Web.Config:

服务器:Microsoft IIS/10.0、Asp.NET 4.5.2

框架:BlogEngine.NET

我的问题: 是Azure问题还是某个Azure设置?

我认为这与实现有关。在中,它将
WebResourceFilter
配置为
context.Response.Filter
。这是这个问题的根本原因

你可以检查文件。该方法确实存在问题:

public override void Write(byte[] buffer, int offset, int count)
{
    // collect all HTML in local variable
    var html = Encoding.UTF8.GetString(buffer, offset, count);
    HtmlOut += html;
}
缓冲区大小不能保证。如果缓冲区在UTF-8字符的中间分裂(UTF-8中的汉字是多字节)。不可能在UTF8中获得正确的字符串。所以你会得到你提到的混乱的角色

这里还有一个确切的问题:

public override void Write(byte[] buffer, int offset, int count)
{
    // collect all HTML in local variable
    var html = Encoding.UTF8.GetString(buffer, offset, count);
    HtmlOut += html;
}