httpresponse in console application in VB.NET 1.1

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2006
Posts: 116
Reputation: bhavna_816 is an unknown quantity at this point 
Solved Threads: 0
bhavna_816 bhavna_816 is offline Offline
Junior Poster

httpresponse in console application in VB.NET 1.1

 
0
  #1
Mar 21st, 2007
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()
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 9
Reputation: bikash123 is an unknown quantity at this point 
Solved Threads: 0
bikash123 bikash123 is offline Offline
Newbie Poster

Re: httpresponse in console application in VB.NET 1.1

 
0
  #2
Mar 23rd, 2007
why do u need console application?why not web?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC