使用套接字的Windows服务安装程序 [英] Windows Service Installer using Sockets

查看:65
本文介绍了使用套接字的Windows服务安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个奇怪的问题...


我有一个使用套接字的C#.Net应用服务器。

它侦听端口11000。它作为Windows服务运行。

如果我将它作为consple应用程序运行,我可以从网络上的任何机器连接到那个

端口/应用程序,以及来自我的

本地机器。


但如果我将其作为Windows服务安装,我无法连接到它/
网络尽管从本地机器上运行得很好。


还有一个奇怪的问题,如果我使用InstallUtil.exe安装它,

它运行正常!也就是说,我可以通过网络上的任何

机器以及本地机器连接到该端口/应用程序。


所以必须有一些东西Windows Installer。要么我是b $ b缺少配置属性,要么

Windows Installer至少在配置

权限时不适合套接字..我不知道。


任何人都可以帮助我......我已经花了足够的时间在网上搜索它。


FYI:我已尝试在本地服务/本地系统下运行服务/和管理员帐户下的
但是没有运气。

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.

推荐答案

您好,

您在运行该服务的用户下是什么?

您是否有任何例外?

您是否安装了防火墙?


< ks ****** @ gmail.com>在消息中写道

news:11 ********************** @ p10g2000cwp.googlegr oups.com ...
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...
我遇到了一个奇怪的问题...

我有一个使用套接字的C#.Net应用服务器。
它侦听端口11000.它作为Windows服务运行。

如果我将它作为consple应用程序运行,我可以从网络上的任何一台机器以及我的本地机器上连接到那个
端口/应用程序。但是,如果我将它作为Windows服务安装,我无法从网络连接到它虽然它可以很好地从本地机器上运行。

还有一个奇怪的问题,如果我使用InstallUtil.exe安装它,
它工作正常!也就是说,我可以从网络上的任何机器以及本地机器连接到该端口/应用程序。

因此Windows Installer上必定有一些东西。要么我缺少配置属性,要么
Windows Installer至少在配置
权限方面不适合套接字..我不知道。

任何人都可以帮助我我已经花了足够的时间在网上搜索它。

仅供参考:我已尝试在本地服务/本地系统下运行服务/和
也在管理员下帐号..但没有运气。
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.



我在所有用户下尝试过,我在我的窗户下试过它

属于Admin组的帐户。还有本地服务和

本地系统帐户。


我没有安装防火墙。


我之前说过,奇怪的是当它通过

InstallUtil.Exe安装时运行时可以正常工作。
控制台应用程序或作为服务运行。但如果通过Windows安装它无法工作

安装程序。

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.





很奇怪,你有没有例外?


你是如何创建安装程序的?

" Kumar" < KS ****** @ gmail.com>在消息中写道

新闻:11 ********************** @ i39g2000cwa.googlegr oups.com ...
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...
我已经在所有用户下尝试过,我在我的Windows
帐户下尝试了它,这个帐户属于Admin组。还有本地服务和本地系统帐户。

我没有安装防火墙。

正如我之前所说,奇怪的是它在运行时是有效的作为通过
InstallUtil.Exe安装的控制台应用程序或作为服务运行。但如果通过Windows
安装程序安装它就无法工作。
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.



这篇关于使用套接字的Windows服务安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆