Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2006

Tip: Looking for answers? Try searching our database.

Problem in File transfer through C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Siddharth - 14 Feb 2006 07:50 GMT
Hello friends,
        I am having a problem in transferring a file from a client to
another client via a server, with the help of SOCKETS. I am using NETWORK
STREAM to tranfer the file contents. As soon as the file is sended to the
SERVER's SOCKET, it shows an error of : "CONNECTION FORCIBLY CLOSED". Please
help me out. I need to submit it as a FINAL YEAR PROJECT, in my INSTANT
MESSENGER.
Vadym Stetsyak - 14 Feb 2006 09:35 GMT
Hello, Siddharth!

S> Hello friends,
S>          I am having a problem in transferring a file from a client to
S> another client via a server, with the help of SOCKETS. I am using
S> NETWORK STREAM to tranfer the file contents. As soon as the file is
S> sended to the SERVER's SOCKET, it shows an error of : "CONNECTION
S> FORCIBLY CLOSED". Please help me out. I need to submit it as a FINAL
S> YEAR PROJECT, in my INSTANT MESSENGER.

Maybe server expects the data in special format defined by the protocol?
Do you use any application protocol for file sending?

If you use .NET 2.0 you can use Socket.SendFile method

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Siddharth - 15 Feb 2006 06:30 GMT
>Hello, Siddharth!
>
[quoted text clipped - 14 lines]
>Regards, Vadym Stetsyak
>www: http://vadmyst.blogspot.com

Thanks for the concern in my problem. I am using .NET 1.1 and I wanted to get
a solution which is compatible in this version. I would be obliged if you can
help me out.

I am developing an Instant messenger in C#. I have developed the Text
Messenger in the form of two different applications for : Client and the
Server. I wanted to add the facility of Voice and Video Chatting to it. I
have developed a separate application for Capturing the Voice and Video
through a Microphone and a Web Camera that saves it as a file.
I wanted to integrate this application into the Client App. to incorporate
the facility of Voice transfer in the form of a File.
The problem that I am facing is that, As soon as I transfer the file in the
form of NETWORK STREAM, it throws an exception that  "CONNECTION FORCIBLY
CLOSED".  I would be highly Obliged if I get this problem solved.
Vadym Stetsyak - 15 Feb 2006 11:04 GMT
Hello, Siddharth!

If you have the access to Server code then you can change its behavior not to close connection. How server determines that a file is being send to it?

Also I would recommend instead of saving info to the file and then sending, you can send retrieved visual and sound data at once ( on the fly ).

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Siddharth - 03 Apr 2006 11:09 GMT
Server does not closes the connection, instead there arises an exception -
"FORCIBLY CLOSED THE CONNECTION ON REMOTE HOST". I have even used the Visual
Studio 2005 and the sendFile( ) Method, but still I am unable to transfer the
File.
  I am unable to parse the captured data in real time so as to incorporate
the ON THE FLY transfer. I would be highly obliged if you help me out in it,
as it really sounds a more efficient approach.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.