To study the changes in mechanical properties of materials within magnetic fields and the motion of dislocations, stress fields of dislocation in magnetic field need to be calculated. The straight edge dislocation is of basic importance in various defects . The stress field of straight edge dislocation in an external static magnetic field is determined by the theory of elasticity and electrodynamics according to the Volterra dislocation model for continuous media. This reduces to the known stress field when the magnet field is zero. The results can be used for further study on the strain energy of dislocations and the interactions between dislocations in magnetic fields.