944,081 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 3397
  • VB.NET RSS
Mar 21st, 2007
0

httpresponse in console application in VB.NET 1.1

Expand Post »
I m writing this code in VB.NET web application to set the MIME type for some particular file extensions.It working fine but what
i want to do is i don't want the web application I want this code in vb.net 1.1 console application.Is it possible to use httpresponse in
console application?
Dim fs As System.IO.FileStream = Nothing
fs = System.IO.File.Open("C:\...\test.zip", System.IO.FileMode.Open)
Dim btFile(fs.Length) As Byte
fs.Read(btFile, 0, fs.Length)
fs.Close()
Response.AddHeader("Content-disposition", "attachment; filename=" + "test.zip")
Response.ContentType = "application/octet-stream"
Response.BinaryWrite(btFile)
Response.End()
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster
bhavna_816 is offline Offline
116 posts
since Sep 2006
Mar 23rd, 2007
0

Re: httpresponse in console application in VB.NET 1.1

why do u need console application?why not web?
Reputation Points: 10
Solved Threads: 1
Newbie Poster
bikash123 is offline Offline
9 posts
since Feb 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Plz ver urgent
Next Thread in VB.NET Forum Timeline: Printing Data Report Directly in vb.net





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC