Click here to Skip to main content
15,904,346 members
Home / Discussions / C#
   

C#

 
GeneralRe: New Editor Pin
stancrm6-Feb-07 0:58
stancrm6-Feb-07 0:58 
GeneralRe: New Editor Pin
GunaChinna6-Feb-07 1:11
GunaChinna6-Feb-07 1:11 
GeneralRe: New Editor Pin
stancrm6-Feb-07 1:15
stancrm6-Feb-07 1:15 
GeneralRe: New Editor Pin
GunaChinna6-Feb-07 1:37
GunaChinna6-Feb-07 1:37 
GeneralRe: New Editor Pin
GunaChinna6-Feb-07 1:37
GunaChinna6-Feb-07 1:37 
Questioncopying files Pin
Lol215-Feb-07 20:45
Lol215-Feb-07 20:45 
AnswerRe: copying files Pin
Christian Graus5-Feb-07 21:56
protectorChristian Graus5-Feb-07 21:56 
QuestionNo connection could be made because the target machine actively refused it Pin
M Riaz Bashir5-Feb-07 20:44
M Riaz Bashir5-Feb-07 20:44 
Hi,

kindly check my little script and tell me. where am I doing wrong?

When i run this script the error arises :
==>> No connection could be made because the target machine actively refused it


thank you

private void button1_Click(object sender, EventArgs e)
{
IPAddress host = IPAddress.Parse("192.168.0.102"); // <<-- my machine ip
IPEndPoint hostep = new IPEndPoint(host, 8000);
Socket sock = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
try
{
sock.Connect(hostep); // <== Error comes from here
listBox1.Items.Add("Connected.");
}
catch (Exception ex)
{
listBox1.Items.Add("Connection problem is :");
listBox1.Items.Add(ex.Message);
textBox1.Text = ex.Message;
sock.Close();
return;
}
try
{
sock.Send(Encoding.ASCII.GetBytes("testing"));
}
catch (Exception exsoc)
{
listBox1.Items.Add("Problem sending data");
listBox1.Items.Add(exsoc.Message);
sock.Close();
return;
}
sock.Close();
}
AnswerRe: No connection could be made because the target machine actively refused it Pin
aSarafian5-Feb-07 22:23
aSarafian5-Feb-07 22:23 
GeneralRe: No connection could be made because the target machine actively refused it Pin
M Riaz Bashir5-Feb-07 22:51
M Riaz Bashir5-Feb-07 22:51 
QuestionUsing unsafe sizeof in c# Pin
The Geek5-Feb-07 19:46
The Geek5-Feb-07 19:46 
AnswerRe: Using unsafe sizeof in c# Pin
Christian Graus5-Feb-07 19:48
protectorChristian Graus5-Feb-07 19:48 
GeneralRe: Using unsafe sizeof in c# Pin
The Geek5-Feb-07 20:25
The Geek5-Feb-07 20:25 
Question'System.ComponentModel.win32Exception' Pin
Ankit Aneja5-Feb-07 19:25
Ankit Aneja5-Feb-07 19:25 
AnswerRe: 'System.ComponentModel.win32Exception' Pin
Judah Gabriel Himango6-Feb-07 8:05
sponsorJudah Gabriel Himango6-Feb-07 8:05 
QuestionHow can I SMTP and POP3 Pin
sjs4u5-Feb-07 18:55
sjs4u5-Feb-07 18:55 
AnswerRe: How can I SMTP and POP3 Pin
Christian Graus5-Feb-07 19:47
protectorChristian Graus5-Feb-07 19:47 
QuestionHelp on Remember password Pin
Nekshan5-Feb-07 18:40
Nekshan5-Feb-07 18:40 
AnswerRe: Help on Remember password Pin
Christian Graus5-Feb-07 19:50
protectorChristian Graus5-Feb-07 19:50 
QuestionThanx Graus ... Pin
Nekshan5-Feb-07 21:36
Nekshan5-Feb-07 21:36 
AnswerRe: Thanx Graus ... Pin
althamda5-Feb-07 23:12
althamda5-Feb-07 23:12 
AnswerRe: Thanx Graus ... Pin
VirtualVoid.NET6-Feb-07 3:28
VirtualVoid.NET6-Feb-07 3:28 
QuestionUse of OpenPOP.dll in C# asp.net web application Pin
EEmaan5-Feb-07 18:07
EEmaan5-Feb-07 18:07 
QuestionVisual studio 2005 C#.Net Pin
Sri harini5-Feb-07 18:01
Sri harini5-Feb-07 18:01 
AnswerRe: Visual studio 2005 C#.Net Pin
bobsugar2225-Feb-07 21:35
bobsugar2225-Feb-07 21:35 

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.