In this paper, a generalized method for accurate full-wave analysis of shielded MIC's and the three-layer microstrip structure enclosed in a rectangular cavity based on Mixed Potential Integral Equation (MPIE) derived in real space have been developed. Method of moments (MoM) with Galerkin technique has been used for the solution of the integral equation to obtain the surface electric currents distribution on the conductors. An accurate de-embedding procedure for the characterizing electric currents distribution and extracting S parameters based on pencil of matrix technique are employed. A new numerical technique for fast convergence of the double infinite series expansion of the MoM solution has been considered. A computer program implementing the analysis has been written in Fortran on a personal computer. Several types of microstrip discontinuities such as Open-end, bend, collinear Broadside Coupled Line (BCL) and crossover is analyzed and numerical results are presented and compared with both previously published data and the results found by HP-HFSS software.