在WAS上托管WCF时出错

时间:2011-05-11 09:53:37

标签: asp.net wcf was wcf-hosting

我在Windows服务上托管我的WCF应用程序时收到此错误。该服务托管在服务器上,我想通过互联网访问它。所以我给了它网络服务许可。

Service cannot be started. System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL http://+:8085/lupload/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). ---> System.Net.HttpListenerException: Access is denied
   at System.Net.HttpListener.AddAllPrefixes()
   at System.Net.HttpListener.Start()
   at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
   --- End of inner exception stack trace ---
   at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
   at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
   at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
   at System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.HttpChannelListener.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(Tim...

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

1 个答案:

答案 0 :(得分:0)

NetworkService实际上是一个受限制的帐户,您需要使用相当于管理员帐户的LocalSystem。这将解决你的问题。