Click here to Skip to main content
15,897,518 members
Home / Discussions / C#
   

C#

 
GeneralRe: Windows Service Setup installation doesn't work on a different computer Pin
emma.sun.sts21-Nov-13 14:00
emma.sun.sts21-Nov-13 14:00 
GeneralRe: Windows Service Setup installation doesn't work on a different computer Pin
Dave Kreskowiak21-Nov-13 16:49
mveDave Kreskowiak21-Nov-13 16:49 
GeneralRe: Windows Service Setup installation doesn't work on a different computer Pin
jschell22-Nov-13 9:38
jschell22-Nov-13 9:38 
AnswerRe: Windows Service Setup installation doesn't work on a different computer Pin
Bernhard Hiller21-Nov-13 3:02
Bernhard Hiller21-Nov-13 3:02 
GeneralRe: Windows Service Setup installation doesn't work on a different computer Pin
emma.sun.sts21-Nov-13 14:05
emma.sun.sts21-Nov-13 14:05 
GeneralRe: Windows Service Setup installation doesn't work on a different computer Pin
Bernhard Hiller21-Nov-13 21:16
Bernhard Hiller21-Nov-13 21:16 
AnswerRe: Windows Service Setup installation doesn't work on a different computer Pin
jschell22-Nov-13 9:45
jschell22-Nov-13 9:45 
Questioncapture data from Panasonic PBX using c# Pin
Arjun Mourya20-Nov-13 17:54
Arjun Mourya20-Nov-13 17:54 
I have written the below code to capture data from Panasonic PBX(KX-TDE 100/200) and write it to a file. When I try to run the below code, it shows "not responding" in the Task Manager.
Also I tried to debug where might be the problem.The line

Socket socket = listener.Accept(); will be hit while debugging and after that it shows "Not Responding".

The PBX is connected to LAN in my company.Any configurations need to be done on my LAN?

I tried the same code for IP:127.0.0.1 to send a string to client app and it worked.But when I tried to pull data from PBX, its not working.

The LAN wire from my PBX is connected to the switch.

Please let me know what mistake I am doing. Also point me to good samples on capturing data from PBX using C#.

C#
private void btnstartserver_Click(object sender, EventArgs e)
    {

        int portno = Convert.ToInt32(txtportnum.Text);
        byte[] receivedBytes = new byte[1024];
        IPHostEntry ipHost = Dns.GetHostEntry(Dns.GetHostName());
        IPAddress ipAddress = ipHost.AddressList[0];
        IPEndPoint ipEndPoint = new IPEndPoint(ipAddress, portno);//2112
        txtboxstatus.Text = "Creating socket object...";

        Socket listener = new Socket(AddressFamily.InterNetworkV6,
                                    SocketType.Stream,
                                    ProtocolType.Tcp);

        listener.Bind(ipEndPoint);
        listener.Listen(10);
        txtboxstatus.AppendText("Listening on " + ipHost.AddressList[0].ToString() + ":" + portno.ToString() + "\r\n");


        Socket socket = listener.Accept();

        txtboxstatus.AppendText ( "\n Connected with ..." + ipEndPoint.Port);

        string receivedvalue = string.Empty;


        receivedvalue = ReadMessage(socket);
        txtboxstatus.AppendText("\n Message read.....trying to write to the file...");
        //writing the received value from client into a file.
        try
        {
            FileStream fs = new FileStream("E:/Demo/IpData/Call.txt", FileMode.Create);
            StreamWriter sw = new StreamWriter(fs);
            sw.Write(receivedvalue);
            sw.Dispose();
            fs.Dispose();
        }
        catch (Exception ex)
        {
            txtclient.AppendText(ex.Message); 
        }  
     }


Even I tried to use BeginAccept(.....), but in vain.

Thanks,
DotNetTide
QuestionRe: capture data from Panasonic PBX using c# Pin
Richard MacCutchan20-Nov-13 22:35
mveRichard MacCutchan20-Nov-13 22:35 
AnswerRe: capture data from Panasonic PBX using c# Pin
Arjun Mourya21-Nov-13 5:37
Arjun Mourya21-Nov-13 5:37 
GeneralRe: capture data from Panasonic PBX using c# Pin
Richard MacCutchan21-Nov-13 6:09
mveRichard MacCutchan21-Nov-13 6:09 
GeneralRe: capture data from Panasonic PBX using c# Pin
Arjun Mourya21-Nov-13 21:55
Arjun Mourya21-Nov-13 21:55 
GeneralRe: capture data from Panasonic PBX using c# Pin
Richard MacCutchan21-Nov-13 21:59
mveRichard MacCutchan21-Nov-13 21:59 
AnswerRe: capture data from Panasonic PBX using c# Pin
Dave Kreskowiak21-Nov-13 1:58
mveDave Kreskowiak21-Nov-13 1:58 
AnswerRe: capture data from Panasonic PBX using c# Pin
Arjun Mourya21-Nov-13 5:41
Arjun Mourya21-Nov-13 5:41 
GeneralRe: capture data from Panasonic PBX using c# Pin
Dave Kreskowiak21-Nov-13 5:59
mveDave Kreskowiak21-Nov-13 5:59 
GeneralRe: capture data from Panasonic PBX using c# Pin
Arjun Mourya21-Nov-13 21:52
Arjun Mourya21-Nov-13 21:52 
GeneralRe: capture data from Panasonic PBX using c# Pin
Dave Kreskowiak22-Nov-13 1:38
mveDave Kreskowiak22-Nov-13 1:38 
QuestionHow to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Fatih BURAL20-Nov-13 6:35
professionalFatih BURAL20-Nov-13 6:35 
QuestionRe: How to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Eddy Vluggen20-Nov-13 6:45
professionalEddy Vluggen20-Nov-13 6:45 
AnswerRe: How to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Pete O'Hanlon20-Nov-13 6:57
mvePete O'Hanlon20-Nov-13 6:57 
AnswerRe: How to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Bernhard Hiller21-Nov-13 3:13
Bernhard Hiller21-Nov-13 3:13 
GeneralRe: How to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Fatih BURAL21-Nov-13 11:05
professionalFatih BURAL21-Nov-13 11:05 
GeneralRe: How to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Bernhard Hiller21-Nov-13 21:01
Bernhard Hiller21-Nov-13 21:01 
GeneralRe: How to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Fatih BURAL23-Nov-13 9:30
professionalFatih BURAL23-Nov-13 9:30 

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.