【发布时间】:2011-09-08 06:18:24
【问题描述】:
我创建了一个 Windows 服务,并将它安装在我的 PC 上。当我从控制面板单击启动服务时。然后我收到以下错误消息。
可能出了什么问题?
事件查看器中的错误消息:
Description:
Service cannot be started. System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://www.domain.in/MyServ.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChann...
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Service1" />
<EventID Qualifiers="0">0</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2011-06-04T05:21:43.000000000Z" />
<EventRecordID>38441</EventRecordID>
<Channel>Application</Channel>
<Computer>TaxSmart30</Computer>
<Security />
</System>
<EventData>
<Data>Service cannot be started. System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://www.mydomain.com/MyServ.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChann...</Data>
</EventData>
</Event>
【问题讨论】:
-
那么您是否查看了错误消息中的建议?这个网址好像不正确...
-
@Jon Skeet:非常感谢。是的,我更改了 URL,这个问题得到了解决。但是,此 Windows 服务仅在我将它安装在本地 PC 上时才有效,当我尝试在我的虚拟专用服务器上安装和运行它时它不起作用。有什么问题?
-
你说更改 URL 解决了一个问题,所以我猜你现在遇到了一个 不同 问题 - 但我们不知道那是什么。跨度>
-
@Jon Skeet:我正面临这个问题。我以前发布过这个问题。请参阅链接stackoverflow.com/questions/6201631/…。有什么问题?
-
我对另一个问题的答案没有什么要补充的。在这里讨论这个问题没有意义。
标签: .net .net-3.5 service windows-services