フォームの送信ボタンをクリックすると、少数のユーザーのみでエラーが発生します。以下は例外です...
例外が発生しました: System.Web.HttpResponse.Redirect メッセージ: 値を null にすることはできません。パラメータ名: url ソース: System.Web スタック トレース: System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent) で
ユーザーが subit にヒットし、documentID を返す Web サービスを呼び出し、ユーザーをリダイレクトします。ドキュメントを開始するには、外部サイトに移動します..
これが私のコードです。URLをチェックして、URLがあることを確認しています
//If the document was successfully created then the user will be redirected to assure sign to immediately sign the document.
if (isSuccessfull)
{
//Re Directing the user to immediately sign the document. In assure sign it is called immediate presentment.
//ToDo: When testing change the ProductionBaseUrl to the SandBoxBaseURL
var redirectUrl =
documentNowSubmit.BuildDocuementSigningUrl(
ApplicationSettingsFactory.GetApplicationSettings().ProductionBaseUrl, ui_txtEmailAddress.Text,
documentResult[0].Id.ToString(),
documentResult[0].AuthToken.ToString(),
signatoryListQueryResult, string.Empty);
if (redirectUrl != string.Empty)
{
Response.Redirect(redirectUrl, false); //02/14/2013 Removed the end response true from the redirect.
//HttpContext.Current.ApplicationInstance.CompleteRequest(); //Added the complete request call..
}
else
{
throw new ArgumentNullException("redirectUrl", "User" + fullName + "-" + emailAddress + ": Document signing url is empty.");
}
}
else
{
var additionalInformation = "User name: " + userName + " Document Title: " + documentTitle +
" Template Id: " +
templateId;
throw new Exception(
"An error has occurred with the submission of your document. With the following additional information: " +
additionalInformation + " Please contact the service desk for additional help. " +
assureSignExceptionMsgs);
}
Application_Error の global.asax でエラーをキャッチしています。
常に LogAndClearException に入ります
//----------------------------------------------------------------------
// NAME: Application_Error
// CHANGE LOG:
// Date Programmer Description
//----------------------------------------------------------------------
//If the last error or associated base exception do not have value, exit immediately.
if (Server.GetLastError() == null)
{
return;
}
//Ignore 'A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll'
//This happens and is documented by Microsoft because the Server.End() is being called. This can happen when an unauthenticated user tries
//to access this site and the Response.Resirect is called or if a Response.Redirect is within a Try-Catch block.
if (Server.GetLastError().GetBaseException() is System.Threading.ThreadAbortException)
{
Server.ClearError();
return;
}
//Log the exception in addition to redirecting to the error page
LogAndClearException();
}
一部のユーザーがエラーを取得し、一部のユーザーがエラーを取得していない理由を理解できませんか?