Archive

Archive for October 7, 2008

How to get the URL on which the application is hosted

October 7, 2008 Imran Akram Leave a comment

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.