Archive for January, 2008

       You may receive this error when you write a code that allows user to download a file instead of opening it in IE other browser. In my code I have to show Open/Save dialog for PDF file. I wrote the following code.

   1: Response.Clear();
   2: Response.Buffer = true;
   3: Response.ContentType = "application/pdf";
   4: Response.Cache.SetCacheability(HttpCacheability.NoCache);
   5: Response.AddHeader("content-disposition", "attachment;filename=test.pdf");
   6: Response.Charset = "";
   7: Response.BinaryWrite(bytContent);
   8: Response.End();


         When I ran the code I was getting error as “Internet explorer was not able to open the Internet site. The requested site is either unavailable or can not be found.Please try again later.”

          To solve this error I just removed line 4 “SetCacheability” and everything works fine. After that I search on net to find the reason and I found really good article here.

          While surfing I found another approach to achieve this an I found it better that I used here. Rick Astral has shown that approach here.


Happy Programming !!


Read Full Post »

   Recently I need to generate restore point on my Windows Server 2003 Statndard Edition. For windows XP restore point is available at Start -> Program Files -> Accessories -> System Tools – > System restore. I looked in Windows Server 2003 and it was not there. I search on google and found a really good link that shows the way how to install restore point on Windows Server 20003. Here is that.

Read Full Post »