使用api时出错 [英] Error while using the api

查看:83
本文介绍了使用api时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我们正在使用adcenter api根据某些条件启动/停止广告组。我们不时会收到一个错误,但是如果我们稍后再试它就行了......这是一个奇怪的错误,所以我们想知道它是否在adcenter的一边,或者你是否认为它是
in我们的网站以及我们可以采取哪些措施来避免它。


这是我们捕获的例外情况:


 


描述:
https://adcenterapi.microsoft.com/Api/Advertiser/V8/CampaignManagement/CampaignManagementService.svc
。这可能是由于在HTTPS情况下未使用HTTP.SYS正确配置服务器证书。这也可能是由客户端和服务器之间的安全绑定不匹配
引起的。



服务器堆栈跟踪:

在System.ServiceModel.Channels。

HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest请求,HttpAbortReason abortReason)


at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)


at System.ServiceModel .Channels.RequestChannel.Request(消息消息,TimeSpan超时)


在System.ServiceModel.Dispatcher.RequestChannelBinder.Request(消息消息,TimeSpan超时)


at System.ServiceModel.Channels.ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime operation,Object [] ins,Object [] outs,TimeSpan timeout)


at System.ServiceModel .Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime operation)


at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)



在[0]处重新抛出异常:

在D:\ Trabajo \ .FindReducedHomes中的FindReducedHomes.BusinessLogic.Data.AdCenterPromotionAd.GetCurrentPromotionStatus(Boolean forceSync) \\ Code \FindReducedHomes.BusinessLogic \Data\AdCenterPromotionAd.cs:第219行


在D:\ Trabajo中的FindReducedHomes.BusinessLogic.Data.Promotion.GetCurrentPromotionStatus(Boolean forceSync) \\ FINReducedHomes\Code\FindReducedHomes.BusinessLogic \Data\Promotion.cs:第58行


在FindReducedHomes.BusinessLogic.Data.Promotion.UpdateStatusAccordingToRules(FindReducedHomesEntities entity,Boolean forceSyncWithGoogle)中D:\ Trabajo \ .FindReducedHomes\Code \FindReducedHomes.BusinessLogic \Data \Promotion.cs:第37行


在FindReducedHomes.BusinessLogic.Managers.PromotionMgr.UpdateRealtorPromotionStatus(Int64) realtorId,Boolean forceSync)在D:\ Trabajo \ .FindReducedHomes \Code \ .Find ReducedHomes.BusinessLogic \ Managers \ PrromotionMgr.cs:第296行


>>>>>内部例外>>>>>

基础连接已关闭:发送时发生意外错误。

at System.Net.HttpWebRequest.GetResponse()

at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)


>>>>>内部异常>>>>>

无法从传输连接读取数据:远程主机强行关闭现有连接。


在System.Net.Sockets.NetworkStream.Read(Byte []缓冲区,Int32偏移量,Int32大小)


在System.Net.FixedSizeReader .ReadPacket(Byte [] buffer,Int32 offset,Int32 count)


在System.Net.Security.SslState.StartReceiveBlob(Byte [] buffer,AsyncProtocolRequest asyncRequest)


at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message,AsyncProtocolRequest asyncRequest)


at System.Net.Security.SslState.StartSendBlob(Byte [] incoming,Int32 count,AsyncProtocolRequest asyncRequest)


在System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst,Byte [] buffer,AsyncProtocolRequest asyncRequest)


at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)


at System.Net.TlsStream.CallProcessAuthentication(Object state)

at System.Threading.ExecutionContext。 runTryCode(Object userData)
System.Runtime.CompilerS上的
ervices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code,CleanupCode backoutCode,Object userData)


at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext,ContextCallback callback,Object state)


在System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback callback,Object state,Boolean ignoreSyncCtx)


at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback)回调,对象状态)


在System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)

在System.Net.TlsStream.Write(Byte [] buffer,Int32偏移量,Int32大小)

在System.Net.PooledStream.Write(Byte []缓冲区,Int32偏移量,Int32大小)

在System.Net.ConnectStream.WriteHeaders(布尔异步)

>>>>>内部异常>>>>>

现有连接被远程主机强制关闭

在System.Net.Sockets.Socket.Receive(Byte []缓冲区,Int32偏移量,Int32大小,SocketFlags socketFlags)


在System.Net.Sockets.NetworkStream.Read(Byte []缓冲区,Int32偏移量,Int32大小)

解决方案

Hello Juan Andresm,


感谢您的耐心等待。


工程已确认证书在adCenter端未过期。我们认为这是您环境中的一个问题。如果您仍然被阻止并继续看到此错误可能
我建议您通过访问此链接联系客户联系支持:


http://community.microsoftadvertising.com /Content/Support.aspx


希望这会有所帮助!


Ricky :-)


Hi,

We are using the adcenter api to start/stop adgroups based on some conditions. From time to time we get an error, but if we retry a bit later it works... Its kind of a weird error, so we would like to know if its on adcenter's side or if you think that its in our site and if there is something that we could do to avoid it.

This is the exception that we catch:

 

Description: An error occurred while making the HTTP request to https://adcenterapi.microsoft.com/Api/Advertiser/V8/CampaignManagement/CampaignManagementService.svc. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.

Server stack trace:
at System.ServiceModel.Channels.

HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.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.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at FindReducedHomes.BusinessLogic.Data.AdCenterPromotionAd.GetCurrentPromotionStatus(Boolean forceSync) in D:\Trabajo\FindReducedHomes\Code\FindReducedHomes.BusinessLogic\Data\AdCenterPromotionAd.cs:line 219
at FindReducedHomes.BusinessLogic.Data.Promotion.GetCurrentPromotionStatus(Boolean forceSync) in D:\Trabajo\FindReducedHomes\Code\FindReducedHomes.BusinessLogic\Data\Promotion.cs:line 58
at FindReducedHomes.BusinessLogic.Data.Promotion.UpdateStatusAccordingToRules(FindReducedHomesEntities entities, Boolean forceSyncWithGoogle) in D:\Trabajo\FindReducedHomes\Code\FindReducedHomes.BusinessLogic\Data\Promotion.cs:line 37
at FindReducedHomes.BusinessLogic.Managers.PromotionMgr.UpdateRealtorPromotionStatus(Int64 realtorId, Boolean forceSync) in D:\Trabajo\FindReducedHomes\Code\FindReducedHomes.BusinessLogic\Managers\PromotionMgr.cs:line 296
>>>>>Inner Exception>>>>>
The underlying connection was closed: An unexpected error occurred on a send.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
>>>>>Inner Exception>>>>>
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.TlsStream.CallProcessAuthentication(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
>>>>>Inner Exception>>>>>
An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

解决方案

Hello Juan Andresm,

Thank you for your patience.

Engineering has confirmed that certificates have not expired on adCenter end. We believe this to be an issue in your environment. If you are still blocked and continuing to see this error may I suggest you contact customer contact support by visiting this link:

http://community.microsoftadvertising.com/Content/Support.aspx

Hope this helps!

Ricky :-)


这篇关于使用api时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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