5

HI I have the below piece of code for Enabling PushPromise for Http2.0 clients.

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());
}

This was all working fine till last friday, after which i started getting Access Denied Exception.

We have hosted our site on Azure App service for more than a year now!!

enter image description here

Any ideas as to why this failed after an year?

Muhammed Shevil KP
  • 1,404
  • 1
  • 16
  • 21
CSharped
  • 1,247
  • 4
  • 20
  • 49

0 Answers0