gpt4 book ai didi

.net - WCF代理提交崩溃-终止进程

转载 作者:行者123 更新时间:2023-12-03 17:42:59 24 4
gpt4 key购买 nike

我有一个简单的WCF服务,该服务接受一些数据(wsHttpBiding)并返回结果。在客户端,包含代理包装的dll被加载并用于构建/提交对服务的请求。

在大多数情况下,这种方法非常有效,但是对于少数用户而言,提交给客户端代理的调用会导致应用程序立即崩溃(没有错误,警告等,该过程会立即终止)

该问题似乎与用户Windows帐户有关:登录同一台计算机的不同用户没有遇到此问题。

寻找关于我可能会开始寻找罪魁祸首的想法。有什么想法吗?

编辑:

  • 我正在尝试获取一个包含一些跟踪语句的版本,并且现在将其错误登录到受影响的计算机中。 .submit调用周围没有try / catch,但是异常不应通过调用堆栈进行传播(客户端/代理dll被直接加载到主应用程序域中,但是其他任何异常(例如超时)都将被简单地传递回去。到预期的主机应用程序)
  • 服务器端的Web.Config如下
  • 用户与其他用户位于同一域中,正在使用默认凭据。在内部应用中,服务器位于同一网络上。

  • 服务Web.Config:
    <system.serviceModel>
    <behaviors>
    <serviceBehaviors>
    <behavior name="Services.EventsBehavior">
    <serviceMetadata httpGetEnabled="true" />
    <serviceDebug includeExceptionDetailInFaults="true" />
    <serviceThrottling maxConcurrentSessions="100" />
    </behavior>
    <behavior name="Services.LayoutsBehavior">
    <serviceMetadata httpGetEnabled="true" />
    <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
    </serviceBehaviors>
    </behaviors>
    <services>
    <service behaviorConfiguration="Services.EventsBehavior" name="Services.Events">
    <endpoint address="" binding="wsHttpBinding" contract="Services.IEvents">
    <identity>
    <dns value="localhost" />
    </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    <host>
    <timeouts openTimeout="00:00:45" />
    </host>
    </service>
    <service behaviorConfiguration="Services.LayoutsBehavior" name="Services.Layouts">
    <endpoint address="" binding="wsHttpBinding" bindingConfiguration="largeRequestMsg" contract="Services.ILayouts">
    <identity>
    <dns value="localhost" />
    </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    </service>
    </services>
    <bindings>
    <wsHttpBinding>
    <binding name="largeRequestMsg" maxReceivedMessageSize="5000000"></binding>
    </wsHttpBinding>
    </bindings>
    </system.serviceModel>

    更新:(2011/03/18)
    因此,我终于可以进行一些测试,但是不幸的是,无法使用客户端计算机上的测试工具重现该问题。

    这使我相信,调用我的客户端dll(通过COM)时发生了一些时髦现象,这是导致此问题的原因。

    有什么想法吗?

    最佳答案

    要获取更多信息,请尝试打开W​​CF跟踪,然后使用trace viwer实用工具
    如果源是WCF操作,则读取错误消息。
    here's有关如何执行此操作的链接,并不复杂。
    请注意,跟踪文件可能很大。不要继续跟踪超过
    您需要收集数据的时间。 (如果可能的话,开发机器是理想的选择)
    还有一件事,没有警告的立即崩溃,可能是因为该错误
    发生在GUI主线程以外的其他线程上。 (因此WCF call 确实是开始查找的地方)。

    关于.net - WCF代理提交崩溃-终止进程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4988718/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com