By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,544 Members | 2,065 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,544 IT Pros & Developers. It's quick & easy.

Windows Service Installer using Sockets

P: n/a
I am experiencing a wierd problem...

I have a C#.Net application Server which uses Sockets.
It listens on port 11000. and it runs as a Windows Service.
If I run it as a consple Application, I can connect to that
port/Application from any machine on the network as well as from my
local machine.

BUT If i install it as a Windows Service, I cannot connect to it from
the network though it works just fine form the local machine.

And one more strange issue, If I install it using the InstallUtil.exe,
it works fine ! That is I can connect to that port/Application from any
machine on the network as well as from my local machine.

So there must be something on the Windows Installer. Either I am
missing a configuration property or
Windows Installer doesnt go well with sockets at least in assigining
permissions ..I dont know.

Can anyone help me out...I have spent enough time searching for it on
the web.

FYI: I have tried service running under Local Service/Local System/ and
also under Administrator account..but no luck.

Mar 14 '06 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Hi,
Under what user you are running the service?
Are you getting any exception?
Do you have any firewall installed?

<ks******@gmail.com> wrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
I am experiencing a wierd problem...

I have a C#.Net application Server which uses Sockets.
It listens on port 11000. and it runs as a Windows Service.
If I run it as a consple Application, I can connect to that
port/Application from any machine on the network as well as from my
local machine.

BUT If i install it as a Windows Service, I cannot connect to it from
the network though it works just fine form the local machine.

And one more strange issue, If I install it using the InstallUtil.exe,
it works fine ! That is I can connect to that port/Application from any
machine on the network as well as from my local machine.

So there must be something on the Windows Installer. Either I am
missing a configuration property or
Windows Installer doesnt go well with sockets at least in assigining
permissions ..I dont know.

Can anyone help me out...I have spent enough time searching for it on
the web.

FYI: I have tried service running under Local Service/Local System/ and
also under Administrator account..but no luck.

Mar 14 '06 #2

P: n/a
I have tried it under all the users, I have tried it under my windows
account which belongs Admin group. and also under Local Service and
Local System account.

I dont have firewall installed.

As I said before, Strange thing is it works when it is running as
Console App or running as Service when installed through
InstallUtil.Exe. but it doesnt work if it is installed through Windows
Installer.

Mar 15 '06 #3

P: n/a
Hi,

Weird, Are you getting any exception?

How is that you are creating your installer?
"Kumar" <ks******@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
I have tried it under all the users, I have tried it under my windows
account which belongs Admin group. and also under Local Service and
Local System account.

I dont have firewall installed.

As I said before, Strange thing is it works when it is running as
Console App or running as Service when installed through
InstallUtil.Exe. but it doesnt work if it is installed through Windows
Installer.

Mar 15 '06 #4

P: n/a

<ks******@gmail.com> wrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
|I am experiencing a wierd problem...
|
| I have a C#.Net application Server which uses Sockets.
| It listens on port 11000. and it runs as a Windows Service.
|
|
| If I run it as a consple Application, I can connect to that
| port/Application from any machine on the network as well as from my
| local machine.
|
| BUT If i install it as a Windows Service, I cannot connect to it from
| the network though it works just fine form the local machine.
|
| And one more strange issue, If I install it using the InstallUtil.exe,
| it works fine ! That is I can connect to that port/Application from any
| machine on the network as well as from my local machine.
|
| So there must be something on the Windows Installer. Either I am
| missing a configuration property or
| Windows Installer doesnt go well with sockets at least in assigining
| permissions ..I dont know.
|
| Can anyone help me out...I have spent enough time searching for it on
| the web.
|
| FYI: I have tried service running under Local Service/Local System/ and
| also under Administrator account..but no luck.
|

Are you sure that your Service is implemented correctly? That is do, you
create a thread in "OnStart" to run your service? Show us your code or part
of...

Willy.

Mar 15 '06 #5

P: n/a
Thanks for the replies....

Well..
I can run the same Installer on my local machine and it works perfectly
fine.
That is:

1 If I install it on my local machine, and try to connect to it from my
local machine, I can connect to it,
But I cant connect to it from other machine in the network.

One more thing I have found is:

It doesnt happen on all the machines. This installer works on some
machines. but not on all.
We tried to install it on few test machines and only one of them
failed.
2. If I run it as Console App OR Install it using InstallUtil.exe It
works fine, that is I can connect to it from local
machine as well as from the network.
( This is also true for the Test machine, on which it had failed, I
reinstalled it using InstallUtil.exe and it works !!)

It is something in the System Settings OR Installer settings which is
not allowing the network to open the port on this machine, if
it is installed as a Windows Service.

If you still want me to post relevent Code, I will. Let me know which
section you would think is probable culprit.

Thanks

--Kumar Shetgar

Mar 16 '06 #6

P: n/a
I am not getting any exception. and I am using VS ProjectInstaller.

Mar 16 '06 #7

P: n/a
Hi,
It doesnt happen on all the machines. This installer works on some
machines. but not on all.
We tried to install it on few test machines and only one of them
failed.


I still think you have a firewall running, did you check:

1- XP with SP2 in the security center that the firewall is off?
2- In the TCP/IP property of the local network check the TCP/IP filtering
3- In the local network connection check the advance tab and see what is in
the windows firewall
Check antivirus, etc that can being protecting the computer
disable the firewall service from the windows services

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Mar 16 '06 #8

P: n/a
If it is a firewall, a simple test would be to use telnet to connect.

Start > Run > command
or
Start > Run > cmd

Then from the DOS window type: Telnet IP Port

Example: Telnet 192.168.1.5 11000

If you get refused then its a firewall.

Hope this helps,
Dan
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:Ot**************@tk2msftngp13.phx.gbl...
Hi,
It doesnt happen on all the machines. This installer works on some
machines. but not on all.
We tried to install it on few test machines and only one of them
failed.


I still think you have a firewall running, did you check:

1- XP with SP2 in the security center that the firewall is off?
2- In the TCP/IP property of the local network check the TCP/IP filtering
3- In the local network connection check the advance tab and see what is
in the windows firewall
Check antivirus, etc that can being protecting the computer
disable the firewall service from the windows services

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Mar 16 '06 #9

P: n/a
Thanks guys,

I used telnet command But It refused to connect.

My question is:
Why I cant connect to the Service on that port when it is installed
using WIndows Installer. When I install it using the InstallUtil.exe, I
can successfully connect to the Service on that port. If it is a
firewall issue, shouldnt it block the communication even when it is
installed using InstallUtil.exe ?

Mar 16 '06 #10

P: n/a
Some More Clarification:

When I said " I used telnet command But It refused to connect.", Its
only in the case when I install it using the Windows Installer.
If I install it using the InstallUtil.exe Telnet Command Works just
fine.

My question is:

Why I cant connect to the Service on that port when it is installed
using WIndows Installer. When I install it using the InstallUtil.exe, I

can successfully connect to the Service on that port. If it is a
firewall issue, shouldnt it block the communication even when it is
installed using InstallUtil.exe ?

Mar 16 '06 #11

P: n/a
Thanks guys,

It was firewall problem.
Earlier to turn the firewall off, I opened the firewall properties, and
checked 'off'.
And I always thought that this made the firewall off.
But No....That doesnt make the firewall off...as long as the Windows
Firewall Service is running.
When I stopped this service, my program works.
huh.!

Mar 21 '06 #12

This discussion thread is closed

Replies have been disabled for this discussion.