473,395 Members | 2,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Download breaks after win03 SP1 install

The code below works fine on my Windows2003, dotnet 1.1 server. UNTIL I
install service pak one for Windows 2003.
After I install SP1 this code brings up the Open/save box but one you select
something, nothing happens (0% downloads)
If I run this code on my dev machine with winXPsp2 and IE7, the code only
works for text files. Other files will download, but they are corrupt when
I open them.(missing bytes I think)

Does anyone have this working with a fully patch 03 server? How?

Thanks,
Ayrin

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim path2 As String

Try
path2 = Request.Params("File")
path2 = "C:\Attachments\" & path2
Dim file As System.IO.FileInfo = New System.IO.FileInfo(path2)

HttpContext.Current.Response.Clear()
HttpContext.Current.Response.AddHeader("Content-Disposition",
"attachment;filename=" + file.Name)
Response.AddHeader("Content-Length", file.Length.ToString)
Select Case file.Extension
Case ".xls"
Response.ContentType = "application/vnd.ms-excel"
HttpContext.Current.Response.WriteFile(file.FullNa me)
Case ".pdf"
Response.ContentType = "x-application/pdf"
HttpContext.Current.Response.WriteFile(file.FullNa me)
Case Else
Response.ContentType = "application/octet-stream"
HttpContext.Current.Response.WriteFile(file.FullNa me)
End Select
Response.End()
Catch ex As Exception
Label1.Text = "Path: " & path2 & " Message: " & ex.Message
End Try
End Sub
Feb 22 '07 #1
0 1046

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: IGC | last post by:
I have a requirement to record in a database when a file is finished downloading to the end-user. Currently when a user clicks a download icon for a file it directs to an ASP page that records the...
0
by: Sarah Akers | last post by:
GgF ----gL5cJ72EqiGIQ0SK65Rz Content-Type: text/html; Content-Transfer-Encoding: quoted-printable <html> <head> <style type=3D"text/css">.eyebrow { FONT-WEIGHT: bold; FONT-SIZE: 10px; TE=
0
by: Anne Snow | last post by:
7qs ----bSCMEc0pLIbJxmV9 Content-Type: text/html; Content-Transfer-Encoding: quoted-printable <html><head><style type=3Dtext/css>.eyebrow { FONT-WEIGHT: bold; FONT-SIZE= : 10px;...
0
by: Lynda Kilgore | last post by:
jGu ----qtHwhORV90yyhqJMOc Content-Type: text/html; Content-Transfer-Encoding: quoted-printable <html><head><style type=3Dtext/css>.eyebrow { FONT-WEIGHT: bold; FONT-SIZE= : 10px;...
3
by: Demetri | last post by:
Hello, I'm involved in developing an application which has the need to transfer files automtically once a laptop is connected back to the network. The application i'm developing will...
0
by: shamirza | last post by:
Hi All, Why the ClickOnce? earlier we can make setup and place it on server and we are able to download the setup from internet and install it in client mechines throuth web sites (no need to go...
2
by: Dan D | last post by:
I have a large install file (an exe) on my web server that people download and install from. Looking at my log files, I see a lot of people downloading it, but no way to tell for sure if they...
5
by: Dan D | last post by:
I have a large install file (an exe) on my web Apache server that people download and install from. Looking at my log files, I see a lot of people downloading it, but no way to tell for sure if...
12
by: Demonfight | last post by:
I am unable to download and install JDK on my laptop for some strange reason. When i download it using the orange button that says "Download Using Sun Download Manager" it downloads but when i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.