VS2008SP1+Silverlight3+WCF RIA Services Beta,Membership等已配置好。
RIA中方法XXX用了[RequiresAuthentication()]或[RequiresRole("SomeRole")]验证认证错误“Access denied to DomainOperationEntry 'XXX'”。
引起原因是在Silverlight的App.xaml.cs类中增加了输出详细错误信息的代码:
private void Application_Startup(object sender, StartupEventArgs e)
{
bool httpResutl = WebRequest.RegisterPrefix("http://", System.Net.Browser.WebRequestCreator.ClientHttp);
bool httpsResutl = WebRequest.RegisterPrefix("https://", System.Net.Browser.WebRequestCreator.ClientHttp);
}
屏蔽后,恢复正常。
参考RequiresAuthentication causes DomainServices to fail to load