Magnetic structure and electronic transport in permalloy