Stream File To Chome Broken, Firefox Working?
Jan 22, 2011
I wrote an ASP.Net web page that will take a QueryString and stream a file to the client. The file is stored in a SQL Server database. Everything works great when I'm running the web site locally during development. When I run it in production from the server I can get a file through Firefox, but not Chrome. In Chrome I get Error 100 (net::ERR_CONNECTION_CLOSED): Unknown error.See some other posts that mention this could be related to Content-Length, however, I can't understand why this would work in development and not production. For that reason I think there must be something else going on here.Here is my code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim Data_ID As String = Request.QueryString("Data_ID")
Using dt As New Enterprise_Error_Log.Field_FileDataTable
[code]...
View 1 Replies
Similar Messages:
Feb 22, 2010
When user requests to download a document, I'm writing out a PDF file to HttpResponse using HttpResponse.OutputStream.Write method. It works in every browser except Firefox(3.5.8). In Firefox it sometimes displays the file and sometimes it displays the actual byte stream. When it displays a byte stream, http response is never finished. I see 'transferring data' status and the byte stream ends with EOF. After some time, I get 'connection was reset' window.
Here is response header:
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 103185
Content-Type: application/pdf
Expires: -1
Server: Microsoft-IIS/7.0
X-AspNet-Version: 2.0.50727
Content-Description: stuff.pdf
Content-Disposition: inline;filename="stuff.pdf"
X-Powered-By: ASP.NET
Date: Mon, 22 Feb 2010 16:15:38 GMT
View 5 Replies
Oct 4, 2010
I'm struggling with ASP .NET Validators JavaScript issue. Following function (part of framework generated code) tries to access validatioGroup attribute value using control.Field syntax. It works fine in IE, however in FF that value is always undefined. Consequently, validation always passes and my validation scenario is broken... Is there a way to get round it?
function IsValidationGroupMatch(control, validationGroup) {
if ((typeof(validationGroup) == "undefined") || (validationGroup == null)) {
return true;
}
var controlGroup = "";
if (typeof(control.validationGroup) == "string") {
controlGroup = control.validationGroup;
}
return (controlGroup == validationGroup);
}
View 1 Replies
Aug 28, 2010
If Not IsDBNull(ext) Then
ext = LCase(ext)
End If
Select Case ext
'Case ".htm", ".html"
' type = "text/HTML"
'Case ".txt"
' type = "text/plain"
'Case ".doc", ".rtf"
' type = "Application/msword"
'Case ".csv", ".xls"
' type = "Application/x-msexcel"........................
View 5 Replies
Feb 22, 2011
I have an excel file in my Response Output stream. I can Open the stream as a file after a prompt, but it doesn't seem I can save it directly to a specified folder on my client.
View 1 Replies
Feb 15, 2011
I need to to export a file to the user. It takes 1-2 min to generate the file so I'd like to have the page go into a kind-of modal mode with a layover on the page and a 'Working' spinner showing. The problem is I can't make the modal stuff go away after Save File dialog is closed.
How can I remove the layover after the dialog is done?
View 1 Replies
Feb 23, 2011
i am using treeview controls... but its showing broken lines and also line not well aligned.. on expanding and also on loading...
i did replaced...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" > with
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
but not working..here is my treeview code
[Code]....and here is screenshot of treeview
View 7 Replies
Mar 18, 2011
I have in my asp.net page
<input id="MyTextBox" runat="server" type="text" name="T1" size="20"/>
<asp:Button ID="UploadFileButton" runat="server" Text="Upload" />
<input id="FileUpload" runat="server" type="file" style="height: 22px; visibility:hidden;" />
linked to js script:
$("#UploadFileButton").live("click", function(event) {
event.preventDefault();
$("#FileUpload").click();
});
$(function() {
$('#FileUpload').change(function() {
$("#MyTextBox").val($(this).val());
});
});
this means when the user click UploadFileButton ,the chose file select popup shows.After the user chose a file the MyTextBox=Selct file path.
My problem is that my script works in Chrome but not in firefox.
View 3 Replies
Jul 19, 2010
i will be passing the xml file like this:
[code]....
error:
Error 1 The best overloaded method match for 'System.Xml.Linq.XDocument.Load(string)' has some invalid arguments
cannot convert from 'System.IO.Stream' to 'string'
View 2 Replies
Aug 13, 2010
I created a one Java script calender. Its working fine in ie6 but its not working in firefox. I'm new to this java script so kindly give your suggestion as soon as possible.
Page
Language="C#"
AutoEventWireup="true"
CodeFile="Default.aspx.cs"
Inherits="_Default" %>@
Register
Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI"
TagPrefix="asp" %>
DOCTYPE
html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN".......................
View 1 Replies
Nov 19, 2010
After the implementation of ajax drag and drop, we have observed that which is working fine in IE and Firefox and not in chrome and safari, In Google chrome and Safari when we try to drag a module, the page getting scrolling to the top of the page.
View 1 Replies
Jan 15, 2011
I am using vs2008 pro. my problem is that javascript debugger is not working on mozila firefox but working fine on IE8.
View 1 Replies
Feb 9, 2011
I have a problem with partial postback in FireFox
in my index.aspx I have following code:
[Code]....
Finally my Partialview has following content:
[Code]....
This code is working fine when using IE or Google Chrome, but when using FireFox the code in my controller is never reached.
View 1 Replies
Dec 6, 2010
On our site, I use the category (in Russian) in the querystring. E.g.: [URL] (I notice the link is not clickable here, you need to copy the entire link to view the result) If you paste this link in IE8, it is translated to cat=???? and it does not work If I paste it in FireFox, it works. It gets even more weird: the same URL is reachable from the homepage, and if I click the same URL in IE8 from the homepage it works fine (unless I click open in a new tab, that it is back to ????). I am using ASP.NET 3.5(C#)
View 1 Replies
Jan 27, 2010
I'm trying to get my site to play a flash video the first time, and only the first time, a user visits the site. Currently, I'm using ASP session tags to install a sessionid cookie into the users browsers.
<% Session("name")="blah"
Session.Timeout=7
%>
This method works fine in FF and Chrome, but IE8 doesn't seem to want to accept the cookie. I've tested it with IE's lowest security settings possible ("Accept all cookies"), but it still does not create any cookie. Is there any other way to make it so that all browsers will take the cookie?
View 1 Replies
Dec 20, 2010
Assume we have the access to sth.avi on [URL] with a direct link.
e.g : [URL] Also we have a website => www.dl2.com.
Now, we wanna let some users to download sth.avi from [URL], but we don't have enough space on [URL] to save sth.avi. Is it possible in ASP.NET for us to read sth.avi from www.dl.com as streaming file and share it without saving the file on our domain.
P.S: I don't wanna share this link [URL], actually I wanna share something like this link [URL]
View 3 Replies
Aug 29, 2010
I have made a WCF web service that streams a 200 mb zip file. how i can read this stream at my client and then give option to the user to download that
View 1 Replies
Feb 15, 2010
I have a DataTable that i want to convert it to xml and then zip it, using DotNetZip. finally user can download it via Asp.Net webpage.
My code in below
dt.TableName = "Declaration";
MemoryStream stream = new MemoryStream();
dt.WriteXml(stream);
ZipFile zipFile = new ZipFile();
zipFile.AddEntry("Report.xml", "", stream);
Response.ClearContent();
Response.ClearHeaders();
Response.AppendHeader("content-disposition", "attachment; filename=Report.zip");
zipFile.Save(Response.OutputStream);
//Response.Write(zipstream);
zipFile.Dispose();
the xml file in zip file is empty.
View 6 Replies
Mar 16, 2010
I have a url that points directly to a wav file. Id like to extract the file from the url and save it to a file on our file system.
View 2 Replies
Mar 19, 2011
I am trying to filestream to my hosting Companies sever.I have tried the below expecting it would not work. How can I find the correct path.Could not find a part of the path 'C:ERAPDFERA202.60.64.136.1.pdf'.
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:ERAPDFERA202.60.64.136.1.pdf'.
Source Error:
[Code]....
View 2 Replies
Sep 23, 2010
I changed an app so one of the edit screens opens as a pop-up window via showModalDialog. Previously everything was done in the same window and more back and forth navigation was required. The pop-up provides greater continuity. Unfortunately, as a pop-up, files will not stream to the desktop. If I bring up the page by entering a URL on the address line, so it is not a pop-up, files stream to the desktop OK.
Streaming a file to the desktop is done as follows:
[Code]....
This causes an open/save/cancel dialog to appear in the browser. Does anyone have an idea why a file cannot be streamed to a pop-up window? To get pop-ups to work I always include
[Code]....
in the header. That way I can open other pop-ups such as warnings and database error messages from a prvious pop-up.
View 1 Replies
Jul 28, 2010
I don't think there is a way around this but figured I'd ask... We have an application where a user can generate PDF documents that are streamed to the browser. There is some additional functionality going on behind the scene and I would like to be able to display a message to the user (via updating a literal tag on the page). I don't get any errors when doing this but the page isn't updated and the message isn't displayed. My guess is that streaming the document blocks any other content from going down to the client. In particular, we're using CeTe Dynamic PDF and calling one of their methods but I think it's essentially just doing a Response.BinaryWrite to stream out the PDF.
View 6 Replies
Aug 31, 2010
I have a wcf service that is used to download files. Its working alright (finally), but i can see that when it downloads the CPU usage goes around 75%.Client Code
FileTransferServiceClient obj = new FileTransferServiceClient();
Byte[] buffer = new Byte[16 * 1024];
CoverScanZipRequest req = new CoverScanZipRequest(
[code]...
View 1 Replies
Oct 8, 2010
I have a third party CMS system that can create forms but can't manage true File upload capabities. I am able to get users brows for thier file and have the value submited to my custom .net code behind page for processing. So I end up with like "C:somefilefoldersomefile.doc".
But on my processing page I want to read this file (like the file uploader) and save it to a location. I tried using the file uploader control (but have it not visible) but realized I can't preset it as I was planning to set it and do the normal processing from there. Is there another way to do this?
View 3 Replies
Jun 22, 2010
The Div can be visible or invisible in IE, but not in FireFox, the main purpose is: when user typing text in a password textbox, if the CAP LOCK is one, show the div:
<asp:TextBox ID="Password" runat="server" TextMode="Password"
onkeypress="capLock(event)"></asp:TextBox>
<div id="divMayus" style="visibility:hidden; background-image:url(../App_Themes/CapLockOnAtHome.png); height:25px; width:100px;">
</div>
<script type="text/jscript">
function capLock(e){
kc = e.keyCode?e.keyCode:e.which;
sk = e.shiftKey?e.shiftKey:((kc == 16)?true:false);
if(((kc >= 65 && kc <= 90) && !sk)||((kc >= 97 && kc <= 122) && sk))
{
document.getElementById('divMayus').style.visibility = 'visible';
}
else
document.getElementById('divMayus').style.visibility = 'hidden';
}
</script>
Have also tried: display='none', display='block' or display='inline', also not working, no I am confused which to use for both IE and Firefox.
View 2 Replies