473,763 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.EventArg s) Handles MyBase.Load
Dim path2 As String

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

HttpContext.Cur rent.Response.C lear()
HttpContext.Cur rent.Response.A ddHeader("Conte nt-Disposition",
"attachment;fil ename=" + file.Name)
Response.AddHea der("Content-Length", file.Length.ToS tring)
Select Case file.Extension
Case ".xls"
Response.Conten tType = "applicatio n/vnd.ms-excel"
HttpContext.Cur rent.Response.W riteFile(file.F ullName)
Case ".pdf"
Response.Conten tType = "x-application/pdf"
HttpContext.Cur rent.Response.W riteFile(file.F ullName)
Case Else
Response.Conten tType = "applicatio n/octet-stream"
HttpContext.Cur rent.Response.W riteFile(file.F ullName)
End Select
Response.End()
Catch ex As Exception
Label1.Text = "Path: " & path2 & " Message: " & ex.Message
End Try
End Sub
Feb 22 '07 #1
0 1061

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

Similar topics

8
3038
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 "hit" into a database, then I use a response.redirect "filename.exe" to point the user to the download. What I'm missing is knowing when the download is complete so I can update the database to show the file successfully completed its download....
0
1940
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
1940
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; TEXT-TRANSFORM: uppercase; COLOR: #ffffff; FONT-FAMILY: verdana,ar= ial,helvetica,sans-serif; TEXT-DECORATION: none } A.eyebrow:link { TEXT-DE= CORATION: none }</style><title>6</title><meta http-equiv=3DContent-Type co=
0
1819
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; TEXT-TRANSFORM: uppercase; COLOR: #ffffff; FONT-FAMILY: verdana,ar= ial,helvetica,sans-serif; TEXT-DECORATION: none } A.eyebrow:link { TEXT-DE= CORATION: none }</style><title>H</title><meta http-equiv=3DContent-Type co=
3
3563
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 automatically realize the network is available and thus pass a file to a web service that will know what to do with the file. My question is what is the best way to transfer a file via a web service that my application will consume to invoke transfer's...
0
1014
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 to each client and install setup , as refereeing to most of MS site says that it avoids going to client place to install updates bla bla..). See for example Winamp every version support people wont come to us to install latest version, we the...
2
23900
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 completed the download or cancelled out before it completed. Is there any function in PHP that would allow the web server to send the file and detect a completion or cancellation? Or perpahs a javascript/PHP method? Any help would be greatly...
5
4893
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 they completed the download or cancelled out before it completed. Are there any known methods that would allow the web server to send the file and detect a completion or cancellation? Or perhaps a javascript method or html request trick that would...
12
3501
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 double click it to install it says "javaws.exe" has encountered a problem and needs to close. Were sorry for the inconvenience. It says no matter what. I've tried completely removing Java from my system and reinstalling, but it will not work. If i...
0
9389
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10149
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10003
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9943
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9828
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8825
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5271
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5410
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3918
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.