在 Silverlight 中尝试访问 RIA 服务端点时出错

发布于 2024-11-12 22:08:12 字数 2109 浏览 1 评论 0 原文

我创建了一个 Ria 服务端点。 Silverlight 将数据传递到 RIA 服务中。然后,端点将此数据写入/更新到文件系统。我们遇到以下异常:

System.ServiceModel.DomainServices.Client.DomainOperationException: 调用操作 “ModifyLogiDashletXmlFile”失败。 类型异常 'System.ServiceModel.DomainServices.Client.DomainOperationException' 被扔了。在 Phoenix.UI.SL.Infrastruct.Services.LogiReportService.<>c_DisplayClass8.b_7(InvokeOperation 操作)在 System.ServiceModel.DomainServices.Client.InvokeOperation.<>c_DisplayClass41.1 arg) at System.ServiceModel.DomainServices.Client.InvokeOperation`1.InvokeCompleteAction() 在 System.ServiceModel.DomainServices.Client.OperationBase.Complete(异常 错误)在 System.ServiceModel.DomainServices.Client.InvokeOperation.Complete(异常 错误)在 System.ServiceModel.DomainServices.Client.DomainContext.CompleteInvoke(IAsyncResult 异步结果)在 System.ServiceModel.DomainServices.Client.DomainContext.<>c_DisplayClass38.b__34(Object )

类上的属性:

[EnableClientAccess(RequiresSecureEndpoint = true)]
    [LinqToEntitiesDomainServiceDescriptionProvider(typeof(PhoenixEntities))] // IMPORTANT: Must have this because we are returning/passing EF Entities from Phoenix Context
    [RequiresAuthentication]
    public class LogiReportService : DomainService
    {
...

}

入口方法:

[Invoke]
public void ModifyLogiDashletXmlFile(IEnumerable<ParameterNameValuePair> paramNameValuePairs, Guid clientId, string dashletInstanceId)
{

    // Validate Client is has a valid relationship to the User (i.e. no disabled)
    if (this.PhoenixUser.MembershipClientIds.Contains(clientId))
    {
       ModifyLogiXmlFile(PhoenixUser.UserId, clientId.ToString(), dashletInstanceId, paramNameValuePairs);
    }
}

令人困惑的是其他端点工作正常。此端点与另一个端点之间的区别在于,此端点从文件系统写入和读取文件。应用程序域用户具有完全权限,返回的错误似乎不是权限问题。

欢迎所有想法。我在这个问题上碰壁了。

I created a Ria services endpoint. Silverlight passes data into the RIA Services. The end point then writes/updates this data to the file system. We are experiencing the following exception:

System.ServiceModel.DomainServices.Client.DomainOperationException:
Invoke operation
'ModifyLogiDashletXmlFile' failed.
Exception of type
'System.ServiceModel.DomainServices.Client.DomainOperationException'
was thrown. at
Phoenix.UI.SL.Infrastructure.Services.LogiReportService.<>c_DisplayClass8.<ModifyLogiDashletXmlFile>b_7(InvokeOperation
operation) at
System.ServiceModel.DomainServices.Client.InvokeOperation.<>c_DisplayClass41.<Create>b__0(InvokeOperation1 arg) at
System.ServiceModel.DomainServices.Client.InvokeOperation`1.InvokeCompleteAction()
at
System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception
error) at
System.ServiceModel.DomainServices.Client.InvokeOperation.Complete(Exception
error) at
System.ServiceModel.DomainServices.Client.DomainContext.CompleteInvoke(IAsyncResult
asyncResult) at
System.ServiceModel.DomainServices.Client.DomainContext.<>c
_DisplayClass38.<InvokeOperation>b__34(Object )

the attributes on the class:

[EnableClientAccess(RequiresSecureEndpoint = true)]
    [LinqToEntitiesDomainServiceDescriptionProvider(typeof(PhoenixEntities))] // IMPORTANT: Must have this because we are returning/passing EF Entities from Phoenix Context
    [RequiresAuthentication]
    public class LogiReportService : DomainService
    {
...

}

The entry method:

[Invoke]
public void ModifyLogiDashletXmlFile(IEnumerable<ParameterNameValuePair> paramNameValuePairs, Guid clientId, string dashletInstanceId)
{

    // Validate Client is has a valid relationship to the User (i.e. no disabled)
    if (this.PhoenixUser.MembershipClientIds.Contains(clientId))
    {
       ModifyLogiXmlFile(PhoenixUser.UserId, clientId.ToString(), dashletInstanceId, paramNameValuePairs);
    }
}

What's baffling is other endpoints work fine. The differences between this endpoint and the other is this one writes and reads files from the file-system. The app-domain user has full-rights and the error returned does not appear to be a permissions issue.

All idea's are welcomed. I'm hitting up against a wall with this issue.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

如歌彻婉言 2024-11-19 22:08:12

这个问题原来是服务器上的权限问题。正在将文件写入系统。

RIA 服务正在吞掉该错误并呈现一个通用错误。我在输入方法周围放置了一个 try catch 并将错误记录到数据库中。然后我就发现了真正的问题。

This issue turned out to be a permissions issue on the server. A file was being written to the system.

RIA services was swallowing the error and presenting a generic error in it's stead. I put a try catch around the entry method and logged the error to the database. Then I was able to discover the real issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文