Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Write Data to Binary File

Reply
Thread Tools

Write Data to Binary File

 
 
Prabhat
Guest
Posts: n/a
 
      04-29-2006
Hi Friends,

I have one EXE file that customer need to download from my website. But I
have one text file of Max 250 bytes of text in in that I want to append to
the END of the Binary EXE file and give that for download to user. How can I
do that. Please suggest. I think we need to go for some BinaryWrite kind of
procedure using ADO Stream.

Please suggest
Prabhat


 
Reply With Quote
 
 
 
 
anilruia@gmail.com
Guest
Posts: n/a
 
      04-29-2006
You could possibly use the document footer feature -
http://technet2.microsoft.com/Window...07fc11033.mspx

 
Reply With Quote
 
 
 
 
Prabhat
Guest
Posts: n/a
 
      04-29-2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> You could possibly use the document footer feature -
>

http://technet2.microsoft.com/Window...396e-2149-461d
-b6e7-bd1625f07fc11033.mspx
>


No. I want to append some Text (Content of some small text file having 2
lines: Ex: "MyText.txt") in one of the EXE file (Binary File) Ex:
"MyApplication.exe" using ASP, in webserver. How can I do that?



 
Reply With Quote
 
David Wang [Msft]
Guest
Posts: n/a
 
      04-30-2006
Your choices:
1. Have IIS download the EXE file as a static file, and configure Footer for
that file only
2. Have an ASP page which reads the EXE file and BinaryWrite's the text file

Of course, you can do whatever you want. If you insist on writing ASP code,
go right ahead; most people prefer the Static File and Footer approach
because it's just configuration - no code necessary.

Aren't you corrupting the EXE by appending the text?

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//

"Prabhat" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) ups.com...
>> You could possibly use the document footer feature -
>>

> http://technet2.microsoft.com/Window...396e-2149-461d
> -b6e7-bd1625f07fc11033.mspx
>>

>
> No. I want to append some Text (Content of some small text file having 2
> lines: Ex: "MyText.txt") in one of the EXE file (Binary File) Ex:
> "MyApplication.exe" using ASP, in webserver. How can I do that?
>
>
>



 
Reply With Quote
 
Prabhat
Guest
Posts: n/a
 
      05-01-2006

"David Wang [Msft]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Your choices:
> 1. Have IIS download the EXE file as a static file, and configure Footer

for
> that file only
> 2. Have an ASP page which reads the EXE file and BinaryWrite's the text

file
>
> Of course, you can do whatever you want. If you insist on writing ASP

code,
> go right ahead; most people prefer the Static File and Footer approach
> because it's just configuration - no code necessary.
>
> Aren't you corrupting the EXE by appending the text?
>
> --
> //David
> IIS


Hi David,

Thanks for your suggestion. I did not know abt the Footer one. How can I do
that in IIS 5.0 on windows 2000 Serv? Can we set the Footer only for one EXE
? Can you help me in that?

Thanks
Prabhat


 
Reply With Quote
 
David Wang [Msft]
Guest
Posts: n/a
 
      05-02-2006
This sounds like a one-off case, so just create a vdir which points to that
..EXE and set the vdir to append Footers to all resources within it.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//

"Prabhat" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>
> "David Wang [Msft]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Your choices:
>> 1. Have IIS download the EXE file as a static file, and configure Footer

> for
>> that file only
>> 2. Have an ASP page which reads the EXE file and BinaryWrite's the text

> file
>>
>> Of course, you can do whatever you want. If you insist on writing ASP

> code,
>> go right ahead; most people prefer the Static File and Footer approach
>> because it's just configuration - no code necessary.
>>
>> Aren't you corrupting the EXE by appending the text?
>>
>> --
>> //David
>> IIS

>
> Hi David,
>
> Thanks for your suggestion. I did not know abt the Footer one. How can I
> do
> that in IIS 5.0 on windows 2000 Serv? Can we set the Footer only for one
> EXE
> ? Can you help me in that?
>
> Thanks
> Prabhat
>
>



 
Reply With Quote
 
Prabhat
Guest
Posts: n/a
 
      05-02-2006

"David Wang [Msft]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> This sounds like a one-off case, so just create a vdir which points to

that
> .EXE and set the vdir to append Footers to all resources within it.
>

Hi Thanks for your suggestion. But I have wrote code (in VB DLL) that will
take path fore Source Text File and Source Binary File and Append the Text
to the Binary File at END. I understand that I am modifying a Binary File -
But I know that I am not currupting it.

Thanks for your help
Prabhat


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Program to open a file in binary, skip X bytes and write the rest ofthe file to a new file scad C++ 4 05-28-2009 08:47 AM
Re: How to write binary data to file and socket Steve Holden Python 0 12-12-2008 01:22 PM
How to write binary data to a file using buffer? Lambda C++ 1 06-06-2008 07:56 AM
How do I write binary data to a file with javascript & WSH? Billy Smith Javascript 3 04-23-2006 02:30 PM
Very strange problem using FWRITE() to write data to a binary file leonecla@yahoo.it C Programming 6 02-09-2005 06:06 PM



Advertisments