
Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
|
28.07.2006, 13:38
|
|||
|---|---|---|---|
|
|||
Узнать адресс хоста |
|||
|
#18+
Подскажите как узнать адрес хоста на котором крутиться сервис типа http://212.12.12.12:8080/MyService Заранее благодарен. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
28.07.2006, 14:42
|
|||
|---|---|---|---|
|
|||
Узнать адресс хоста |
|||
|
#18+
public class Global { /// <summary> /// Returns application virtual path without ending slash. /// </summary> public static string AppPath { get { string appPath = HttpContext.Current.Request.ApplicationPath; return (appPath == "/") ? string.Empty : appPath; } } /// <summary> /// Returns application host name including scheme and port if need, without /// ending slash. /// </summary> public static string AppServer { get { Uri uri = HttpContext.Current.Request.Url; string scheme = uri.Scheme; string host = uri.Host; string port = (uri.IsDefaultPort) ? string.Empty : ":" + uri.Port; return string.Format("{0}://{1}{2}", scheme, host, port); } } /// <summary> /// Returns full web-path for current request, without ending slash. /// </summary> public static string AppFullPath { get { return (AppServer + AppPath); } } public static string AppPhysPath { get { return HttpContext.Current.Request.PhysicalApplicationPath; } } } - - - the truth is out there ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|

start [/forum/topic.php?fid=18&mobile=1&tid=1391221]: |
0ms |
get settings: |
8ms |
get forum list: |
14ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
171ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
20ms |
get tp. blocked users: |
1ms |
| others: | 202ms |
| total: | 430ms |

| 0 / 0 |
