0

how to get the absolute uri path (http://localhost/project/index.html instead of http://localhost).

WebRequest req=WebRequest.Create("h ttp://localhost");

. . . Console.WriteLine("absolute URL = " resp.ResponseUri)

here last line returns http://local host but I want the exact URL path that is http://localhost/index.html

Avijit Palit
  • 21
  • 1
  • 3
  • 7
    possible duplicate of http://stackoverflow.com/questions/3681052/get-absolute-url-from-relative-path-refactored-method – Tim Freese Oct 13 '15 at 15:30
  • You are getting into the different perception between client and server. The client does not know that the default page of the site is index.html. It may or may not have been a redirect or a default path scenario. – Sql Surfer Oct 14 '15 at 01:54

0 Answers0