0
私はサードパーティアプリケーションで使用されているWeb API2アプリケーションを持っています。アプリケーションが私のエンドポイントにヒットすると、私のアプリケーションは認証のためにoAuthクレデンシャルを送信し、サードパーティのアプリケーションから結果を取得します。 リモートサーバーからエラーが返されました。(410)すべての失敗したトランザクションに対してが発生しています。残念ながら、私は私のアプリケーションを呼び出すときにこの問題を再現することができません。以下は私が使用しているコードです。このエラーの原因となっている問題は何ですか?リモートサーバーからエラーが返されました。(410)C#でなくなった
public async Task<customerModel> SendSigned(string url)
{
customerModel customermodel = null;
try
{
OAuthBase oauthBase = new OAuthBase();
string oAuthKey = ConfigurationManager.AppSettings["oAuthKey"];
string oAuthSecret = ConfigurationManager.AppSettings["oAuthSecret"];
string timestamp = oauthBase.GenerateTimeStamp();
string nonce = oauthBase.GenerateNonce();
string normalizedUrl;
string normalizedRequestParameters;
string sig = HttpUtility.UrlEncode(oauthBase.GenerateSignature(
new Uri(url), oAuthKey, oAuthSecret, string.Empty, string.Empty,
"GET", timestamp, nonce, out normalizedUrl, out normalizedRequestParameters));
string requestUrl = String.Format("{0}?{1}&oauth_signature={2}", normalizedUrl, normalizedRequestParameters, sig);
HttpWebRequest request = null;
request = (HttpWebRequest)HttpWebRequest.Create(requestUrl);
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
myXMLDocument = new XmlDocument();
customermodel = GetCustomerInformation(response);
}
return await Task.Run(() => customermodel);
}
catch (Exception ex)
{
_logger.Error("Error in SendSigned method", ex.InnerException);
return customermodel;
}
}
この問題は断続的にではなく、すべての時間が起こっているの