Here, we present a stage-scanning two-photon microscope (2PM) equipped with a temporal pulse shaper and a spatial light modulator enabling full control over spectral and spatial phases of the exciting laser pulse. We demonstrate the capability of correcting wavefronts and temporal pulse distortions without cross-dependencies induced by optical elements at the same time enhancing the fluorescence signal. We implemented phase resolved interferometric spectral modulation for temporal pulse shaping and the iterative feedback adaptive compensation technique for spatial pulse modulation as iterative techniques. Sample distortions were simulated by cover glass plates in the optical path and by chirping the exciting laser pulses. Optimization of the spectral and spatial phases results in a signal increase of 30% and nearly complete recovery of the losses. Applying a measured spatial compensation phase within a real leaf sample shows the enhancement in contrast due to wavefront shaping with local fluorescence increase up to 75%. The setup allows full independent control over spatial and spectral phases keeping or improving the spatial resolution of our microscope and provides the optimal tool for sensitive non-linear and coherent control microscopy.