@JohnRennie, I guess it is not exactly 0 in real solenoid because in a real solenoid the point that magnetic field outside is exactly parallel to solenoid everywhere(that comes through the assumptions you mentioned) doesn't hold good?
i was going through some previous conversations in which you mentioned that the magnetic field outside a ideal solenoid is not exactly 0, but my book(Griffiths) proves it to be exactly 0, what is the inaccuracy in the proof.