簡體   English   中英

Azure網站上的502 Bad Gateway錯誤

[英]502 Bad Gateway error on Azure website

我目前正在將新的支付系統(Trustly)整合到我的網站中。 這涉及向Trustlys服務器發送jsonstring。 這段代碼在本地完美運行,但在我的測試環境中,我發現了一個502錯誤的網關錯誤。 什么是奇怪的是應用程序似乎在try塊中打破,但下面的catch塊不會觸發。 考慮以下代碼:

        var postData = PrepJsonForTrustly(someSecretData);

        try
        {
            _logger.Info("attempting Deposit to trustly");  //this shows up in my logs
            var res = _client.Deposit(postData);
            _logger.Info("TrustlyDeposit successful"); //this doesn't
            return res;
        }
        catch (Exception ex)
        {
            _logger.Info("Failed Deposit to Trustly"); //and, oddly, neither does this!
            throw ex;
        }

谷歌這個問題我找到了這個http://blog.wouldbetheologian.com/2014/07/502-bad-gateway-error-on-azure-websites.html

這似乎描述了大多數相同的symtoms,除了我的代碼在localhost上完美運行,他描述的stackoverflowexception也會崩潰我的本地服務器。

什么想法可能導致這個? 或者為什么我的攔截塊沒有射擊?

丟失日志的可能解釋是,如果進程崩潰。 您是否檢查了eventlog.xml文件(在logFiles文件夾中) - 這是編寫應用程序事件日志的文件。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM