Uknown Error after updating PayPalCoreSDK - paypal

I update the PayPalCoreSDK to the most recent version today because I was getting OAuth Errors. After I updated everything I continue to get an error but it is an undescriptive error. Below is the error that gets logged:
ERROR PayPal.Exception.PayPalException [(null)] Exception in HttpConnection Execute: The request was aborted: The request was canceled.
PayPal.Exception.PayPalException: Exception in HttpConnection Execute: The request was aborted: The request was canceled. ---> System.Net.WebException: The request was aborted: The request was canceled. ---> System.IO.IOException: Cannot close stream until all bytes are written.
at System.Net.ConnectStream.CloseInternal(Boolean internalCall, Boolean aborting)
--- End of inner exception stack trace ---
at System.Net.ConnectStream.CloseInternal(Boolean internalCall, Boolean aborting)
at System.Net.ConnectStream.System.Net.ICloseEx.CloseEx(CloseExState closeState)
at System.Net.ConnectStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.StreamWriter.Dispose(Boolean disposing)
at System.IO.TextWriter.Dispose()
at PayPal.HttpConnection.Execute(String payLoad, HttpWebRequest httpRequest)
The request is returning a bearer response. Anyone have any thoughts on how i can fix this?? I am currently using the Sandbox information.

Turns out there was a bug in the paypal SDK for something else i was trying to do with addresses array. PayPal finally emailed me about my ticket months after I reported the issue.

Related

Error sending message to Mule API from BizTalk

I am trying to post a message to Mule service, which is expected to respond with Success or Error Response. When I post a request directly to the Mule API using Postman, it gives a response as 200 with some HTML content. When I am pushing the same request with similar headers from BizTalk send port, I get the following error:
An error occurred while processing the message, refer to the details section for more information Message ID: {56AF4477-590F-415E-9D70-536692FE637C} Instance ID: {20EEC344-3B1A-474E-ACEB-160CBF616775} Error Description: System.ServiceModel.CommunicationException: An error occurred while receiving the HTTP response to https://. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult) at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult) --- End of inner exception stack trace --- at System.Net.Security._SslStream.EndRead(IAsyncResult asyncResult) at System.Net.TlsStream.EndRead(IAsyncResult asyncResult) at System.Net.Connection.ReadCallback(IAsyncResult asyncResult) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.ServiceModel.Channels.HttpChannelFactory1.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result) --- End of inner exception stack trace --- Server stack trace: at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result) 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 System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result) at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient2.RequestCallback(IAsyncResult result)
This call from the BizTalk interface to Mule API was working fine until yesterday.
I have tried using Fiddler to see the HTTP traffic from the BizTalk server. It shows the handshake with the Mule service, but no further information on headers or the request body.
Please help.
UPDATE
When I posted the request directly to the Mule Api from another machine, it gave a proper response. This seems like a network issue, some rules may have been modified to allow traffic from specific servers. Waiting for the network team to confirm.

HTTP status code for failed serialization

I have a GET /v2/developer/jhUxad8 endpoint which get developer from database and serialize it to json.
What http status code should I return when serialization fail?
https://www.codetinkerer.com/2015/12/04/choosing-an-http-status-code.html
What http status code should I return when serialization fail?
If I'm understanding you correctly, the server understands the request, and is trying to fulfill it, but because of a data problem is unable to do so.
500 Internal Server Error
The 500 (Internal Server Error) status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

WSO2 REST request box not working

I get the following error when I send a REST request with a request_box payload to WSO2 using WSO2 Tryit tool:
<axis2ns539:DataServiceFault xmlns:axis2ns539="http://ws.wso2.org/dataservice">
<axis2ns539:ds_code>UNKNOWN_ERROR</axis2ns539:ds_code>
This is what is echoed on the console:
[2017-12-08 20:01:22,939] [] ERROR - ServerWorker Error processing POST request for : /services/TestICM.HTTPEndpoint/request_box
org.apache.axis2.AxisFault: DS Fault Message: Input Message and request_box Axis Operation didn't match.
I tried also with Postman and got the same error.
Thank you very much

The remote server returned an error: (400) Bad Request Microsoft.AspNet.Membership.OpenAuth

I'm using Microsoft.AspNet.Membership.OpenAuth when I create a new asp.net webform .net 4.0 and I config AuthConfig.cs:
OpenAuth.AuthenticationClients.AddFacebook(
appId: "my appId",
appSecret: "my appSecret");
In Facebook app config:
Website with Facebook Login: http://www.tindep.com
But when I login with facebook it's error:
Server Error in '/' Application.
The remote server returned an error: (400) Bad Request.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The remote server returned an error: (400) Bad Request.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[WebException: The remote server returned an error: (400) Bad Request.]
System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +283
System.Net.WebClient.DownloadString(Uri address) +100
DotNetOpenAuth.AspNet.Clients.FacebookClient.QueryAccessToken(Uri returnUrl, String authorizationCode) +235
DotNetOpenAuth.AspNet.Clients.OAuth2Client.VerifyAuthentication(HttpContextBase context, Uri returnPageUrl) +142
DotNetOpenAuth.AspNet.OpenAuthSecurityManager.VerifyAuthentication(String returnUrl) +239
Microsoft.AspNet.Membership.OpenAuth.OpenAuthManager.VerifyAuthentication(HttpContextBase context, String returnUrl) +116
Microsoft.AspNet.Membership.OpenAuth.OpenAuth.VerifyAuthentication(String returnUrl) +82
EVNSoft.Website.Account.RegisterExternalLogin.ProcessProviderResult() +205
EVNSoft.Website.Account.RegisterExternalLogin.Page_Load() +24
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +9808229
System.Web.UI.Control.OnLoad(EventArgs e) +92
System.Web.UI.Control.LoadRecursive() +54
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18055
Although Google, Twitter, msdn login successful (Check tindep.com/Account/Login.aspx)
It's only error at hosting (tindep.com/Account/Login.aspx). localhost:57846/Account/Login.aspx login facebook success.
Please, help me find cause.
Thanks alot of!
There was a defect open related to this:
https://github.com/DotNetOpenAuth/DotNetOpenAuth/issues/203
but that library is apparently no longer being maintained:
https://github.com/DotNetOpenAuth/DotNetOpenAuth/issues/317#issuecomment-29580565
... although it is still referenced in many Microsoft documents. Investigating that related to another defect.
See also: facebook login using oauth fails on live server

CRM 4 email router error

I heed some help. We have na email router for CRM 4 for sending emails. All was fine till this week. It started to send this error and doing nothing.
Error message:
An error occurred while opening mailbox crmsupport#domainname.ua. Microsoft.Crm.Tools.Email.Providers.EmailException: The remote Microsoft Exchange e-mail server returned the error "(404) Not Found". This user or queue does not have a mailbox. Create a mailbox and try again. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Crm.Tools.Email.Providers.HttpDavRequest.SubmitXmlCommand(HttpWebRequest httpWebRequest, String body)
at Microsoft.Crm.Tools.Email.Providers.HttpDavRequest.RetrieveInboxUri()
at Microsoft.Crm.Tools.Email.Providers.ExchangeWebDavConnector.OpenMailbox()
at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.InitExchangeConnector()
--- End of inner exception stack trace ---
at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.WrapException(Exception e)
at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.InitExchangeConnector()
at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.OpenMailbox()
at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()\r\nSystem.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Crm.Tools.Email.Providers.HttpDavRequest.SubmitXmlCommand(HttpWebRequest httpWebRequest, String body)
at Microsoft.Crm.Tools.Email.Providers.HttpDavRequest.RetrieveInboxUri()
at Microsoft.Crm.Tools.Email.Providers.ExchangeWebDavConnector.OpenMailbox()
at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.InitExchangeConnector()
Thank you!!!