473,626 Members | 3,216 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Gibberish Pdf file displayed if I transfer using bit stream

Hi all,
The following code was suggested by one of the users in this newsgroup when
a pdf file was requested by a user from an asp page. I used the similar code
in my page and the very interesting thing is when the pdf is displayed on the
fly, the whole page is a gibberish code in stead of a normal pdf file. But it
displays fine if I just use a link to a file on the page. Can you tell me
what's the possible reason will cause this problem?
Thank you.

if objFSO.FileExis ts(strFilePath) AND ok then
Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = 1
objStream.LoadF romFile strFilePath
Response.Buffer = false
Response.Conten tType = "applicatio n/pdf"
Response.AddHea der "Content-Type", "applicatio n/pdf"
Response.AddHea der "Content-Disposition","i nline;filename= "&once
Response.Binary Write objStream.Read
Response.Flush
objStream.Close
Set objStream = Nothing
else
response.write "Sorry, nonexisting file"
end if
Set objFSO = Nothing
Response.end
end if
--
Betty
Feb 9 '07 #1
5 3934
Oh, I forgot to tell you that I removed the code
Response.Buffer = false
since I set up this is true some where, it tells me that I cannot reset to
false.
So I removed that, not sure if this will impact on the result, I guess not?
--
Betty
"c676228" wrote:
Hi all,
The following code was suggested by one of the users in this newsgroup when
a pdf file was requested by a user from an asp page. I used the similar code
in my page and the very interesting thing is when the pdf is displayed on the
fly, the whole page is a gibberish code in stead of a normal pdf file. But it
displays fine if I just use a link to a file on the page. Can you tell me
what's the possible reason will cause this problem?
Thank you.

if objFSO.FileExis ts(strFilePath) AND ok then
Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = 1
objStream.LoadF romFile strFilePath
Response.Buffer = false
Response.Conten tType = "applicatio n/pdf"
Response.AddHea der "Content-Type", "applicatio n/pdf"
Response.AddHea der "Content-Disposition","i nline;filename= "&once
Response.Binary Write objStream.Read
Response.Flush
objStream.Close
Set objStream = Nothing
else
response.write "Sorry, nonexisting file"
end if
Set objFSO = Nothing
Response.end
end if

--
Betty
Feb 9 '07 #2

"c676228" <be****@communi ty.nospamwrote in message
news:81******** *************** ***********@mic rosoft.com...
Hi all,
The following code was suggested by one of the users in this newsgroup
when
a pdf file was requested by a user from an asp page. I used the similar
code
in my page and the very interesting thing is when the pdf is displayed on
the
fly, the whole page is a gibberish code in stead of a normal pdf file. But
it
displays fine if I just use a link to a file on the page. Can you tell me
what's the possible reason will cause this problem?
Thank you.

if objFSO.FileExis ts(strFilePath) AND ok then
Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = 1
objStream.LoadF romFile strFilePath
Response.Buffer = false
Response.Conten tType = "applicatio n/pdf"
Response.AddHea der "Content-Type", "applicatio n/pdf"
Response.AddHea der "Content-Disposition","i nline;filename= "&once
Response.Binary Write objStream.Read
Response.Flush
objStream.Close
Set objStream = Nothing
else
response.write "Sorry, nonexisting file"
end if
Set objFSO = Nothing
Response.end
end if
Do you have other include files in the ASP code?
Do you have other content that is being sent before this code?
The inability to use Response.Buffer = false would indicate that you do.

In the case above Response.Buffer = false in unnecessary since you write the
complete contents of the stream to the response in one call to BinaryWrite.

On IIS6 the default response buffer is 4MB so if your PDF is potentially
larger you will either need to increase this limit or chunk out the PDF
contents.

This is my stock function for doing this:-

Sub SendFileToRespo nse(FilePath, FileName)

Const clChunkSize = 1048576 ' 1MB

Dim oStream, i
Response.Buffer = False

Response.Conten tType = "applicatio n/octet-stream"
Response.AddHea der "Content-Disposition", _
"Filename=" & FileName

Set oStream = Server.CreateOb ject("ADODB.Str eam")
oStream.Type = 1 ' Binary
oStream.Open
oStream.LoadFro mFile FilePath

For i = 1 To oStream.Size \ clChunkSize
Response.Binary Write oStream.Read(cl ChunkSize)
Next
If (oStream.Size Mod clChunkSize) <0 Then
Response.Binary Write oStream.Read(oS tream.Size Mod clChunkSize)
End If
oStream.Close

End Sub

You would call this function as:-

SendFileToRespo nse strFilePath, once

since it chunks out the content there is no need to worry about buffer size.
However before you can use it you will need to look at what is happening
earlier in your page that is already placing unwanted content in the
response.

Anthony.

--
Betty

Feb 9 '07 #3
Hi Anthony,
we us IIS 5.0
Thanks for your suggestion. I do have include file, but it has nothing about
buffer set up, no html code, only database connection include file. And I
went to IIS virtual direcotry and saw default configuration for the
application is "enable buffer", so I unchecked this option and it no longer
complains the statement "Response.Buffe r = false ".
My pdf file is not big at all, it's less than 90KB. Now after I changed the
code, it gives me very informational error message like this:
Response object error 'ASP 0156 : 80004005'

Header Error

/DeliverPdf.asp, line 48 'which is Response.Conten tType =
"applicatio n/octet-stream"

The HTTP headers are already written to the client browser. Any HTTP header
modifications must be made before writing page content.
--'end of the eeror message
Then I thought it is because we have default HTTP headers in virtual
directoy, which is something generated by the system like this:
P3P: xxxxx
x-powered by: asp.net
Then I removed that default header and it still display the same error
message.
I don't get this.

My code is as follow:
----deleiverpdf.asp
<!--#INCLUDE VIRTUAL = "/utility/init_test.asp" -->
'init_test is database connection file
<html>
<%
cmdTemp.Command Text="a sql comand to fetch record from system based filename"
dim FileName, strFilePath
'Response.End
Set pdf_info = Server.CreateOb ject("ADODB.Rec ordset")
pdf_info.Open cmdTemp, , adOpenKeyset, adLockOptimisti c
If pdf_info.EOF Then
response.redire ct "/noPicFound404.g if"
Else
pdf_info.MoveFi rst()
'Response.Write "File Name: " & pdf_info("pdfFi leName")
OK=False
If Request("FileNa me")=Trim(pdf_i nfo("pdfFileNam e")) Then
strFilePath = Server.MapPath( pdf_info("TempP dfFilePath"))& "\" &
Request("FileNa me")
'Response.Write " Path " & strFilePath
Set objFSO = Server.CreateOb ject("Scripting .FileSystemObje ct")
If CInt(pdf_info(" MinElapsed")) < CInt(pdf_info(" ExpTime")) then
OK=true
End If
If objFSO.FileExis ts(strFilePath) and OK Then
Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = 1
objStream.LoadF romFile strFilePath
Response.Buffer = false
Response.Conten tType = "applicatio n/octet-stream"
Response.AddHea der "Content-Type", "applicatio n/pdf"
Response.AddHea der
"Content-Disposition","i nline;filename= "&Request("File Name") %>
<body>
<%Response.Bina ryWrite objStream.Read
Response.Flush
objStream.Close
Set objStream = Nothing
'Response.Write "I am inside pdf delivery."
Else
response.write "Sorry, the file doesn't exist."
End If
Set objFSO = Nothing
Response.end
End If 'End If FileName is the same as in the database system

End If 'End If pdf_info is EOF
'End Function
Response.Write FileName & "<br>"
Response.Write strFilePath & "<br>"
conn.Close
set conn=Nothing
cmdTemp.Close
set cmdTemp=Nothing
%>
</body>
</html>

--
Betty
"Anthony Jones" wrote:
>
"c676228" <be****@communi ty.nospamwrote in message
news:81******** *************** ***********@mic rosoft.com...
Hi all,
The following code was suggested by one of the users in this newsgroup
when
a pdf file was requested by a user from an asp page. I used the similar
code
in my page and the very interesting thing is when the pdf is displayed on
the
fly, the whole page is a gibberish code in stead of a normal pdf file. But
it
displays fine if I just use a link to a file on the page. Can you tell me
what's the possible reason will cause this problem?
Thank you.

if objFSO.FileExis ts(strFilePath) AND ok then
Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = 1
objStream.LoadF romFile strFilePath
Response.Buffer = false
Response.Conten tType = "applicatio n/pdf"
Response.AddHea der "Content-Type", "applicatio n/pdf"
Response.AddHea der "Content-Disposition","i nline;filename= "&once
Response.Binary Write objStream.Read
Response.Flush
objStream.Close
Set objStream = Nothing
else
response.write "Sorry, nonexisting file"
end if
Set objFSO = Nothing
Response.end
end if

Do you have other include files in the ASP code?
Do you have other content that is being sent before this code?
The inability to use Response.Buffer = false would indicate that you do.

In the case above Response.Buffer = false in unnecessary since you write the
complete contents of the stream to the response in one call to BinaryWrite.

On IIS6 the default response buffer is 4MB so if your PDF is potentially
larger you will either need to increase this limit or chunk out the PDF
contents.

This is my stock function for doing this:-

Sub SendFileToRespo nse(FilePath, FileName)

Const clChunkSize = 1048576 ' 1MB

Dim oStream, i
Response.Buffer = False

Response.Conten tType = "applicatio n/octet-stream"
Response.AddHea der "Content-Disposition", _
"Filename=" & FileName

Set oStream = Server.CreateOb ject("ADODB.Str eam")
oStream.Type = 1 ' Binary
oStream.Open
oStream.LoadFro mFile FilePath

For i = 1 To oStream.Size \ clChunkSize
Response.Binary Write oStream.Read(cl ChunkSize)
Next
If (oStream.Size Mod clChunkSize) <0 Then
Response.Binary Write oStream.Read(oS tream.Size Mod clChunkSize)
End If
oStream.Close

End Sub

You would call this function as:-

SendFileToRespo nse strFilePath, once

since it chunks out the content there is no need to worry about buffer size.
However before you can use it you will need to look at what is happening
earlier in your page that is already placing unwanted content in the
response.

Anthony.

--
Betty


Feb 9 '07 #4

"c676228" <be****@communi ty.nospamwrote in message
news:FF******** *************** ***********@mic rosoft.com...
Hi Anthony,
we us IIS 5.0
Thanks for your suggestion. I do have include file, but it has nothing
about
buffer set up, no html code, only database connection include file. And I
went to IIS virtual direcotry and saw default configuration for the
application is "enable buffer", so I unchecked this option and it no
longer
complains the statement "Response.Buffe r = false ".
I strongly recommend you turn that back on again.
My pdf file is not big at all, it's less than 90KB. Now after I changed
the
code, it gives me very informational error message like this:
Response object error 'ASP 0156 : 80004005'

Header Error

/DeliverPdf.asp, line 48 'which is Response.Conten tType =
"applicatio n/octet-stream"

The HTTP headers are already written to the client browser. Any HTTP
header
modifications must be made before writing page content.
--'end of the eeror message
Then I thought it is because we have default HTTP headers in virtual
directoy, which is something generated by the system like this:
P3P: xxxxx
x-powered by: asp.net
Then I removed that default header and it still display the same error
message.
I don't get this.

My code is as follow:
----deleiverpdf.asp
<!--#INCLUDE VIRTUAL = "/utility/init_test.asp" -->
'init_test is database connection file
<html>
The above is part of the problem you've started to send html content but you
want to send a pdf. Your page should only contain ASP code in <% %>. There
should be no HTML mark up in it at all.
<%
cmdTemp.Command Text="a sql comand to fetch record from system based
filename"
dim FileName, strFilePath
'Response.End
Set pdf_info = Server.CreateOb ject("ADODB.Rec ordset")
pdf_info.Open cmdTemp, , adOpenKeyset, adLockOptimisti c
If pdf_info.EOF Then
response.redire ct "/noPicFound404.g if"
Else
pdf_info.MoveFi rst()
'Response.Write "File Name: " & pdf_info("pdfFi leName")
OK=False
If Request("FileNa me")=Trim(pdf_i nfo("pdfFileNam e")) Then
strFilePath = Server.MapPath( pdf_info("TempP dfFilePath"))& "\" &
Request("FileNa me")
'Response.Write " Path " & strFilePath
Set objFSO = Server.CreateOb ject("Scripting .FileSystemObje ct")
If CInt(pdf_info(" MinElapsed")) < CInt(pdf_info(" ExpTime")) then
OK=true
End If
If objFSO.FileExis ts(strFilePath) and OK Then
Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = 1
objStream.LoadF romFile strFilePath
Response.Buffer = false
Response.Conten tType = "applicatio n/octet-stream"
Response.AddHea der "Content-Type", "applicatio n/pdf"
Response.AddHea der
"Content-Disposition","i nline;filename= "&Request("File Name")
Get rid of this bit of markup also

%>
<body>
<%
Response.Binary Write objStream.Read
Response.Flush
objStream.Close
Set objStream = Nothing
'Response.Write "I am inside pdf delivery."
Else
response.write "Sorry, the file doesn't exist."
End If
Set objFSO = Nothing
Response.end
End If 'End If FileName is the same as in the database system

End If 'End If pdf_info is EOF
'End Function
Response.Write FileName & "<br>"
Response.Write strFilePath & "<br>"
conn.Close
set conn=Nothing
cmdTemp.Close
set cmdTemp=Nothing
%>
And this bit as well:
</body>
</html>


--
Betty
"Anthony Jones" wrote:

"c676228" <be****@communi ty.nospamwrote in message
news:81******** *************** ***********@mic rosoft.com...
Hi all,
The following code was suggested by one of the users in this newsgroup
when
a pdf file was requested by a user from an asp page. I used the
similar
code
in my page and the very interesting thing is when the pdf is displayed
on
the
fly, the whole page is a gibberish code in stead of a normal pdf file.
But
it
displays fine if I just use a link to a file on the page. Can you tell
me
what's the possible reason will cause this problem?
Thank you.
>
>
if objFSO.FileExis ts(strFilePath) AND ok then
Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = 1
objStream.LoadF romFile strFilePath
Response.Buffer = false
Response.Conten tType = "applicatio n/pdf"
Response.AddHea der "Content-Type", "applicatio n/pdf"
Response.AddHea der "Content-Disposition","i nline;filename= "&once
Response.Binary Write objStream.Read
Response.Flush
objStream.Close
Set objStream = Nothing
else
response.write "Sorry, nonexisting file"
end if
Set objFSO = Nothing
Response.end
end if
>
Do you have other include files in the ASP code?
Do you have other content that is being sent before this code?
The inability to use Response.Buffer = false would indicate that you do.

In the case above Response.Buffer = false in unnecessary since you write
the
complete contents of the stream to the response in one call to
BinaryWrite.

On IIS6 the default response buffer is 4MB so if your PDF is potentially
larger you will either need to increase this limit or chunk out the PDF
contents.

This is my stock function for doing this:-

Sub SendFileToRespo nse(FilePath, FileName)

Const clChunkSize = 1048576 ' 1MB

Dim oStream, i
Response.Buffer = False

Response.Conten tType = "applicatio n/octet-stream"
Response.AddHea der "Content-Disposition", _
"Filename=" & FileName

Set oStream = Server.CreateOb ject("ADODB.Str eam")
oStream.Type = 1 ' Binary
oStream.Open
oStream.LoadFro mFile FilePath

For i = 1 To oStream.Size \ clChunkSize
Response.Binary Write oStream.Read(cl ChunkSize)
Next
If (oStream.Size Mod clChunkSize) <0 Then
Response.Binary Write oStream.Read(oS tream.Size Mod clChunkSize)
End If
oStream.Close

End Sub

You would call this function as:-

SendFileToRespo nse strFilePath, once

since it chunks out the content there is no need to worry about buffer
size.
However before you can use it you will need to look at what is happening
earlier in your page that is already placing unwanted content in the
response.

Anthony.

--
Betty

Feb 9 '07 #5
Hooray! Anthony,

That works after I removed the html tag. Mm, I had another good lession.
Thank you.
--
Betty
"Anthony Jones" wrote:
>
"c676228" <be****@communi ty.nospamwrote in message
news:FF******** *************** ***********@mic rosoft.com...
Hi Anthony,
we us IIS 5.0
Thanks for your suggestion. I do have include file, but it has nothing
about
buffer set up, no html code, only database connection include file. And I
went to IIS virtual direcotry and saw default configuration for the
application is "enable buffer", so I unchecked this option and it no
longer
complains the statement "Response.Buffe r = false ".

I strongly recommend you turn that back on again.
My pdf file is not big at all, it's less than 90KB. Now after I changed
the
code, it gives me very informational error message like this:
Response object error 'ASP 0156 : 80004005'

Header Error

/DeliverPdf.asp, line 48 'which is Response.Conten tType =
"applicatio n/octet-stream"

The HTTP headers are already written to the client browser. Any HTTP
header
modifications must be made before writing page content.
--'end of the eeror message
Then I thought it is because we have default HTTP headers in virtual
directoy, which is something generated by the system like this:
P3P: xxxxx
x-powered by: asp.net
Then I removed that default header and it still display the same error
message.
I don't get this.

My code is as follow:
----deleiverpdf.asp
<!--#INCLUDE VIRTUAL = "/utility/init_test.asp" -->
'init_test is database connection file
<html>

The above is part of the problem you've started to send html content but you
want to send a pdf. Your page should only contain ASP code in <% %>. There
should be no HTML mark up in it at all.
<%
cmdTemp.Command Text="a sql comand to fetch record from system based
filename"
dim FileName, strFilePath
'Response.End
Set pdf_info = Server.CreateOb ject("ADODB.Rec ordset")
pdf_info.Open cmdTemp, , adOpenKeyset, adLockOptimisti c
If pdf_info.EOF Then
response.redire ct "/noPicFound404.g if"
Else
pdf_info.MoveFi rst()
'Response.Write "File Name: " & pdf_info("pdfFi leName")
OK=False
If Request("FileNa me")=Trim(pdf_i nfo("pdfFileNam e")) Then
strFilePath = Server.MapPath( pdf_info("TempP dfFilePath"))& "\" &
Request("FileNa me")
'Response.Write " Path " & strFilePath
Set objFSO = Server.CreateOb ject("Scripting .FileSystemObje ct")
If CInt(pdf_info(" MinElapsed")) < CInt(pdf_info(" ExpTime")) then
OK=true
End If
If objFSO.FileExis ts(strFilePath) and OK Then
Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = 1
objStream.LoadF romFile strFilePath
Response.Buffer = false
Response.Conten tType = "applicatio n/octet-stream"
Response.AddHea der "Content-Type", "applicatio n/pdf"
Response.AddHea der
"Content-Disposition","i nline;filename= "&Request("File Name")

Get rid of this bit of markup also

%>
<body>
<%

Response.Binary Write objStream.Read
Response.Flush
objStream.Close
Set objStream = Nothing
'Response.Write "I am inside pdf delivery."
Else
response.write "Sorry, the file doesn't exist."
End If
Set objFSO = Nothing
Response.end
End If 'End If FileName is the same as in the database system

End If 'End If pdf_info is EOF
'End Function
Response.Write FileName & "<br>"
Response.Write strFilePath & "<br>"
conn.Close
set conn=Nothing
cmdTemp.Close
set cmdTemp=Nothing
%>

And this bit as well:
</body>
</html>

--
Betty
"Anthony Jones" wrote:
>
"c676228" <be****@communi ty.nospamwrote in message
news:81******** *************** ***********@mic rosoft.com...
Hi all,
The following code was suggested by one of the users in this newsgroup
when
a pdf file was requested by a user from an asp page. I used the
similar
code
in my page and the very interesting thing is when the pdf is displayed
on
the
fly, the whole page is a gibberish code in stead of a normal pdf file.
But
it
displays fine if I just use a link to a file on the page. Can you tell
me
what's the possible reason will cause this problem?
Thank you.


if objFSO.FileExis ts(strFilePath) AND ok then
Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = 1
objStream.LoadF romFile strFilePath
Response.Buffer = false
Response.Conten tType = "applicatio n/pdf"
Response.AddHea der "Content-Type", "applicatio n/pdf"
Response.AddHea der "Content-Disposition","i nline;filename= "&once
Response.Binary Write objStream.Read
Response.Flush
objStream.Close
Set objStream = Nothing
else
response.write "Sorry, nonexisting file"
end if
Set objFSO = Nothing
Response.end
end if

>
Do you have other include files in the ASP code?
Do you have other content that is being sent before this code?
The inability to use Response.Buffer = false would indicate that you do.
>
In the case above Response.Buffer = false in unnecessary since you write
the
complete contents of the stream to the response in one call to
BinaryWrite.
>
On IIS6 the default response buffer is 4MB so if your PDF is potentially
larger you will either need to increase this limit or chunk out the PDF
contents.
>
This is my stock function for doing this:-
>
Sub SendFileToRespo nse(FilePath, FileName)
>
Const clChunkSize = 1048576 ' 1MB
>
Dim oStream, i
Response.Buffer = False
>
Response.Conten tType = "applicatio n/octet-stream"
Response.AddHea der "Content-Disposition", _
"Filename=" & FileName
>
Set oStream = Server.CreateOb ject("ADODB.Str eam")
oStream.Type = 1 ' Binary
oStream.Open
oStream.LoadFro mFile FilePath
>
For i = 1 To oStream.Size \ clChunkSize
Response.Binary Write oStream.Read(cl ChunkSize)
Next
If (oStream.Size Mod clChunkSize) <0 Then
Response.Binary Write oStream.Read(oS tream.Size Mod clChunkSize)
End If
oStream.Close
>
End Sub
>
You would call this function as:-
>
SendFileToRespo nse strFilePath, once
>
since it chunks out the content there is no need to worry about buffer
size.
However before you can use it you will need to look at what is happening
earlier in your page that is already placing unwanted content in the
response.
>
Anthony.
>
>
--
Betty
>
>
>


Feb 9 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
3576
by: Wei Su | last post by:
Hi, I have a text file abc.txt and it looks like: 12 34 56 23 45 56 33 56 78 ... .. .. ... .. .. I want to get how many rows totally in the text file, how to do this? Thanks.
11
6616
by: Abhishek | last post by:
I have a problem transfering files using sockets from pocket pc(.net compact c#) to desktop(not using .net just mfc and sockets 2 API). The socket communication is not a issue and I am able to transfer data across.On the serve I am using Socket 2 API (recv function to read bytes)and not using ..NET. I use FileStream to open the file on the pocket pc, then associate a BinaryReader object with the stream and call ReadBytes to read all the...
1
6813
by: lkr | last post by:
hi i got one file transfer program using serialization which has a limitation that i can send only 8192 bytes(8KB). i want to send more than that wht can i do. how can i divide the file into mutiple segment and send the file and receive it. here is the program below public static void SendFileInfo() { // Get file type or extension fileDet.FILETYPE = fs.Name.Substring((int)fs.Name.Length - 3, 3);
5
3049
by: Daniel Corbett | last post by:
I am trying to save a file dynamically created in a webpage. I get the following headers, but cannot figure out how to save the attachment. I am basically trying to replicate what internet explorer would do in this case. The headers I am getting are: Headers {Content-Disposition: attachment; filename="dynamic_file.mdb" Connection: close Cache-Control: private Content-Type: application/octet-stream
6
4600
by: ad | last post by:
I wnat to load a file in an .resx file and transfer the file to a stream. How can I do?
7
2301
by: fAnSKyer | last post by:
My method is use big buffersize, 512KB . And use StreamWriter.Write(bytes, 0, bytes.Length) to transfer to Server. It works, however, because the test file is below 512KB, but when I want transfer a bigger file, like 100M, what should I use? give me some advice, Thanks a lot
2
4191
by: Bonzol | last post by:
vb.net 2003 Windows application We have a Client/Server system set up by communicating through a TCPClient object. The server loops continuously using a tcplistener device and each time a client object attempts a connection, a new instance of a Client object is created (in the server's clients hashtable). The client object on the server (the client solution itself has same communication setup only with the code in the main form) handles...
10
10612
by: David | last post by:
I have googled to no avail on getting specifically what I'm looking for. I have found plenty of full blown apps that implement some type of file transfer but what I'm specifcally looking for is an example to follow for using a tcp socket to transfer files between client/server, server/client. Both server and client are my program so I'm not looking for how to implement an FTP client, or how to download a file from a web server via http...
1
5585
by: shyaminf | last post by:
hi everybody! iam facing a problem with the transfer of file using servlet programming. i have a code for uploading a file. but i'm unable to execute it using tomcat5.5 server. kindly help me how to execute it using tomcat server5.5. the code is as follows. if you have any other coding regarding this, please send me.it's urgent. import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*;
0
8268
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8202
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8707
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8641
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7199
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1512
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.