The uniform appears to be a WW2 German one, the cap has the early style small eagle on it, but the tunic lacks any insignia, and the cuff title appears blank. I have my theories, but I'd like to get more professional input on this photograph.
EDIT: back
I can not tell where the picture was taken, but maybe some hints can be helpful as well:
The uniform shows some deviations from a german military uniform of that period. There are no "Schulterklappen". These are lashes on the shoulder on which rank insignia would be fixed. Also, the uniform does not have any markings on the Kragenspiegel (collar). If this was an army uniform, it should have a symbol looking looking the roman numeral II. Also, the hat looks odd. The kokarde (the point in the middle) should be surrounded by oak leaves, which it is not.
In short, this seems to be something else than a german military uniform. It might be the uniform of a paramilitary formation (Freikorps). Of course, the quality of the image could be better, I might be mistaken on some points.
As to the location, the picture was probably taken in late autumn to early spring, as the tree in front seems not to have any leaves. The background could be in a lot of different places. The architecture looks to clean-cut to be truly old. I would guess that it is a castle that was reconstructed in the 19th century in a "gothic" style - but that is just a guess.
Do you any more clues?
there's a subreddit for things like this: /r/whereisthis