我有一个wcf
托管在 azure 中的 Web 角色,它具有添加、删除更新等的方法。当我单步执行代码vs2012
并调用 add 方法时,我收到一个 ProcessGetResponseWebException。
add 方法将作业对象作为参数。这是导致问题的唯一方法。任何没有作业对象作为参数的方法都可以正常工作。
该服务使用带有自定义用户名的消息安全性。这不是问题,因为我已经删除了它并且仍然有同样的问题,并且当安全性到位时其他方法也可以工作。
奇怪的是,如果我将客户端安装为服务并启动它,它一切正常,并且没有问题,只有在从 Visual Studio 运行时才会发生。我已经在另一台使用 Visual Studio 2010 的机器上尝试过这个,但它也不起作用。
当我从 vs 调用 add 方法然后登录到 azure 虚拟机时,我可以看到 IIS 正在使用 100% 的 cpu。
绑定是正确的,因为我已经完成了它们,所有消息大小都设置为最大值,超时设置为 10 分钟。我什至从正在运行的服务中复制了配置以防万一,但它仍然无法正常工作。
我更改了 add 方法以将字符串作为参数并且它可以工作,因此它与传递的作业对象有关,但无法弄清楚它是什么并且混淆了为什么它在作为服务安装时工作。
我启用了智能跟踪,但没有显示任何异常。
有人对我下一步可以尝试什么有任何建议吗?
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ClientReliableChannelBinder`1.RequestClientReliableChannelBinder`1.OnRequest(TRequestChannel channel, Message message, TimeSpan timeout, MaskingMode maskingMode)
at System.ServiceModel.Channels.ClientReliableChannelBinder`1.Request(Message message, TimeSpan timeout, MaskingMode maskingMode)
at System.ServiceModel.Channels.ClientReliableChannelBinder`1.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Security.SecuritySessionClientSettings`1.SecurityRequestSessionChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at MobileJobs.CloudService.IJobService.AddJob(Job newJob)
at MobileJobs.CloudService.JobServiceClient.AddJob(Job newJob) in