Wcf Ria 域服务的加载时间较长
简而言之,问题 我在调用域服务查询时遇到延迟(导致超时)。
我在做什么? 我有一个 Silverlight 4 应用程序。该应用程序很大程度上依赖于域服务。
复制 一切开始都很好。该应用程序加载并针对域服务 a-ok 运行身份验证。然后,我可以从“contactsdomainservice”加载“联系人”集合,而不会出现严重的滞后或挂断。
当我从“playersdomainservice”运行查询时出现问题。此服务与“contactsdomainservice”几乎相同。它甚至使用相同的 Linq-2-sql 数据上下文。 silverlight 发出请求,但是,直到客户端超时后,该请求才会到达服务。 (顺便说一句,该服务执行得很好)。
我的问题是。出了什么问题,如何调试它。
Fiddler 2 使用 fiddler 时,我使用 localhost.:6000 (我向本地主机添加一个句点)。当这样做时问题就消失了。
Wcf 跟踪 查看 Wcf 跟踪日志,玩家的请求和响应没有出现异常。请求/响应在 100 毫秒内执行。
也就是说,我确实在其他请求中看到了一些警告。
<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
<System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
<EventID>524312</EventID>
<Type>3</Type>
<SubType Name="Warning">0</SubType>
<Level>4</Level>
<TimeCreated SystemTime="2010-11-07T17:58:27.8435791Z" />
<Source Name="System.ServiceModel" />
<Correlation ActivityID="{5f3870a6-b186-43be-9aab-6f27044d653a}" />
<Execution ProcessName="WebDev.WebServer40" ProcessID="7424" ThreadID="8" />
<Channel />
</System>
<ApplicationData><TraceData><DataItem>
<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Warning">
<TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.EvaluationContextNotFound.aspx</TraceIdentifier>
<Description>Configuration evaluation context not found.</Description>
<AppDomain>4bf2d999-1-129336262987410584</AppDomain>
</TraceRecord>
</DataItem></TraceData></ApplicationData>
</E2ETraceEvent>
The Problem, in short
I am encountering lag (resulting in a time out) when calling a domain service query.
What am I doing ?
I have a Silverlight 4 application. The app depends heavily on Domain services.
Replication
Everything starts off fine. The app loads up and runs authentication against a domain service a-ok. I then can loads a collection of "contacts" from the "contactsdomainservice" without serious lag or hang ups.
The problem occurs when I run a query from the "playersdomainservice". This service is nearly identical to the "contactsdomainservice". It even uses the same Linq-2-sql data context. The silverlight sends out the request, however, the request does not reach the service until well after the client has already timed out. (the service executes perfectly btw).
My question is. What is broken, and how can I debug this.
Fiddler 2
When using fiddler i use localhost.:6000 (I add a period to the local host). When doing this the problem goes away.
Wcf Trace
Looking at the Wcf Trace logs, the player's request and responce apears with no anomolies. The request / responce execute in under 100ms.
That said, I do see some warnings in other requests.
<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
<System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
<EventID>524312</EventID>
<Type>3</Type>
<SubType Name="Warning">0</SubType>
<Level>4</Level>
<TimeCreated SystemTime="2010-11-07T17:58:27.8435791Z" />
<Source Name="System.ServiceModel" />
<Correlation ActivityID="{5f3870a6-b186-43be-9aab-6f27044d653a}" />
<Execution ProcessName="WebDev.WebServer40" ProcessID="7424" ThreadID="8" />
<Channel />
</System>
<ApplicationData><TraceData><DataItem>
<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Warning">
<TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.EvaluationContextNotFound.aspx</TraceIdentifier>
<Description>Configuration evaluation context not found.</Description>
<AppDomain>4bf2d999-1-129336262987410584</AppDomain>
</TraceRecord>
</DataItem></TraceData></ApplicationData>
</E2ETraceEvent>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论