Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can it really be true? Pin
Nick Parker2-Jul-03 7:31
protectorNick Parker2-Jul-03 7:31 
GeneralRe: Can it really be true? Pin
leppie2-Jul-03 7:33
leppie2-Jul-03 7:33 
GeneralRe: Can it really be true? Pin
J. Dunlap2-Jul-03 9:08
J. Dunlap2-Jul-03 9:08 
GeneralRe: Can it really be true? Pin
James T. Johnson2-Jul-03 23:09
James T. Johnson2-Jul-03 23:09 
GeneralRe: Can it really be true? Pin
Kant3-Jul-03 7:34
Kant3-Jul-03 7:34 
GeneralRe: Can it really be true? Pin
Marc Clifton3-Jul-03 7:37
mvaMarc Clifton3-Jul-03 7:37 
GeneralRe: Can it really be true? Pin
Kant3-Jul-03 8:56
Kant3-Jul-03 8:56 
GeneralFile downloading - web service Pin
jrmcdona2-Jul-03 6:21
jrmcdona2-Jul-03 6:21 
I am trying to build a web service that downloads a file to my local directory.

I have the basics here but I just cannot get it to work, anybody know of any examples on this. Here is my code so far.

<code>
Dim l_oWR As WebRequest
Dim l_oWebResp As WebResponse
Dim l_oBR As BinaryReader
Dim l_oBW As BinaryWriter
Dim l_oStream As Stream
Dim bFile() As Byte
Dim l_iCnt As Long
Dim l_dtNow As DateTime = DateTime.Now
Dim l_sDir As String = l_dtNow.ToString("MMddyyyy")
Dim l_oDir As Directory
Dim l_sFile As String
Dim l_sCnnStr As String

Try

'download file
l_oWR = HttpWebRequest.Create("http://www.abc.com/abc.exe")
l_oWebResp = l_oWR.GetResponse()
l_oBR = New BinaryReader(l_oWebResp.GetResponseStream(), Encoding.ASCII)
l_iCnt = l_oWebResp.ContentLength
bFile = l_oBR.ReadBytes(CType(l_iCnt, Integer))
If Not System.IO.Directory.Exists("C:\ofac") Then
System.IO.Directory.CreateDirectory("C:\ofac")
End If
l_oStream = New FileStream("C:\ofac\t11sdall.exe", FileMode.Create, FileAccess.Write)
l_oBW = New BinaryWriter(l_oStream)
l_oBW.Write(bFile)
</code>

Thanks for any help here!
Jordan
GeneralRe: File downloading - web service Pin
leppie2-Jul-03 7:12
leppie2-Jul-03 7:12 
GeneralRe: File downloading - web service Pin
jrmcdona2-Jul-03 7:19
jrmcdona2-Jul-03 7:19 
GeneralFile I/O fun with binary files Pin
BrewCrew2-Jul-03 5:27
BrewCrew2-Jul-03 5:27 
GeneralRe: File I/O fun with binary files Pin
BrewCrew7-Jul-03 4:02
BrewCrew7-Jul-03 4:02 
GeneralAccessing an inbox in the SMTP service Pin
Johan Danforth2-Jul-03 5:11
Johan Danforth2-Jul-03 5:11 
GeneralRe: Accessing an inbox in the SMTP service Pin
lykac2-Jul-03 12:37
lykac2-Jul-03 12:37 
GeneralRe: Accessing an inbox in the SMTP service Pin
Johan Danforth2-Jul-03 20:33
Johan Danforth2-Jul-03 20:33 
QuestionHow to tell which row of DataGrid has been selected? Pin
Khang Nguyen2-Jul-03 4:38
Khang Nguyen2-Jul-03 4:38 
QuestionHOW to set html element's VALUE. Pin
Asim N.2-Jul-03 0:47
Asim N.2-Jul-03 0:47 
AnswerRe: HOW to set html element's VALUE. Pin
dynamic2-Jul-03 1:46
dynamic2-Jul-03 1:46 
GeneralProblem with DllImport Pin
jtmtv181-Jul-03 19:52
jtmtv181-Jul-03 19:52 
GeneralRe: Problem with DllImport Pin
Nathan Blomquist2-Jul-03 5:01
Nathan Blomquist2-Jul-03 5:01 
GeneralACCESSING IIS Pin
Asim N.1-Jul-03 19:39
Asim N.1-Jul-03 19:39 
GeneralRe: ACCESSING IIS Pin
Matt Newman2-Jul-03 5:55
Matt Newman2-Jul-03 5:55 
Generaladding image in SubItems of ListView Pin
azusakt1-Jul-03 16:49
azusakt1-Jul-03 16:49 
QuestionC# equivalent of CMap? Pin
mcgahanfl1-Jul-03 13:36
mcgahanfl1-Jul-03 13:36 
AnswerRe: C# equivalent of CMap? Pin
Wesner Moise1-Jul-03 14:00
Wesner Moise1-Jul-03 14:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.