Network Real-Time Congestion (RTC) is a bottleneck that limits energy transfer from the generation units or up-grid to the loads. Some factors, such as intermittent generation of renewable resources and forced outages of generating units and load forecasting errors, can lead to Real-Time Congestion Management (RTCM) in a smart grid network. RTCM is a set of methods to eliminate congestion in real-time. To implement RTCM, some approaches can be employed, including network reconfiguration by Remote Control Switches (RCS), load shedding generation and up-grid power rescheduling. In this paper, a two-stage programming model is proposed to find the optimal solution for RTCM using the integration of reconfiguration and market-based approaches. Therefore, following the occurrence of congestion, at the first stage, microgrid central controller (MGCC) or central energy manager implements reconfiguration as the lowest-cost approach to mitigating RTC. The Soccer League (SL) algorithm is employed at the first stage to find the optimal network topology. Subsequently, based on the results obtained from the first stage, a programming model is applied at the second stage to completely eliminate the RTC. The proposed model minimizes a weighted objective function that includes the generation and up-grid rescheduling cost, load shedding cost, switching cost, and congestion clearing time. In order to model switching costs, a new index is defined to prevent risky switching and the depreciation caused by frequent switching. This index is determined based on the critical locations in the network and the age of RCSs. The numerical results demonstrate the efficacy of the proposed model.