Click here to Skip to main content
15,905,420 members
Home / Discussions / C#
   

C#

 
GeneralRe: this.Height size issue Pin
tarquinn cook23-Feb-09 1:57
tarquinn cook23-Feb-09 1:57 
AnswerRe: this.Height size issue Pin
benjymous23-Feb-09 1:42
benjymous23-Feb-09 1:42 
JokeRe: this.Height size issue Pin
tarquinn cook23-Feb-09 1:59
tarquinn cook23-Feb-09 1:59 
QuestionError while debugging Pin
ayazmingora23-Feb-09 0:45
ayazmingora23-Feb-09 0:45 
AnswerRe: Error while debugging Pin
Rob Philpott23-Feb-09 1:33
Rob Philpott23-Feb-09 1:33 
GeneralRe: Error while debugging Pin
ayazmingora23-Feb-09 1:50
ayazmingora23-Feb-09 1:50 
Jokehello Pin
amitkumarpratap23-Feb-09 0:07
amitkumarpratap23-Feb-09 0:07 
QuestionClient Pin
mrithula822-Feb-09 23:51
mrithula822-Feb-09 23:51 
Hi,
I have used the following code for the Tcp client server communication...
When i run the Client.cs, it gives me an error stating:
Error....at System.Net.Sockets.TcpClient.Connect<string int32="" port="">..What changes should i do for the ipaddress and port..please help me with this...


using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Diagnostics;
using System.Runtime;
using System.Text;


/// <summary>
/// Summary description for Class1
/// </summary>
public class Server
{
	public Server()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    public static void Main()
    {

        try
        {
            IPAddress ipAd = IPAddress.Parse("192.168.1.32"); //use local m/c IP address, and use the same in the client
            TcpListener myList = new TcpListener(ipAd, 8006);

            myList.Start();

            Console.WriteLine("The server is running at port 8006...");
            
            Console.WriteLine("The local End point is  :" + myList.LocalEndpoint);
            Console.WriteLine("Waiting for a connection.....");

            Socket s = myList.AcceptSocket();
            Console.WriteLine("Connection accepted from " + s.RemoteEndPoint);

            byte[] b = new byte[100];
            int k = s.Receive(b);
            Console.WriteLine("Recieved...");
            for (int i = 0; i < k; i++)
                Console.Write(Convert.ToChar(b[i]));

            ASCIIEncoding asen = new ASCIIEncoding();
            s.Send(asen.GetBytes("The string was recieved by the server."));
            Console.WriteLine("\\nSent Acknowledgement");

            s.Close();
            myList.Stop();

        }

        catch (Exception e)
        {
            Console.WriteLine("Error..... " + e.StackTrace);
        }
    }
	
}

AnswerRe: Client Pin
Rob Philpott22-Feb-09 23:59
Rob Philpott22-Feb-09 23:59 
GeneralRe: Client Pin
mrithula823-Feb-09 2:06
mrithula823-Feb-09 2:06 
GeneralRe: Client Pin
Greg Chelstowski23-Feb-09 2:29
Greg Chelstowski23-Feb-09 2:29 
GeneralRe: Client Pin
mrithula823-Feb-09 2:53
mrithula823-Feb-09 2:53 
GeneralRe: Client Pin
Greg Chelstowski23-Feb-09 3:09
Greg Chelstowski23-Feb-09 3:09 
GeneralRe: Client Pin
Mel Feik23-Feb-09 10:54
Mel Feik23-Feb-09 10:54 
Question[Message Deleted] Pin
yesu prakash22-Feb-09 23:11
yesu prakash22-Feb-09 23:11 
AnswerRe: Voice conference using socket [modified] Pin
Deresen23-Feb-09 1:49
Deresen23-Feb-09 1:49 
GeneralRe: Voice conference using socket Pin
EliottA23-Feb-09 2:45
EliottA23-Feb-09 2:45 
GeneralRe: Voice conference using socket Pin
yesu prakash1-Mar-09 19:09
yesu prakash1-Mar-09 19:09 
GeneralRe: Voice conference using socket Pin
Deresen1-Mar-09 22:25
Deresen1-Mar-09 22:25 
GeneralRe: Voice conference using socket Pin
Gira Palmer3-Jun-11 3:40
Gira Palmer3-Jun-11 3:40 
QuestionHttpWebResponse timeout subsequently if I do not download the file but looking at the LastModified property only. Pin
Shao Voon Wong22-Feb-09 23:08
mvaShao Voon Wong22-Feb-09 23:08 
AnswerRe: HttpWebResponse timeout subsequently if I do not download the file but looking at the LastModified property only. Pin
Rob Philpott22-Feb-09 23:57
Rob Philpott22-Feb-09 23:57 
Questionan oaep padding error occured in asp.net Pin
venki5422-Feb-09 22:55
venki5422-Feb-09 22:55 
QuestionHello ,Pls help me ,How to retrieve image from database (sqlserver 2005) to imabe button?(Asp.net c#+) [modified] Pin
muhammadafsal22-Feb-09 22:50
muhammadafsal22-Feb-09 22:50 
AnswerRe: Hello ,Pls help me ,How to retrieve image from database (sqlserver 2005) to imabe button?(Asp.net c#+) Pin
Calin Tatar23-Feb-09 0:21
Calin Tatar23-Feb-09 0:21 

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.