Share with together

独乐乐不如众乐乐

博客园 首页 新随笔 联系 订阅 管理

“/”应用程序中的服务器错误。


此服务的安全设置需要“Anonymous”身份验证,但没有为承载此服务的 IIS 应用程序启用该身份验证。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.NotSupportedException: 此服务的安全设置需要“Anonymous”身份验证,但没有为承载此服务的 IIS 应用程序启用该身份验证。
源错误:

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:

[NotSupportedException: 此服务的安全设置需要“Anonymous”身份验证,但没有为承载此服务的 IIS 应用程序启用该身份验证。]
   System.ServiceModel.Activation.HostedAspNetEnvironment.ValidateHttpSettings(String virtualPath, Boolean isMetadataListener, Boolean usingDefaultSpnList, AuthenticationSchemes& supportedSchemes, ExtendedProtectionPolicy& extendedProtectionPolicy, String& realm) +198284
   System.ServiceModel.Channels.HttpChannelListener.ApplyHostedContext(String virtualPath, Boolean isMetadataListener) +104
   System.ServiceModel.Channels.HttpTransportBindingElement.BuildChannelListener(BindingContext context) +156
   System.ServiceModel.Channels.DatagramChannelDemuxer`2..ctor(BindingContext context) +110
   System.ServiceModel.Channels.ChannelDemuxer.GetTypedDemuxer(Type channelType, BindingContext context) +313
   System.ServiceModel.Channels.ChannelDemuxer.BuildChannelListener(BindingContext context, ChannelDemuxerFilter filter) +61
   System.ServiceModel.Channels.ChannelBuilder.BuildChannelListener() +73
   System.ServiceModel.Channels.ChannelBuilder.BuildChannelListener(MessageFilter filter, Int32 priority) +177
   System.ServiceModel.Security.SecuritySessionServerSettings.CreateInnerChannelListener() +297
   System.ServiceModel.Channels.SecurityChannelListener`1.InitializeListener(ChannelBuilder channelBuilder) +103
   System.ServiceModel.Channels.SymmetricSecurityBindingElement.BuildChannelListenerCore(BindingContext context) +1901
   System.ServiceModel.Channels.SecurityBindingElement.BuildChannelListener(BindingContext context) +353
   System.ServiceModel.Channels.Binding.BuildChannelListener(Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, BindingParameterCollection parameters) +166
   System.ServiceModel.Description.DispatcherBuilder.MaybeCreateListener(Boolean actuallyCreate, Type[] supportedChannels, Binding binding, BindingParameterCollection parameters, Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, ServiceThrottle throttle, IChannelListener& result, Boolean supportContextSession) +16563798
   System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo stuff, ServiceHostBase serviceHost, Uri listenUri, ListenUriMode listenUriMode, Boolean supportContextSession, IChannelListener& result) +583
   System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) +2020
   System.ServiceModel.ServiceHostBase.InitializeRuntime() +82
   System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +64
   System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +789
   System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +255
   System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +1172

[ServiceActivationException: 由于编译过程中出现异常,无法激活服务“/Service/Service.svc”。异常消息为: 此服务的安全设置需要“Anonymous”身份验证,但没有为承载此服务的 IIS 应用程序启用该身份验证。。]
   System.Runtime.AsyncResult.End(IAsyncResult result) +901424
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +178686
   System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +107

版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.237

posted on 2016-09-05 11:29  寒枫  阅读(636)  评论(0编辑  收藏  举报