Forum Discussion
ERR_CACHE_MISS error
I have Sharepoint 2019 with Kerberos enabled.
On project detail page I add my custom web part which redirect to Power BI report (with Kerberos).
To:
https://myreport.mydomain/Reportserver?/report1&ProjUid=aaaaea84-3862-ec11-82f3-005056b4315a
If I come to PDP page with click on it, all work fine - I can press Back from Power BI, and I return to Sharepoint PDP. BUT - If I navigate to PDP page from /PWA/Projects.aspx second time, I have error ERR_CACHE_MISS if I click Back in redirected Power BI report.
What can I do to prevent this error?
My code is:
public partial class DynTilesWPUserControl : UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
string ProjUid = string.Empty;
try { ProjUid = Request.QueryString["ProjUid"].ToString(); } catch { }
ImageButton img = new ImageButton();
string redirect = string.Empty;
img.ID = "imgb1";
img.ImageUrl = "../../_layouts/15/Images/DYN_TILES/report01.png";
string reportBaseURL = @"https://myreport.mydomain/Reportserver?";
redirect = reportBaseURL + "/report&ProjUid=" + ProjUid;
img.Click += new ImageClickEventHandler((a, b) => Img_Click(a, b, redirect));
pnlMain.Controls.Add(img);
}
private void Img_Click(object sender, ImageClickEventArgs e, string redirect)
{
SPSecurity.RunWithElevatedPrivileges(delegate
{
Response.Redirect(redirect, false);
});
}
Plus some addition:
If I open PDP by click on it the address is (all lower case):
But if I open this page second time from /PWA/Projects.aspx
the address is:
I found solution for this problem, BUT is it sharepoint 2019 bug?
THE SOLUTION:)
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (HttpContext.Current.Request.Url.ToString()!= HttpContext.Current.Request.Url.ToString().ToLower())
{
Response.Redirect(HttpContext.Current.Request.Url.ToString().ToLower(),false);
}
}
- Vasily_ZaytsevIron Contributor
I found solution for this problem, BUT is it sharepoint 2019 bug?
THE SOLUTION:)
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (HttpContext.Current.Request.Url.ToString()!= HttpContext.Current.Request.Url.ToString().ToLower())
{
Response.Redirect(HttpContext.Current.Request.Url.ToString().ToLower(),false);
}
}