This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - how to Get server url path in c# method...

raviraj - Monday, April 25, 2011 7:11 AM:

Hello All

I m trying to get the path of Server (i.e. server URL)  from C# Method,do  Anybody know this....Please Help.

 

 

Thanks and Regards

Raviraj



Gorinich - Tuesday, April 26, 2011 12:40 AM:

try to use

    System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"]

or 

    Request.Url.AbsoluteUri

    Request.Url.Host



raviraj - Tuesday, April 26, 2011 2:29 AM:

Thank you  Gorinich

thanks a lot. now i get Whole URL Using this code.