Still getting the error - Unable to download. Unable to open this internet site

StackOverflow https://stackoverflow.com/questions/19105922

  •  29-06-2022
  •  | 
  •  

سؤال

I am trying to download an Excel file from my intranet site on the client machine (IE8) and i get the following error- Unable to download. Unable to open this internet site. The requested site id eitherunavailable or cannot be found. Please try again later.

One of the best links i have found to resolve the issue is - IE : Unable to download * from *. Unable to open this Internet site. The requested site is either unavailable or cannot be found

I have tired almost everything here -here's a snippent of my code

 protected void Page_PreInit(object sender, EventArgs e)
 {
     HttpContext.Current.Response.ClearHeaders();

     switch (Users.Current.UserId)
     {
         case 17:
         case 73:
           HttpContext.Current.Response.AddHeader("Cache-Control", "no-cache");
           break;
        case 80:
           HttpContext.Current.Response.AddHeader("Cache-Control", "private");
           HttpContext.Current.Response.AddHeader("Pragma", "token");
            break;
        case 76:
            HttpContext.Current.Response.AddHeader("Cache-Control", "private");
            break;
        case 88:
            HttpContext.Current.Response.AddHeader("Cache-Control", "no-store");
            HttpContext.Current.Response.AddHeader("Pragma", "token");
            break;
        default:
            HttpContext.Current.Response.AddHeader("Pragma", "no-cache");
            break;
      }
 }

None of the combinations seem to work. Is there anything that i need to add after the headers are defined ?

P.S. I cannot mess with the registry or switch the browser as it on the client machine.

هل كانت مفيدة؟

المحلول

HttpContext.Current.Response.AddHeader("Pragma", "token");

-Adding this to the code resolved my issue.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top