【安装部署】Unhandled Error in Silverlight 2 Application Load operation failed for query 'Login'....

本文介绍了一个关于Silverlight应用程序的身份验证问题。该问题在部署到IIS后出现,表现为调用DomainServices时发生错误。文章详细分析了错误原因,并提供了解决方案,即调整IIS设置以使用单一认证方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

开发环境

  • Windows XP SP3
  • Visual Studio 2010
  • Silverlight 4
  • IIS 6.0 (Asp.net 4)

背景

http://code.msdn.microsoft.com/RiaServices上下载了 Authentication Quick Starts,用 Visual Studio 2010 打开解决方案,编译、运行,一切正常。把网站发布到 IIS 上,再次访问时出现以下异常信息。

------------------------

Web ページ エラーの詳細

ユーザー エージェント: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
タイムスタンプ: Fri, 11 Jun 2010 08:03:05 UTC


メッセージ: Unhandled Error in Silverlight 2 Application Load operation failed for query 'Login'. リモート サーバーが次のエラーを返しました: NotFound。   場所 System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)
   場所 System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.End(IAsyncResult result)
   場所 System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.<>c__DisplayClass1.<HandleAsyncCompleted>b__0(Object state)
   場所 System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.RunInSynchronizationContext(SendOrPostCallback callback, Object state)
   場所 System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.HandleAsyncCompleted(IAsyncResult asyncResult)
   場所 System.ServiceModel.DomainServices.Client.AsyncResultBase.Complete()
   場所 System.ServiceModel.DomainServices.Client.ApplicationServices.WebAuthenticationService.HandleOperationComplete(OperationBase operation)
   場所 System.ServiceModel.DomainServices.Client.LoadOperation.<>c__DisplayClass4`1.<Create>b__0(LoadOperation`1 arg)
   場所 System.ServiceModel.DomainServices.Client.LoadOperation`1.InvokeCompleteAction()
   場所 System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)
   場所 System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error)
   場所 System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
   場所 System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.<Load>b__17(Object )
ライン: 1
文字: 1
コード: 0

------------------------

以上是通过 JavaScript 获得的异常信息,基本上无法定位问题的原因。

 

分析

通过上述异常信息,只能够看出是调用 DomainServices 时发生了异常。为了获得详细的异常信息,必须直接访问 DomainServices,程序中的 DomainService 类名是 DefaultAuthSample.Web.AuthenticationService.svc,转换成 url 是 http://YourServer/DefaultAuthSample-Web-AuthenticationService.svc。访问后出现以下的错误信息:

------------------------

IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.

------------------------

看到这个异常信息,就无比的明了了

 

解决

在 IIS 中打开虚拟目录的属性页(见上图),把最下面一个 CheckBox 取消,然后重启 IIS 就可以了。

转载于:https://www.cnblogs.com/csharpstyle/archive/2010/06/11/1756448.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值