Why does this code have no error when running in the visual program, but it gives an error in the host after publishing?