.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Error: Internet Explorer Cannot Download FileName from WebServer

Posted By:      Posted Date: September 11, 2010    Points: 0   Category :.NET Framework
I am trying to display documents (.Doc / .PDF) through my web page.The code works fine in FireFox, but gives an error message on IE 6.0 / 7.0 / 8.0 Context.Response.Buffer = true;Context.Response.Clear();Context.Response.BufferOutput = false;Context.Response.ContentType = File.GetContentType(File.FileName);Response.AppendHeader("Pragma", "public");Response.AppendHeader("Cache-Control", "max-age=0");Response.Charset = "";Context.Response.AddHeader("content-length", File.FileData.Length.ToString());Context.Response.AddHeader("content-disposition", File.GetContentDisposistion(File.FileName)); Context.Response.BinaryWrite(imageFileBase.FileData);Context.Response.Flush();Context.Response.End();

View Complete Post

More Related Resource Links

Javascript Error in Internet Explorer but works fine in Firefox

Hi All,i was working on one of the project as it is working fine in Firefox but it is giving the javascript exception in internet explorer.Errror:  Error says  "s" is undefined in the s.currencyCode="USD" line but "s" is defined in the external javascript file  s_code.jsCan anyone suggest the solution for this issue:Please find my code where the error is displayed <script type="text/javascript" language="JavaScript" >var s_account="mnsdev"</script><script type="text/javascript" language="JavaScript" src="http://media.world.com/ads/usen/rpt/Omniture/s_code.js"></script><script type="text/javascript" language="JavaScript" >s.currencyCode="USD"s.charSet="ISO-8859-1"s.SEMct = s.getQueryParam('s_kwcid');s.SEMct = s.getValOnce(s.SEMct,'SEM_ct',0);s.clickPast(s.SEMct,'event9','event10');s.SEMvar=s.getQueryParam('s_kwcid');s.SEMdate=new Date;s.SEMdate.setTime(s.SEMdate.getTime()+60*86400000)if(s.SEMvar){s.c_w('SEM_ck','1',s.SEMdate)}s.SEMchk=s.c_r('SEM_ck');if(s.SEMchk&&s.events)s.SEMok='ok';if(s.SEMvar||s.SEMok) s.t()

Silverlight gives the error "Internet Explorer cannot display the webpage"

Hello, I'm new to SharePoint 2010.  I have an SP2010 environment up and running.  When I click on a link that activates Silverlight, I get an error that reads "Internet Explorer cannot display the webpage".  The Server is on a different domain. When I use remote desktop to access the server, I can open up the same link using IE and I can see the content no problem. An example would be from the calendar page.  If I choose a date and select 'add', the browser fades and I see a 'loading' screen.  Then the next screen I get the error.  If I follow the same process on the server using remote desktop, everything works. What could the problem be?

"Internet Explorer cannot display the webpage" from IE7 - ASP.NET Development Server Error?

Dear everybody, I've just installed Microsoft Visual Studio 2008 on Windows Vista Ultimate. I created "New Web Site" and Started Debugging the page to see the blank page rendered. To my surprise, IE 7.0 displayed an error message saying: "Internet Explorer cannot display the webpage". I spent some time investigating and here is the result: The page going to be rendered assumes port 49791: http://localhost:49791/WebSite3/Default.aspx The ASP.NET Development Server operates under different port no: 49793 After changing the url above manually to use the port of ASP.NET Development Server, the webpage gets renderred correctly: http://localhost:49793/WebSite3/Default.aspx ASP.NET Development Server uses dynamic ports. I noticed that Debugging process always assumes port number lower by 2 than the real port number of the ASP.NET DevSer. Therefore Debug process never runs and displays the page. I do not want to manually edit the local host URL after every page rebuild, so my question is following: How to make the "Start Debugging" function to use appropriate port of the ASP.NET Development server? How to make Visual Studio to open the page being debugged? To mention couple of things I tried: I reinstalled Visual Studio2008, tried to disabled IPv6 as some threads recommen

Cannot tart download in Internet Explorer 7


Hi all,

I have used below code to start downloading file file from my site. This code works fine in every browser ( IE8, IE9, Firefox, Chrome, Safari ) except

Internet Explorer 7.

Here is the code.


                    Response.AppendHeader("Content-Disposition", "inline;attachment; filename=\"" + emailAttachment.FileName + "\";");
                    Response.AddHeader("Content-Length", emailAttachment.FileName.Length.ToString());
                    Response.ContentType = "application/octet-stream";
                    Response.BufferOutput = true;
                    Response.OutputStream.Write(emailAttachment.Data, 0, emailAttachment.Data.Length);

So anyone please review the code and help me out of this.

NOTE : It's not working in IE7 only.

Thanks a lot


Internet Explorer 8: New Features To Slice, Store, And Accelerate Your Web Applications


Internet Explorer 8 sports some exciting new features including Web Slices, Accelerators, and search suggestions along with AJAX navigation and DOM storage.

Daron Yöndem

MSDN Magazine March 2009

The ASP Column: Using the Internet Explorer WebControls


During the lifespan of ASP, there have been many technologies developed for making browser-based user interface development easier. For example, during the early days of classic ASP development, keeping a browser-based UI consistent required many conditional statements into the ASP script.

George Shepherd

MSDN Magazine February 2003

DHTML and .NET: Host Secure, Lightweight Client-Side Controls in Microsoft Internet Explorer


In the past, Web developers often used ActiveX controls if they wanted customized client-side functionality incorporated into their Web applications. Now, they can build objects supported by the Microsoft .NET Framework which are more compact, lightweight, secure, and seamlessly integrated. By hosting .NET Windows Forms controls in Internet Explorer, developers can realize many of their client-side Web development goals. This article adapts ActiveX concepts for use with Windows Forms, and builds a multifile upload application that demonstrates these techniques.

Jay Allen

MSDN Magazine January 2002

Graphics: Manipulate Digital Images in Internet Explorer with the DirectX Transform SDK


The Microsoft DirectX Transform is a Microsoft DirectX media API that can be used to create animated effects as well as to create and edit digital images for Windows-based applications. Scripting and HTML can be used to display an existing transform on a Web page, and improved transform support in Microsoft Internet Explorer 5.5 makes it easy to use transforms. This article provides step-by-step instructions for writing a transform as an ATL project and shows an example of an image transform. C++ is used to instantiate, configure, and display transforms in this project.

Alex Lerner

MSDN Magazine March 2001

Digital Dashboards: Web Parts Integrate with Internet Explorer and Outlook to Build Personal Portals


Digital dashboards gather information and functionalities from a wide variety of sources ranging from Web pages to applications such as Microsoft Outlook and SQL Server, and present the resulting information in a single user interface. Digital dashboards built with the Digital Dashboard Resource Kit (DDRK) are made up of distinct units called Web Parts. Web Parts, introduced with the DDRK 2.01, can contain any Web-based information, are reusable, and integrate with each other and with other dashboards. Creating Web Parts and getting them to work together is illustrated via a sample application that uses a PivotTable view. Integrating Web Parts with Outlook, the Outlook View control, storage, and debugging are also covered.

Maarten Mullender

MSDN Magazine January 2001

Error in Crystal report while running at webserver



I need ur help its urgent i got a problem while running crystal report at web server.On local host its work fine bt on web server it gives error in web config file(assembly error).Please reslove it.

I m sending u the snapshot of error.

Code of server side script:-

 protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)
            SqlConnection con = new SqlConnection(Session["MyDb"].ToString());

How to overcome .net download error during setup

Hello All,We have a .NET 3.5 SP1 WPF application that we deploy to our costumers using a setup and deployment project in Visual Studio.In order to make things easier to our costumers, we provide in a specifc URL path for the setup.exe file and the .msi file.As the .net 3.5 is a prerequisite for the app to run, the setup.exe properly detects when it is missing form the costumer PC and ask to start the instalation.This works fine for most of our costumer, but, for some of them, the download fails with the following message:An error occurred downloading the following resource:http://go.microsoft.com/fwlink/?LinkId=37283 (something similar to this path).I suspect that some costumer have firewalls or anti-virus programs that block file download trought a non autorized program.Most of our costumer have dificulties to install the application and they actually don´t know anything about internet security or deployment process, so they expect the installtion to be an easy process.I would like top hear from you could be really causing this and how do you suggest to workaround this issue, so the user don't have to bother about prerequisites instalation.Kindly Regards,Igor.Project Manager at INOVATIVA Tecnologia www.inovativatec.com

10 MB File Download In ASP.NET Socket Error

Hi,I received the following error message, when downloading file of 10 MB. Please let me know the solution. I already configured the httpRuntime value to <httpRuntime maxRequestLength="10250 " executionTimeout="1000". Still I am getting the error message.The description for Event ID ( 0 ) in Source (XXXXX) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Unable to read data from the transport connection: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full. Source: mscorlib TargetSite: Void HandleReturnMessage(System.Runtime.Remoting.FileUploading.IFileUpload, System.Runtime.Remoting.FileUploading.IFileUpload) StackTrace: Server stack trace:    at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)   at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)   at System.IO.BinaryReader.ReadBytes(Int32 count)   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadArrayAsBytes(ParseRecord pr)   at System.Runtime.Seri

Error code 737D-Trying to download update

My computer is recommending that I download this: Security Update for SQL Server 2005 Service Pack 3 (KB970892) But it tells me this: Installation status: Failed Error details: Code 737D Update type: Important A security issue has been identified in the SQL Server 2005 Service Pack 3 that could allow an attacker to compromise your system and gain control over it. You can help protect your computer by installing this update from Microsoft. After you install this item, you may have to restart your computer. System: Windows Vista Home Premium Service Pack 2 HP Pavilion dv6700 notebook PC 32-bit Operating System Any ideas???  

CSS font is working in FireFox but not in Internet Explorer 8.0

Hi All, I tried a lot but I could not figure out why the IE is not taking font size and name in to effect from CSS. In firefox my website could be seen very nice but in IE it is little bit unshiny and font size is bigger For the difference which I am talking about could be seen  if your PC have both firefox and IE installed. Please go to http://www.nymidtowndentistry.com open it in FF and IE and you could see the font and alignment related change. All these settings are in body element of CSS. Do you any idea regarding this? Any help would be appreciated. Thanks for your time. -Hitesh  
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend