hi all,
I have written a C# Service which is a Server accepting Clients,It is
working fine when i connect from localhost but when i connect from any other
machine to my machine , the service is not working, the Service is in
"Network Service".....i even tried "Local System" and also "Local Service"
but the end result is , it is working only for Localhost connections and not
for Remote Connections...
the code for server is as follows..
////////////************Ser ver Code starts here**********//////////////////
IPAddress ipAddress = Dns.Resolve("lo calhost").Addre ssList[0];
TcpListener listener = new TcpListener(ipA ddress,portNum) ;
try
{
listener.Start( );
TcpClient handler = listener.Accept TcpClient();
////extra things done here
}
////////////************Ser ver Code starts here**********//////////////////
but the remote connections are not getting connected...... .why so?
with regards,
C.C.Chakkaradee p 6 1961
"Chakkarade ep" <Ch**********@d iscussions.micr osoft.com> wrote in message
news:06******** *************** ***********@mic rosoft.com... hi all,
I have written a C# Service which is a Server accepting Clients,It is working fine when i connect from localhost but when i connect from any other machine to my machine , the service is not working, the Service is in "Network Service".....i even tried "Local System" and also "Local Service" but the end result is , it is working only for Localhost connections and not for Remote Connections...
the code for server is as follows..
////////////************Ser ver Code starts here**********////////////////// IPAddress ipAddress = Dns.Resolve("lo calhost").Addre ssList[0]; TcpListener listener = new TcpListener(ipA ddress,portNum) ; try { listener.Start( ); TcpClient handler = listener.Accept TcpClient(); ////extra things done here } ////////////************Ser ver Code starts here**********//////////////////
but the remote connections are not getting connected...... .why so?
How would you like your clients to connect if you bind your listener to
'localhost' which resolves to 127.0.0.1?
You have to use your real host name, not the loopback address.
Willy.
hi willy,
this was really a silly but a BIG mistake........ thanks for the reply....
with regards,
C.C.Chakkaradee p
"Willy Denoyette [MVP]" wrote:
"Chakkarade ep" <Ch**********@d iscussions.micr osoft.com> wrote in message news:06******** *************** ***********@mic rosoft.com... hi all,
I have written a C# Service which is a Server accepting Clients,It is working fine when i connect from localhost but when i connect from any other machine to my machine , the service is not working, the Service is in "Network Service".....i even tried "Local System" and also "Local Service" but the end result is , it is working only for Localhost connections and not for Remote Connections...
the code for server is as follows..
////////////************Ser ver Code starts here**********////////////////// IPAddress ipAddress = Dns.Resolve("lo calhost").Addre ssList[0]; TcpListener listener = new TcpListener(ipA ddress,portNum) ; try { listener.Start( ); TcpClient handler = listener.Accept TcpClient(); ////extra things done here } ////////////************Ser ver Code starts here**********//////////////////
but the remote connections are not getting connected...... .why so?
How would you like your clients to connect if you bind your listener to 'localhost' which resolves to 127.0.0.1? You have to use your real host name, not the loopback address.
Willy.
hi,
my service is working fine..if i connect from the same machine to my server
which is also running in the same machine, there s no any delay but the same
if i connect to my service from anyother remote client, there s delay,it is
taking minimum 60 seconds.....is this my network problem r is that i have
fine tune somewhere n my Server....
with regards,
C.C.Chakkaradee p
"Chakkarade ep" wrote: hi willy,
this was really a silly but a BIG mistake........ thanks for the reply....
with regards, C.C.Chakkaradee p
"Willy Denoyette [MVP]" wrote:
"Chakkarade ep" <Ch**********@d iscussions.micr osoft.com> wrote in message news:06******** *************** ***********@mic rosoft.com... hi all,
I have written a C# Service which is a Server accepting Clients,It is working fine when i connect from localhost but when i connect from any other machine to my machine , the service is not working, the Service is in "Network Service".....i even tried "Local System" and also "Local Service" but the end result is , it is working only for Localhost connections and not for Remote Connections...
the code for server is as follows..
////////////************Ser ver Code starts here**********////////////////// IPAddress ipAddress = Dns.Resolve("lo calhost").Addre ssList[0]; TcpListener listener = new TcpListener(ipA ddress,portNum) ; try { listener.Start( ); TcpClient handler = listener.Accept TcpClient(); ////extra things done here } ////////////************Ser ver Code starts here**********//////////////////
but the remote connections are not getting connected...... .why so?
How would you like your clients to connect if you bind your listener to 'localhost' which resolves to 127.0.0.1? You have to use your real host name, not the loopback address.
Willy.
"Chakkarade ep" <Ch**********@d iscussions.micr osoft.com> wrote in message
news:49******** *************** ***********@mic rosoft.com... hi,
my service is working fine..if i connect from the same machine to my server which is also running in the same machine, there s no any delay but the same if i connect to my service from anyother remote client, there s delay,it is taking minimum 60 seconds.....is this my network problem r is that i have fine tune somewhere n my Server....
with regards, C.C.Chakkaradee p
I wouldn't know, but I guess it's more likely a bug than a network problem.
I would try to telnet with your service (telnet servername port), to see
wheter it's a server or a client issue.
Willy.
Hi Willy,
i tried connecting by writing a Client program in Linux and connecting to my
server...within no time the Client connected..!!!! ...but wht abt c#
Client??...is this s C# Client program??....i used TCPClient for writing
Client program...
with regards,
C.C.Chakkaradee p
"Willy Denoyette [MVP]" wrote:
"Chakkarade ep" <Ch**********@d iscussions.micr osoft.com> wrote in message news:49******** *************** ***********@mic rosoft.com... hi,
my service is working fine..if i connect from the same machine to my server which is also running in the same machine, there s no any delay but the same if i connect to my service from anyother remote client, there s delay,it is taking minimum 60 seconds.....is this my network problem r is that i have fine tune somewhere n my Server....
with regards, C.C.Chakkaradee p
I wouldn't know, but I guess it's more likely a bug than a network problem. I would try to telnet with your service (telnet servername port), to see wheter it's a server or a client issue.
Willy.
"Chakkarade ep" <Ch**********@d iscussions.micr osoft.com> wrote in message
news:C2******** *************** ***********@mic rosoft.com... Hi Willy,
i tried connecting by writing a Client program in Linux and connecting to my server...within no time the Client connected..!!!! ...but wht abt c# Client??...is this s C# Client program??....i used TCPClient for writing Client program...
There must be something wrong in your C# client, step through it in the
debugger and look where it waits.
Willy. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mailme.faisal |
last post by:
I have created a service that create a process.
The service is running in local system account & it also create the
new process in system account.
In process i have to access network resource .
In Windows 2000 new process is working fine but in Windows XP it does't
do anything .
The problem is that newly created problem could not access network path
thats y creating problem .
What may b the reason ?
|
by: Belsam |
last post by:
Hi all
I need to create a windows service that will wait for a file to be
copied somewhere, write it to the database, and then move the file to
a storage area.
I don't know when the file will come in, so I think I need a service
vs using task scheduler.
Am I correct? If yes, can someone help with how to do this? So far
|
by: Rob |
last post by:
Hi,
I am working on a project that requires a Windows Service which
performs the following file transfer functions.
1. It monitors a specific local directory on a Windows 2003 Server.
2. When it finds files with a specific extension, it queries a SQL
Server database to determine what workstation will be the destination
of a File.Copy.
3. It copies those files to the appropriate workstations on the LAN,
|
by: Mark Rae |
last post by:
Hi,
I'm looking for advice concerning what to do if a Windows service does not
find a "viable" working environment at startup.
E.g. I have a Windows service which does the following:
1) connects to a remote FTP site and looks for certain files which it
downloads to a fileserver if it finds them;
|
by: Martin |
last post by:
Hi,
Transferred a working ASP.Net app and database to a new machine and domain.
The app should be running as the local aspnet account (<processModel
userName="machine" password="AutoGenerate" ..... /> in machine.config)
The connection string is "packet size=4096;Integrated Security=SSPI;data
source=(local); persist security info=False;initial catalog=mydb"
| |
by: Kevin D. |
last post by:
Please note, I already posted this on the MySQL official forum, but received
no response. I thought I'd try again in another location. My apologies to
anyone reading this twice...
Despite everything I've tried, I cannot get MySQL to start as a Windows
service. However, I AM able to get it started via the mysqld-nt --console
command.
Here is my (funky) setup:
|
by: Mike |
last post by:
Can a vb program running as a serice not use network paths to do file/io?
I can't seem to get my program to work with network paths and files. When I
use local disk it works fine. When I run it as a none service program it
works fine. I'm assuming that vb programs running as a service do not
support network paths. Is that true?
Thanks in advance.
|
by: cj2 |
last post by:
This code works:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
|
by: |
last post by:
Hi all,
I have an asp.net 2.0 website that accesses a locally hosted web service.
This works fine on servers that are connected to our network. However, I am
having a problem with a laptop server that I have built. The code that tries
to connect to the web service breaks if the laptop is not within our
network. Further debugging has revealed that this is due to a proxy server
issue. Our domain sets the proxy server via GPO for all...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |