Web-Http Adapter仍然不返回内部服务器错误的错误说明(500) [英] Web-Http Adapter still doesn't return Error Description for Internal Server Error (500)

查看:77
本文介绍了Web-Http Adapter仍然不返回内部服务器错误的错误说明(500)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我知道BizTalk 2016 CU1中有一个针对WebHttp适配器的修复程序让它现在选择了500个内部服务器错误并且它确实可以工作但似乎仍然有效缺少的是错误描述,在400范围内的其他错误中,当发送端口上的消息被暂停时,显示Api返回的错误描述
,但是如果是500,则仅显示此类错误。


System.Net.WebException:(500)内部服务器错误

    at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)


即使在Fiddler中,我也可以看到Api(在这种情况下是CRM Web Api) )已经返回错误描述,就像400范围的错误一样,但是适配器似乎没有选择并显示具有Suspended实例的事件(在事件日志中都没有)。超过
的例外是非常通用的,并没有说明为什么问题实际发生了,我们无法在我们的生产箱上运行Fiddler来查看问题究竟是什么。其他人遇到过这个问题?任何可能的解决方案?我正在复制完整的小提琴跟踪
以下的响应500以上的错误。


HTTP / 1.1 500内部服务器错误

缓存控制:无缓存

Pragma:no-cache

Content-Type:application / json; odata.metadata = minimal

到期:-1

服务器:Microsoft-IIS / 8.5

REQ_ID:3e219909-135c-41be-a2d2- 9a6a9ab51bca

OData-版本:4.0

X-AspNet-版本:4.0.30319

X-Powered-By:ASP.NET

日期:2017年8月23日星期三10:19:39 GMT

内容长度:3193

Set-Cookie:crmf5cookie =!1Gx5uwtUCR3upPbO / 8BTxBu52Tf9Z / KUeTpObsxKcIKU6EOcpirKhobDx8OY2zQ133j5j05WrSta8HA =;安全; path = /
$
Strict-Transport-Security:max-age = 31536000; includeSubDomains



{

  "错误":{

    "code":"","","消息":"具有属性值的记录Alt Key Contract Type Source Record Id已存在。实体键AltKeyContractTypeSourceRecordid_key要求这组属性包含
唯一值。选择唯一值,然后重试。","innererror":{

      " message":"具有属性值的记录Alt Key Contract Type Source Record Id已存在。实体键AltKeyContractTypeSourceRecordid_key要求这组属性包含唯一值。选择
唯一值,然后重试。","" type":"System.ServiceModel.FaultException`1 [[Microsoft.Xrm.Sdk.OrganizationServiceFault,Microsoft.Xrm.Sdk,Version = 8.0.0.0, Culture = neutral,PublicKeyToken = 31bf3856ad364e35]]"," stacktrace":"
 在Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Create(实体实体,CorrelationToken correlationToken,CallerOriginToken callerOriginToken,WebServiceType serviceType,Boolean checkAdminMode,Dictionary`2 optionalParameters)\\ nn 
at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.Create(实体实体)\\\\ n 在Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.CreateEdmEntity(CrmODataExecutionContext context,String edmEntityName,EdmEntityObject entityObject,
Boolean isUpsert)\\\\ n 在Microsoft.Crm.Extensibility.OData.EntityController.PostEntitySet(String entitySetName,EdmEntityObject entityObject)\\\\ n 在lambda_method(Closure,Object,Object [])\\\\ n 在System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor。<> c__DisplayClass10。< GetExecutor> b__9(对象
实例,Object [] methodParameters)\\\\ n 在System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance,Object [] arguments)\\\\ n 在System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext
controllerContext,IDictionary`2 arguments,CancellationToken cancellationToken)\\\\ nn --- ---从抛出异常的上一个位置开始的堆栈跟踪结束 - -\\\\
 在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\\\ n 在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务
任务)\\\\ n 在System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\\\\ n 在System.Web.Http.Controllers.ApiControllerActionInvoker。< InvokeActionAsyncCore> d__0.MoveNext()\\\\ n- ---从前一个位置开始的堆栈跟踪,其中抛出异常
--- \ r \ n 在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\\\ n 在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)\\\\ n 在System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\\\\ n
 在System.Web.Http.Controllers.ActionFilterResult。< ExecuteAsync> d__2.MoveNext()\\\\ nn ---从抛出异常的上一个位置开始的堆栈跟踪结束--- \\\\ n  ;在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\\\ n 
在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)\\\\ n 在System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\\\\ n 在System.Web.Http.Dispatcher.HttpControllerDispatcher。< SendAsync> d__1.MoveNext()"

  &NBSP; }¥b $ b  }
}




解决方案
查看&NBSP; HTTPS://cdijkgraaf.wordpress.com/2016/08/12/biztalk-2013-r2-known-bugs-issues-quirks/。在那篇文章中,Coen表示它已在CU5中修复为BizTalk 2013 R2。


Hi All,

I know there's a fix in BizTalk 2016 CU1 for WebHttp adapter that let's it pick 500 Internal Server Errors now and it does work but what still seems to be missing is the Error Description, in other errors in the 400 range, the error description returned by the Api are shown when message is suspended on the send port but in case of 500 it's like this only.

System.Net.WebException: (500) Internal Server Error
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)

Even though in Fiddler I can see that the Api (CRM Web Api in this case) has returned the error description like it does in case of 400 range of errors but Adapter doesn't seem to pick and display that with Suspended instance (neither in event log). Above exception is very generic and doesn't tell why the issue actually happened and we can't run Fiddler on our Production box to see what the issue actually was. Anyone else encountered this issue? Any possible resolutions for this? I am copying full fiddler traces of response below for above 500 error.

HTTP/1.1 500 Internal Server Error
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; odata.metadata=minimal
Expires: -1
Server: Microsoft-IIS/8.5
REQ_ID: 3e219909-135c-41be-a2d2-9a6a9ab51bca
OData-Version: 4.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 23 Aug 2017 10:19:39 GMT
Content-Length: 3193
Set-Cookie: crmf5cookie=!1Gx5uwtUCR3upPbO/8BTxBu52Tf9Z/KUeTpObsxKcIKU6EOcpirKhobDx8OY2zQ133j5j05WrSta8HA=;secure; path=/
Strict-Transport-Security: max-age=31536000; includeSubDomains

{
  "error":{
    "code":"","message":"A record that has the attribute values Alt Key Contract Type Source Record Id already exists. The entity key AltKeyContractTypeSourceRecordid_key requires that this set of attributes contains unique values. Select unique values and try again.","innererror":{
      "message":"A record that has the attribute values Alt Key Contract Type Source Record Id already exists. The entity key AltKeyContractTypeSourceRecordid_key requires that this set of attributes contains unique values. Select unique values and try again.","type":"System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]","stacktrace":"   at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Create(Entity entity, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, Dictionary`2 optionalParameters)\r\n   at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.Create(Entity entity)\r\n   at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.CreateEdmEntity(CrmODataExecutionContext context, String edmEntityName, EdmEntityObject entityObject, Boolean isUpsert)\r\n   at Microsoft.Crm.Extensibility.OData.EntityController.PostEntitySet(String entitySetName, EdmEntityObject entityObject)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
    }
  }
}


解决方案

See https://cdijkgraaf.wordpress.com/2016/08/12/biztalk-2013-r2-known-bugs-issues-quirks/. In that article Coen says it was fixed in CU5 for BizTalk 2013 R2 .


这篇关于Web-Http Adapter仍然不返回内部服务器错误的错误说明(500)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆