Link to home
Start Free TrialLog in
Avatar of JAMU

asked on

open the .exe file returned in HttpWebResponse

I got a httpresponse object with
the header containt below data

base {System.Collections.Specialized.NameValueCollection} = {Content-Disposition: attachment; filename=1234.EXE
Cneonction: close
Content-Length: 57356
Cache-Control: private
Content-Type: application/x-msdownload
Date: Mon, 21 Jul 2008 14:07:37 GMT

I don't want to run the executable but want to open the .exe as data file.

Avatar of graye
Flag of United States of America image

Open an EXE file as a data file?   What on earth are you doing? :)
Avatar of Aaron Jabamani
When you are sending back the file , change the content Type and file name.

Response.ContentType = ""text/*"
Avatar of reswobslc

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JAMU


sorry for the confusion.
When I am trying to do is
1) Handle the downloading of a file on a website using and webrequest.
2) Navigate to the url to download a file. The site then pops up a ms-download dialog box.
3) Now the step 2 should be done using which by most part is done. Except for how to handle the webresponse i.e. the ms-download box.
4) I see the response header with the file name, which is a 1234.exe. But don't know how to proceed from here, to get the file from the response.
Are you trying to code the server side, or the client side?
Avatar of JAMU


Thanks for replying

I am coding the client side.