Click here to Skip to main content
15,898,035 members
Home / Discussions / C#
   

C#

 
QuestionDotNetNuke Skin Pin
Kakuji17-May-06 18:41
Kakuji17-May-06 18:41 
AnswerRe: DotNetNuke Skin Pin
leppie17-May-06 19:10
leppie17-May-06 19:10 
QuestionAdding new Rows to the Data base table Pin
Ashraj198217-May-06 18:21
Ashraj198217-May-06 18:21 
AnswerRe: Adding new Rows to the Data base table Pin
leppie17-May-06 19:12
leppie17-May-06 19:12 
GeneralRe: Adding new Rows to the Data base table Pin
rah_sin17-May-06 19:17
professionalrah_sin17-May-06 19:17 
GeneralRe: Adding new Rows to the Data base table Pin
leppie17-May-06 19:28
leppie17-May-06 19:28 
Questionhow to user mail merge feature of microsoft word from c# Pin
Amrit pal Singh17-May-06 18:19
Amrit pal Singh17-May-06 18:19 
QuestionSending multiple files through same TCP connection! Pin
eyej17-May-06 15:36
eyej17-May-06 15:36 
Hi!
Can i send multiple files using the same tcp connection when using TCPClient and TCPListener classes!? I have made client and server part of app, and seems to me that everything is working fine on the server side, but when i try to send the second file through the same connection, i get the error:

"An unhandled exception of type System.InvalidOperationException' occurred in system.dll"
Additional information: Operation not allowed on non-connected sockets!

The code from client send button is:

...
private void buttonSend_Click(object sender, System.EventArgs e)
{
Stream fileStream = File.OpenRead(textBoxFile.Text);
byte[] fileBuffer = new byte[fileStream.Length];
fileStream.Read(fileBuffer,0,(int)fileStream.Length);
networkStream = soket.GetStream(); <- here rises the exception
networkStream.Write(fileBuffer,0,fileBuffer.GetLength(0));
networkStream.Close();
this.label2.Text = System.DateTime.Now;
}
...
When i erase the networkStream.Close(); line, i can send multiple files, but the network stream is never closed, so the file on the server side is always in use and i can`t do anything with it!

Thanx for help!
AnswerRe: Sending multiple files through same TCP connection! Pin
led mike17-May-06 18:15
led mike17-May-06 18:15 
AnswerRe: Sending multiple files through same TCP connection! Pin
leppie17-May-06 19:07
leppie17-May-06 19:07 
GeneralRe: Sending multiple files through same TCP connection! Pin
eyej18-May-06 2:08
eyej18-May-06 2:08 
Questionhow to embedd or bind any file to my app at runtime ? Pin
hdv21217-May-06 13:14
hdv21217-May-06 13:14 
AnswerRe: how to embedd or bind any file to my app at runtime ? Pin
Saqib Mehmood17-May-06 18:17
Saqib Mehmood17-May-06 18:17 
GeneralRe: how to embedd or bind any file to my app at runtime ? Pin
hdv21217-May-06 19:55
hdv21217-May-06 19:55 
GeneralRe: how to embedd or bind any file to my app at runtime ? Pin
Saqib Mehmood17-May-06 20:08
Saqib Mehmood17-May-06 20:08 
GeneralRe: how to embedd or bind any file to my app at runtime ? Pin
hdv21217-May-06 22:56
hdv21217-May-06 22:56 
QuestionCustom User Control and VS.NET 2005 Pin
Drew McGhie17-May-06 12:00
Drew McGhie17-May-06 12:00 
AnswerRe: Custom User Control and VS.NET 2005 Pin
Ed.Poore17-May-06 12:09
Ed.Poore17-May-06 12:09 
GeneralRe: Custom User Control and VS.NET 2005 Pin
Drew McGhie18-May-06 3:22
Drew McGhie18-May-06 3:22 
AnswerRe: Custom User Control and VS.NET 2005 Pin
microsoc17-May-06 19:58
microsoc17-May-06 19:58 
QuestionNeed help in parsing MIME version 1.0 email message Pin
msolh17-May-06 10:52
msolh17-May-06 10:52 
AnswerRe: Need help in parsing MIME version 1.0 email message Pin
Kakuji17-May-06 18:48
Kakuji17-May-06 18:48 
Questionhow to add an image into resource library? Pin
Susuko17-May-06 10:43
Susuko17-May-06 10:43 
AnswerRe: how to add an image into resource library? Pin
Judah Gabriel Himango17-May-06 11:02
sponsorJudah Gabriel Himango17-May-06 11:02 
GeneralRe: how to add an image into resource library? Pin
Susuko17-May-06 11:18
Susuko17-May-06 11:18 

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.