CSh*_*ped 5 asp.net-mvc azure http2 push-promise azure-web-app-service
您好,我有下面一段为 Http2.0 客户端启用 PushPromise 的代码。
public static IHtmlString StyleSheet(this HtmlHelper htmlHelper, string contentPath)
{
UrlHelper urlHelper = new UrlHelper(htmlHelper.ViewContext.RequestContext);
htmlHelper.ViewContext.RequestContext.HttpContext.Response.PushPromise(contentPath);
TagBuilder linkTagBuilder = new TagBuilder("link");
linkTagBuilder.Attributes.Add("rel", "stylesheet");
linkTagBuilder.Attributes.Add("href", urlHelper.Content(contentPath));
return new HtmlString(linkTagBuilder.ToString());
}
Run Code Online (Sandbox Code Playgroud)
直到上周五,这一切都工作正常,之后我开始出现“访问被拒绝异常”。
我们在 Azure 应用服务上托管我们的网站已经一年多了!
关于为什么一年后失败的任何想法吗?
归档时间: |
|
查看次数: |
191 次 |
最近记录: |