是我机器上的 调用的IP是我的机器上的,但是端口不是80。我查看了这个WEBSERVICE的方法,他的一部分代码是这样的: namespace smartService { [RunInstaller(true)] public class smartService: Installer { private ServiceInstaller serviceInstaller; private ServiceProcessInstaller processInstaller; public smartServiceInstaller() { // Instantiate installers for process and services. processInstaller = new ServiceProcessInstaller(); serviceInstaller = new ServiceInstaller(); // The services run under the system account. processInstaller.Account = ServiceAccount.LocalSystem; // The services are started automatically. serviceInstaller.StartType = ServiceStartMode.Automatic; // ServiceName must equal those on ServiceBase derived classes. serviceInstaller.ServiceName = "smartService"; // displayed in list serviceInstaller.DisplayName = "smartService"; // Add installers to collection. Order is not important. Installers.Add(serviceInstaller); Installers.Add(processInstaller); } } }
调用的IP是我的机器上的,但是端口不是80。我查看了这个WEBSERVICE的方法,他的一部分代码是这样的:
namespace smartService
{
[RunInstaller(true)]
public class smartService: Installer
{
private ServiceInstaller serviceInstaller;
private ServiceProcessInstaller processInstaller; public smartServiceInstaller()
{
// Instantiate installers for process and services.
processInstaller = new ServiceProcessInstaller();
serviceInstaller = new ServiceInstaller(); // The services run under the system account.
processInstaller.Account = ServiceAccount.LocalSystem; // The services are started automatically.
serviceInstaller.StartType = ServiceStartMode.Automatic; // ServiceName must equal those on ServiceBase derived classes.
serviceInstaller.ServiceName = "smartService"; // displayed in list
serviceInstaller.DisplayName = "smartService"; // Add installers to collection. Order is not important.
Installers.Add(serviceInstaller);
Installers.Add(processInstaller);
}
}
}
ms-help://MS.MSDNQTR.2003APR.1033/vbcon/html/vbtskinstallingserviceapplication.htm