string part_path = @”http://” + Request.Url.Authority + “/” + Request.ApplicationPath + @”/print/”;
This gave me the path such as http://localhost/myVirtualDirectory/Print/
when I deployed the application it also worked by giving the appropriate website name instead of localhost.