0

ライブアプリケーションでエラーが発生することがあります。

スタックトレース:

System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp、オブジェクト o、オブジェクト t 、EventArgs e) で System.Web.Util.CalliEventHandlerDelegateProxy.Callback(オブジェクト送信者、EventArgs e) で System.Web.UI.Control.OnLoad(EventArgs e) で System.Web.UI.Control.LoadRecursive() で System. Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

マシンでコードを実行しようと何度も試みましたが、同じエラーが発生しませんでした。

私はコードを生きていても、たまにこの問題が発生します。

RequestSender.aspx.cs の Page_Load コード:

protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                this.LoadRequest();
            }
        }
        catch (CustomException ex)
        {
            this.ShowMessage(ex.Message);
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }

LoadRequest() は次のとおりです。

private void LoadRequest()
    {
        Credential credential;


            if (
                !string.IsNullOrEmpty(Request["typeOfrequest"]) &&
                !string.IsNullOrEmpty(Request["empUserId"]) &&
                !string.IsNullOrEmpty(Request["applicationId"])
               )
            {
                // Get details of credentials
                credential = (new RequestManager()).GetCredential(this.EmpUserId, this.ApplicationId, (int)this.TypeOfrequest);
                this.applicaionRequest = new Request
                {
                    RequestType = this.TypeOfrequest,
                    RequestStatus = Enumerations.RequestStatus.Sent,
                    Application = credential.Application,

                    EmpUserId = credential.EmpUserId,
                    EmployeeId = credential.EmployeeId,
                    Username = credential.Username,

                    SenderAddress = Security.CurrentUser.Details.EmailAddress,
                    ReceiverAddress = (new Datastore.RequestStore()).GetReceiverAddress((int)this.TypeOfrequest, this.ApplicationId),
                    AddedBy = Security.CurrentUser.Details.UserId
                };
                    ucSendRequest.ApplicationRequest = applicaionRequest;

            }
            else
            {
                Response.Write("Invalid request!");
                Response.End();
            }
        }

    }
4

1 に答える 1

0

エラーは、smth がnullアプリケーションの実行中であることを明確に示しています。

nullヘルプを得るには、値を確認するか( RequestinLoadRequest()が適切な候補です)、catch ブログを変更してアプリケーションのクラッシュの原因となったパラメーターをログに記録する必要があります。

于 2013-02-25T10:25:13.310 に答える