{"id":194122,"date":"2013-09-17T17:14:03","date_gmt":"2013-09-17T13:14:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=194122"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=194122","title":{"rendered":"<span class=\"post_title\">\u041a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f RDweb \u0432 Windows Server 2008R2<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u043e\u043f\u0438\u043a\u0435 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f RDweb \u0434\u043b\u044f Windows Server 2008R2.<\/p>\n<p>  \u0414\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 Remote Desktop Services \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u044b\u043b\u0430 \u043f\u043e\u043b\u043d\u0430\u044f \u043d\u0435\u0440\u0430\u0437\u0431\u0435\u0440\u0438\u0445\u0430 \u0441 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438. <\/p>\n<p>  \u041f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u0441\u0442\u043e\u044f\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0440\u0442\u044b \u0438 \u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435\u0445 \u0447\u0435\u0440\u0435\u0437 Remote Desktop Gateway. \u041d\u043e \u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044e TS \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0445\u043e\u0442\u0435\u043b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u00ab\u043f\u0440\u043e\u0441\u0442\u043e\u00bb \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 RemoteApp \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0441\u0442\u044b\u043b\u044c.<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<h5> 0. \u0414\u0430\u043d\u043e<br \/>   <\/h5>\n<p>   \u0412 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0432\u0441\u0435 \u043f\u043e\u0440\u0442\u044b \u0431\u044b\u043b\u0438 \u0442\u0430\u043a\u0438\u043c\u0438:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u043e<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/043\/daf\/42a\/043daf42aee93b5a7fcbae7f76fcdcef.png\"\/>  <\/div>\n<\/div>\n<p>  \u0412 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c RDweb \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0445\u043e\u0441\u0442\u0430 \u0438\u043b\u0438 \u0430\u0434\u0440\u0435\u0441\u0430, \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e 2 \u0440\u0430\u0437\u0430 \u0432\u0432\u0435\u0441\u0442\u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0445\u043e\u0441\u0442\u043e\u043c.<\/p>\n<p>  \u0417\u0430\u0434\u0430\u0447\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0447\u0435\u0440\u0435\u0437 RD WebAccess, \u0447\u0435\u0440\u0435\u0437 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 Remote Desktop \u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0437\u0432\u043d\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0432 \u043e\u0444\u0438\u0441\u0435. \u041f\u0440\u0438\u0447\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0432 \u043a\u0443\u0440\u0441\u0435 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 IP \u0438\u043b\u0438 hostname. \u041d\u0430 \u0432\u044b\u0431\u043e\u0440 \u0435\u043c\u0443 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0435\u043c\u0443 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b. \u041c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u043a\u043e\u0432 \u0438 \u043e\u0442\u0432\u043b\u0435\u043a\u0430\u044e\u0449\u0438\u0445 \u043a\u043d\u043e\u043f\u043e\u043a. \u041f\u043e\u0445\u043e\u0436\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 SBS, \u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0435\u0433\u043e \u043d\u0430 2008R2 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. <\/p>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043f\u0440\u0430\u0432\u043a\u0435 \u0444\u0430\u0439\u043b\u0430 desktops.aspx, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u0421:\\windows\\web\\Rdweb\\pages\\en-US\\<\/p>\n<h5>1. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u043d\u0430 \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a:<\/h5>\n<p>  \u0412\u043c\u0435\u0441\u0442\u043e:   <\/p>\n<pre><code>&lt;input name=&quot;MachineName&quot; maxlength=&quot;255&quot; id=&quot;MachineName&quot; class=&quot;textInputField&quot; onfocusin=&quot;jscript:ClearTxt(this);&quot; onblur=&quot;jscript:checkLen(this, 0);&quot; type=&quot;text&quot; onkeydown=&quot;jscript:checkKey(this);&quot; onkeyup=&quot;jscript:checkLen(this, 1);&quot; \/&gt;  <\/code><\/pre>\n<p>  \u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c:   <\/p>\n<pre><code> &lt;select id=&quot;MachineName&quot; style=&quot;width: 270px&quot; name=&quot;MachineName&quot;&gt;  &lt;option value=ex2010.somertile.local&gt;Exchange&lt;\/option&gt;   &lt;option value=AD.somertile.local&gt;AD&lt;\/option&gt;   &lt;\/select&gt; <\/code><\/pre>\n<p>  \u0418 \u043d\u0438\u0436\u0435 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u00abdisabled\u00bb \u0438\u0437 ButtonConnect  <\/p>\n<pre><code>&lt;button type=&quot;button&quot; id=&quot;ButtonConnect&quot; name=&quot;ButtonConnect&quot; disabled class=&quot;formButton&quot; onclick=&quot;BtnConnect()&quot; accesskey=&lt;%=L_ConnectAccessKey_Text %&gt;&gt;&lt;%=L_ConnectLabel_Text %&gt;&lt;\/button&gt; <\/code><\/pre>\n<p>  \u0418 \u0434\u0430\u043b\u0435\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 GetParam \u043c\u0435\u043d\u044f\u0435\u043c <\/p>\n<pre><code>  switch(obj.tagName)                                 {                                     case &quot;SELECT&quot;:                                         return obj.selectedIndex;                                         break;                                     case &quot;INPUT&quot;:                                         if (obj.type == &quot;checkbox&quot;) return ((obj.checked) ? 1 : 0);                                         if (obj.type == &quot;hidden&quot;) return obj.value;                                         if (obj.type == &quot;text&quot;) return obj.value;                                         break;                                     default:                                         break;                                 }           <\/code><\/pre>\n<p>  \u041d\u0430 <\/p>\n<pre><code> switch(obj.tagName)                                 {                                     case &quot;SELECT&quot;:                                        return obj.options[obj.selectedIndex].value;                                        break;                                     default:                                         break;                                 }   <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u0442\u0430\u043a\u043e\u0435:   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/d6b\/c85\/593\/d6bc85593c42b39641a01f4c6d8e4ee7.png\"\/>  <\/div>\n<\/div>\n<p>  \u0421 \u0432\u044b\u0434\u0430\u0447\u0435\u0439 \u043a\u043e\u043c\u043f\u044c\u0442\u0435\u0440\u043e\u0432 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c. \u0418\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p>  \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 RemoteApp \u0438 RemoteDesktop \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e RemoteApp \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f RD \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0438 \u0442\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SSO(singl sing-on). \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 RemoteDestkop RDP \u0444\u0430\u0439\u043b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043b\u0435\u0442\u0443 \u0438 \u0441\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0443 \u043d\u0435\u0433\u043e \u043d\u0435\u0442\u0443, \u0447\u0442\u043e \u0432\u043b\u0435\u0447\u0435\u0442 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0432\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0434\u043e\u043c\u0435\u043d\\\u043b\u043e\u0433\u0438\u043d \u0432 \u044d\u0442\u043e\u0442 RDP \u0444\u0430\u0439\u043b. \u0427\u0442\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0438 \u043f\u043e\u043a\u0430\u0436\u0443.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041d\u0435\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/1a6\/65d\/992\/1a665d992702328728661b352039158c.png\"\/>  <\/div>\n<\/div>\n<p>  \u0412\u0441\u044f \u043c\u0430\u0433\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 BtnConnect()<\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440   <\/p>\n<pre><code>RDPstr += &quot;username:s:&quot;+&quot;&lt;%=strDomainUserName%&gt;&quot;+&quot;\\n&quot;; <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u0432\u0438\u0434\u0438\u043c \u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435? \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0447\u0435\u0440\u0442\u043e\u0432\u0449\u0438\u043d\u0443.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u0443\u0434\u0430 \u043f\u0440\u043e\u043f\u0430\u043b &#39;\\&#39;<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/4ee\/eed\/5e0\/4eeeed5e0db7f3c9131593341229f08c.png\"\/>  <\/div>\n<\/div>\n<p>  \u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u0434 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c:<\/p>\n<pre><code> public string strUserName = &quot;&quot;; <\/code><\/pre>\n<p>  \u0418 \u043d\u0438\u0436\u0435:<\/p>\n<pre><code>strUserName = strDomainUserName.Substring(strDomainUserName.LastIndexOf('\\\\') + 1); \/\/ Cut domain\\username to username <\/code><\/pre>\n<p>  \u0410 \u0432 BtnConnect() \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c:  <\/p>\n<pre><code>RDPstr += &quot;domain:s:somertile\\n&quot;; RDPstr += &quot;username:s:&quot;+&quot;&lt;%=strUserName%&gt;&quot;+&quot;\\n&quot;;  RDPstr += &quot;promptcredentialonce:i:1\\n&quot;;   \/\/use same creds for GW and host <\/code><\/pre>\n<p>  NB: \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u044d\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d:<\/p>\n<pre><code>&lt;% @Import Namespace=&quot;System.Data&quot; %&gt; &lt;% @Import Namespace=&quot;System&quot; %&gt; &lt;% @Import Namespace=&quot;System.ComponentModel&quot; %&gt; &lt;% @Import Namespace=&quot;System.Runtime.InteropServices&quot; %&gt; &lt;% @Import Namespace=&quot;System.Text&quot; %&gt; <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a \u2014 \u0434\u043e\u043c\u0435\u043d \u0438 \u043b\u043e\u0433\u0438\u043d \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0435\u0440\u043d\u043e.<br \/>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0438 \u0434\u043b\u044f GW \u0438 \u0434\u043b\u044f \u0445\u043e\u0441\u0442\u0430.<\/p>\n<h5> 3. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u2014 \u043f\u0440\u0430\u0432\u0430 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0442\u0430\u043d\u0446\u0438\u044f\u043c.<\/h5>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0432 \u0438\u0434\u0435\u0430\u043b\u0435 \u0432\u0441\u0435 \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 AD \u0438 \u043f\u0440\u0430\u0432\u0430, \u043d\u043e \u0432 \u0441\u0438\u043b\u0443 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0434\u0435\u043b\u0430\u043b XML \u0431\u0430\u0437\u0443 \u0432\u0438\u0434\u0430:<\/p>\n<pre><code>&lt;users&gt;     &lt;user username=&quot;administrator&quot;&gt;         &lt;host&gt;             &lt;hostname&gt;ex2010.somertile.local&lt;\/hostname&gt;             &lt;label&gt;Exchange&lt;\/label&gt;         &lt;\/host&gt;         &lt;host&gt;             &lt;hostname&gt;AD.somertile.local&lt;\/hostname&gt;             &lt;label&gt;AD&lt;\/label&gt;         &lt;\/host&gt;       &lt;\/user&gt; &lt;\/users&gt; <\/code><\/pre>\n<p>  \u0413\u0434\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u043e\u0433\u0438\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432.<\/p>\n<p>  \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c   <\/p>\n<pre><code> public struct ComputerHost     {         public string Hostname;         public string Label;     }\t <\/code><\/pre>\n<p>  \u0410 \u0442\u0430\u043a\u0436\u0435 \u043f\u0430\u0440\u0441\u0435\u0440 \u044d\u0442\u043e\u0433\u043e XML \u0431\u0430\u0437\u044b  <\/p>\n<pre><code>\tprivate System.Collections.ArrayList GetUserComputers(string username)         {             System.Collections.ArrayList hosts = new System.Collections.ArrayList();             System.Xml.XPath.XPathDocument xdoc = null;             System.Xml.XPath.XPathNavigator xnav = null;             System.Xml.XPath.XPathExpression xexp = null;             System.Xml.XPath.XPathNodeIterator xi = null;              try             {\t\t\t                 xdoc = new System.Xml.XPath.XPathDocument(Server.MapPath(&quot;users.xml&quot;));                 xnav = xdoc.CreateNavigator();                  xexp = xnav.Compile(string.Format(&quot;\/users\/user[@username=\\&quot;{0}\\&quot;]\/host&quot;, username.ToLowerInvariant()));                  xi = xnav.Select(xexp);                  while (xi.MoveNext())                 {                     ComputerHost h;                     h.Hostname = xi.Current.SelectSingleNode(&quot;.\/hostname&quot;).Value;                     h.Label = xi.Current.SelectSingleNode(&quot;.\/label&quot;).Value;                      \t\t\t\t\thosts.Add(h);                 }\t\t\t\t             }             catch (System.Xml.XmlException XmlEx)             {                 \/\/Do nothing             }             catch (Exception Ex)             {                 \/\/Do nothing             }             finally             { \t\t\t\t\/\/Do Nothing             }              return hosts;         }  <\/code><\/pre>\n<p>  \u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u043c\u0443 \u0441\u043f\u0438\u0441\u043a\u0443 \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0430:  <\/p>\n<pre><code>&lt;select id=&quot;MachineName&quot; style=&quot;width: 270px&quot; name=&quot;MachineName&quot;&gt; \t\t\t\t\t\t\t  \t\t\t\t\t\t\t\t    &lt;%   System.Collections.ArrayList computerHosts = GetUserComputers(strUserName);   foreach (ComputerHost h in computerHosts)   { \tResponse.Write(String.Format(&quot;\\t &lt;option value={1}&gt;{0}&lt;\/option&gt; \\r\\n&quot;, h.Label, h.Hostname));   }     %&gt;\t\t\t\t\t\t\t   &lt;\/select&gt; <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u2014 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u00ab\u043b\u0438\u0448\u043d\u0438\u0435\u00bb \u0441\u0441\u044b\u043b\u043a\u0438 \u0432 RDweb \u043d\u0430 RemoteApp, Configuration, Help. \u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c %L_Company_Text%. \u0412\u044b\u043d\u0435\u0441\u0442\u0438 \u043e\u0442\u0432\u043b\u0435\u043a\u0430\u044e\u0449\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u043e\u0434 \u043e\u043f\u0446\u0438\u0438.<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043a\u043b\u0438\u0435\u043d\u0442 \u0443\u0432\u0438\u0434\u0438\u0442 \u0441\u0430\u0439\u0442 \u0432 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435: <br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/dba\/f9f\/532\/dbaf9f532c5f72839b8916f90822ba8c.png\"\/><\/p>\n<p>  <\/p>\n<h5> 4.P.S. <\/h5>\n<p>  \u0412 RDP \u0444\u0430\u0439\u043b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0439 <br \/>  password 51:b:%hash%, <br \/>  \u0433\u0434\u0435 %hash% \u2014 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 crypt32.dll <br \/>  \u0412 <a href=\"http:\/\/www.remkoweijnen.nl\/blog\/2007\/10\/18\/how-rdp-passwords-are-encrypted\/\">\u044d\u0442\u043e\u043c<\/a> \u0431\u043b\u043e\u0433\u0435 \u043e\u043f\u0438\u0441\u0430\u043d \u043c\u0435\u0442\u043e\u0434 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 Delphi. <br \/>  \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0435\u0433\u043e \u0448\u0438\u0444\u0440\u0430\u0442\u043e\u0440 \u0438 \u044f\u0432\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044f \u043f\u0430\u0440\u043e\u043b\u044c \u0432 BtnConnect() \u043c\u043d\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u00ab\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043b\u0438\u043a\u0443\u00bb. \u0420\u0435\u0448\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0431\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d.<\/p>\n<p>  P.P.S. <br \/>  \u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u043c\u043d\u0435 \u0437\u0430\u0434\u0430\u0447\u0438. \u0421 asp.net \u0438 html \u0434\u0440\u0443\u0436\u0443 \u043c\u0430\u043b\u043e, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u043e\u043c \u0438 \u0447\u0442\u0435\u043d\u0438\u0435\u043c \u043c\u0430\u043d\u0443\u0430\u043b\u043e\u0432.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u043f\u043e\u0442\u0440\u0435\u0447\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0432\u0441\u0451 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043d\u0435 \u0437\u0440\u044f.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/194122\/\"> http:\/\/habrahabr.ru\/post\/194122\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u043e\u043f\u0438\u043a\u0435 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f RDweb \u0434\u043b\u044f Windows Server 2008R2.<\/p>\n<p>  \u0414\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 Remote Desktop Services \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u044b\u043b\u0430 \u043f\u043e\u043b\u043d\u0430\u044f \u043d\u0435\u0440\u0430\u0437\u0431\u0435\u0440\u0438\u0445\u0430 \u0441 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438. <\/p>\n<p>  \u041f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u0441\u0442\u043e\u044f\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0440\u0442\u044b \u0438 \u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435\u0445 \u0447\u0435\u0440\u0435\u0437 Remote Desktop Gateway. \u041d\u043e \u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044e TS \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0445\u043e\u0442\u0435\u043b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u00ab\u043f\u0440\u043e\u0441\u0442\u043e\u00bb \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 RemoteApp \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0441\u0442\u044b\u043b\u044c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-194122","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/194122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=194122"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/194122\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=194122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=194122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=194122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}