 




<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>If it has a plug, it&#039;s IT stuff &#187; Active Server Pages</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/it-support/tag/active-server-pages/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/it-support</link>
	<description></description>
	<lastBuildDate>Wed, 26 Nov 2008 09:46:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>[TLBAT] Intranet: upload files</title>
		<link>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-upload-files/</link>
		<comments>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-upload-files/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 07:22:03 +0000</pubDate>
		<dc:creator>alessandro.panzetta</dc:creator>
				<category><![CDATA[Active Server Pages]]></category>
		<category><![CDATA[Intranet]]></category>
		<category><![CDATA[Intranet portal]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-upload-files/</guid>
		<description><![CDATA[So here uit comes the first post in the Admin section of our Download Center! In order to have an upload feature in our administration section I used the Persist ASP Upload component that gave me a better control on the upload process. I know it&#8217;s not free but when I designed this project (about [...]]]></description>
				<content:encoded><![CDATA[<p>So here uit comes the first post in the Admin section of our Download Center!</p>
<p>In order to have an upload feature in our administration section I used the <a href="http://www.aspupload.com/download.html" title="Persist ASP Upload" target="_blank">Persist ASP Upload</a> component that gave me a better control on the upload process. I know it&#8217;s not free but when I designed this project (about 2002!!!)  this is what I used so if you prefer another component justuse your own <img src='http://itknowledgeexchange.techtarget.com/it-support/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>A file that we can now download for free is the <em>aspupload.inc</em> &#8230;you don&#8217;t even have to download it, just copy the code below and save it to your disc to a text file named <em>aspupload.inc</em></p>
<p><em><strong>=====CODE=====</strong></em></p>
<p><em>&lt;%</p>
<p>&#8216;    AspUpload Constants Include File</p>
<p>&#8216;    Copyright (c) Persits Software, Inc. All rights reserved.</p>
<p>&#8216; LogonUser&#8217;s Type Parameter<br />
const        LOGON_INTERACTIVE    = 2<br />
const        LOGON_NETWORK        = 3<br />
const        LOGON_BATCH            = 4<br />
const        LOGON_SERVICE        = 5</p>
<p>&#8216; Generic Access Types<br />
const        GENERIC_ALL            = &amp;H10000000<br />
const        GENERIC_EXECUTE        = &amp;H20000000<br />
const        GENERIC_WRITE        = &amp;H40000000<br />
const        GENERIC_READ        = &amp;H80000000</p>
<p>&#8216; Standard Access Types<br />
const        DELETE                = &amp;H00010000<br />
const        READ_CONTROL        = &amp;H00020000<br />
const        WRITE_DAC            = &amp;H00040000<br />
const        WRITE_OWNER            = &amp;H00080000<br />
const        WRITE_SYNCHRONIZE    = &amp;H00100000</p>
<p>&#8216; Specific Access Types for Files</p>
<p>const        FILE_GENERIC_READ        = &amp;H120089<br />
const        FILE_GENERIC_WRITE        = &amp;H120116<br />
const        FILE_GENERIC_EXECUTE    = &amp;H1200A0</p>
<p>const        FILE_READ_DATA            = &amp;H0001<br />
const        FILE_WRITE_DATA            = &amp;H0002<br />
const        FILE_APPEND_DATA        = &amp;H0004<br />
const        FILE_READ_EA            = &amp;H0008<br />
const        FILE_WRITE_EA            = &amp;H0010<br />
const        FILE_EXECUTE            = &amp;H0020<br />
const        FILE_READ_ATTRIBUTES    = &amp;H0080<br />
const        FILE_WRITE_ATTRIBUTES    = &amp;H0100</p>
<p>&#8216; File Attributes<br />
const        FILE_ATTRIBUTE_READONLY        = &amp;H1<br />
const        FILE_ATTRIBUTE_HIDDEN        = &amp;H2<br />
const        FILE_ATTRIBUTE_SYSTEM        = &amp;H4<br />
const        FILE_ATTRIBUTE_DIRECTORY    = &amp;H10<br />
const        FILE_ATTRIBUTE_ARCHIVE        = &amp;H20<br />
const        FILE_ATTRIBUTE_NORMAL        = &amp;H80<br />
const        FILE_ATTRIBUTE_TEMPORARY    = &amp;H100<br />
const        FILE_ATTRIBUTE_COMPRESSED    = &amp;H800</p>
<p>&#8216; Sort-by Attributes for Directory Collection.<br />
&#8216; These are NOT standard Windows NT constants<br />
const        SORTBY_NAME                =    1<br />
const        SORTBY_TYPE                =    2<br />
const        SORTBY_SIZE                =    3<br />
const        SORTBY_CREATIONTIME        =    4<br />
const        SORTBY_LASTWRITETIME    =    5<br />
const        SORTBY_LASTACCESSTIME    =    6</p>
<p>%&gt;</em><br />
<strong><em> =====END CODE=====</em></strong></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-upload-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[TLBAT] Intranet: The administration section</title>
		<link>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-administration-section/</link>
		<comments>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-administration-section/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 09:31:50 +0000</pubDate>
		<dc:creator>alessandro.panzetta</dc:creator>
				<category><![CDATA[Active Server Pages]]></category>
		<category><![CDATA[Intranet]]></category>
		<category><![CDATA[Intranet portal]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-administration-section/</guid>
		<description><![CDATA[In the previous posts I&#8217;ve described how to restrict the download of certain software packages by using the group membership in an Active Directory. As already anticipated the Download Center allows to download software from the closest intranet server (called Distribution Point) butthere&#8217;s also a section where we need to define the distribuition points, manage [...]]]></description>
				<content:encoded><![CDATA[<p>In the previous posts I&#8217;ve described how to restrict the download of certain software packages by using the group membership in an Active Directory.</p>
<p>As already anticipated the Download Center allows to download software from the closest intranet server (called Distribution Point) butthere&#8217;s also a section where we need to define the distribuition points, manage the replication between those, add and configure the software packages and so on.</p>
<p>In the next posts we will be covering all these matters so, as usual, stay tuned!!</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-administration-section/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[TLBAT] Intranet: request_package.asp</title>
		<link>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-request_packageasp/</link>
		<comments>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-request_packageasp/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 15:16:08 +0000</pubDate>
		<dc:creator>alessandro.panzetta</dc:creator>
				<category><![CDATA[Active Server Pages]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Intranet]]></category>
		<category><![CDATA[Intranet portal]]></category>
		<category><![CDATA[IT support]]></category>
		<category><![CDATA[self-service]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-request_packageasp/</guid>
		<description><![CDATA[In the previous post we have seen the code that stays behind the scenes and that checks if a user is allowed to download the file. But what happens if the user is not allowed to download the requested software? If you check the ASP code in my previous post you will see that there [...]]]></description>
				<content:encoded><![CDATA[<p>In the previous post we have seen the code that stays behind the scenes and that checks if a user is allowed to download the file. But what happens if the user is not allowed to download the requested software?</p>
<p>If you check the ASP code in my previous post you will see that there is a subroutine called <em>RequestPack</em> that accepts two parameters: <em>NEEDED_GROUP</em> and <em>FILE</em>. So whenever a user is not allowed there is an IF/THEN clause that, in case of not allowance to download a file, redirects the user to the <em>RequestPack</em> subroutine.</p>
<p><em><span>if Licensed = True then<br />
</span></em></p>
<p><em><span>Call GimmePack(FILE)<br />
</span></em></p>
<p><em><span>else<br />
</span></em></p>
<p><em><span>    Call RequestPack(NEEDED_GROUP, FILE)<br />
</span></em></p>
<p><span><em>End if</em><br />
</span></p>
<p>What the RequestPack will do is to redirect the user to a page called <strong><em>request_package.asp</em></strong> where he/she will be asked if they want to request access to this package, if yes an email will be sent to the Download Center administrator with all necessary information.</p>
<p>Here is the RequestPack routine, present in the <em>download_special.asp</em> page, that builds the link to the <em>request_package.asp</em> page:</p>
<p><em><span>Sub RequestPack(NEEDED_GROUP, FILE)<br />
</span></em></p>
<p><em><span>    Response.Redirect &#8220;request_package.asp?UserName=&#8221; &amp; UCase(USERID) &amp; &#8220;?Group=&#8221; &amp; NEEDED_GROUP &amp; &#8220;?File=&#8221; &amp; FILE &amp; &#8221; &#8221;<br />
</span></em></p>
<p><span><em>End Sub</em><br />
</span></p>
<p>Hereafter the code for the <em>request_package.asp</em> page, in the next post we will start seeing the Administration part of the Download Center where we can add/remove packages, define site&#8217; subnets, configure the replication between distribution points and so on so….stay tuned!!!</p>
<p><span><strong><em>======CODE======<br />
</em></strong></span></p>
<p><span><strong><em>&lt;%<br />
</em></strong></span></p>
<p><span><strong><em>USERID =  Request.querystring(&#8220;UserName&#8221;)<br />
</em></strong></span></p>
<p><span><strong><em>NEEDED_GROUP = Request.querystring(&#8220;Group&#8221;)<br />
</em></strong></span></p>
<p><span><strong><em>FILE = Request.querystring(&#8220;File&#8221;)<br />
</em></strong></span></p>
<p><span><strong><em>File1 = Split(FILE,&#8221;.&#8221;)<br />
</em></strong></span></p>
<p><span><strong><em>%&gt;<br />
</em></strong></span></p>
<p><span><strong><em>&lt;center&gt;&lt;hr width=50% color=006699&gt;&lt;font face=&#8221;Tahoma&#8221; color=&#8221;#006699&#8243;&gt; &lt;% response.write UCase(USERID) %&gt; requests &lt;% response.write UCase(File1(0)) %&gt;&lt;/center&gt;&lt;hr width=50% color=006699&gt;<br />
</em></strong></span></p>
<p><span><strong><em>&lt;!&#8211;webbot BOT=&#8221;GeneratedScript&#8221; PREVIEW=&#8221; &#8221; startspan &#8211;&gt;&lt;script Language=&#8221;JavaScript&#8221; Type=&#8221;text/javascript&#8221;&gt;&lt;!&#8211;<br />
</em></strong></span></p>
<p><span><strong><em>function FrontPage_Form1_Validator(theForm)<br />
</em></strong></span></p>
<p><span><strong><em>{<br />
</em></strong></span></p>
<p><span><strong><em>  if (theForm.Confirmation.value == &#8220;&#8221;)<br />
</em></strong></span></p>
<p><span><strong><em>  {<br />
</em></strong></span></p>
<p><span><strong><em>    alert(&#8220;Please enter a value for the \&#8221;Confirmation\&#8221; field.&#8221;);<br />
</em></strong></span></p>
<p><span><strong><em>    theForm.Confirmation.focus();<br />
</em></strong></span></p>
<p><span><strong><em>    return (false);<br />
</em></strong></span></p>
<p><span><strong><em>  }<br />
</em></strong></span></p>
<p><span><strong><em>  if (theForm.Confirmation.value.length &lt; 2)<br />
</em></strong></span></p>
<p><span><strong><em>  {<br />
</em></strong></span></p>
<p><span><strong><em>    alert(&#8220;Please enter at least 2 characters in the \&#8221;Confirmation\&#8221; field.&#8221;);<br />
</em></strong></span></p>
<p><span><strong><em>    theForm.Confirmation.focus();<br />
</em></strong></span></p>
<p><span><strong><em>    return (false);<br />
</em></strong></span></p>
<p><span><strong><em>  }<br />
</em></strong></span></p>
<p><span><strong><em>  if (theForm.Confirmation.value.length &gt; 3)<br />
</em></strong></span></p>
<p><span><strong><em>  {<br />
</em></strong></span></p>
<p><span><strong><em>    alert(&#8220;Please enter at most 3 characters in the \&#8221;Confirmation\&#8221; field.&#8221;);<br />
</em></strong></span></p>
<p><span><strong><em>    theForm.Confirmation.focus();<br />
</em></strong></span></p>
<p><span><strong><em>    return (false);<br />
</em></strong></span></p>
<p><span><strong><em>  }<br />
</em></strong></span></p>
<p><span><strong><em>  var checkOK = &#8220;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ&#8221;;<br />
</em></strong></span></p>
<p><span><strong><em>  var checkStr = theForm.Confirmation.value;<br />
</em></strong></span></p>
<p><span><strong><em>  var allValid = true;<br />
</em></strong></span></p>
<p><span><strong><em>  var validGroups = true;<br />
</em></strong></span></p>
<p><span><strong><em>  for (i = 0;  i &lt; checkStr.length;  i++)<br />
</em></strong></span></p>
<p><span><strong><em>  {<br />
</em></strong></span></p>
<p><span><strong><em>    ch = checkStr.charAt(i);<br />
</em></strong></span></p>
<p><span><strong><em>    for (j = 0;  j &lt; checkOK.length;  j++)<br />
</em></strong></span></p>
<p><span><strong><em>      if (ch == checkOK.charAt(j))<br />
</em></strong></span></p>
<p><span><strong><em>        break;<br />
</em></strong></span></p>
<p><span><strong><em>    if (j == checkOK.length)<br />
</em></strong></span></p>
<p><span><strong><em>    {<br />
</em></strong></span></p>
<p><span><strong><em>      allValid = false;<br />
</em></strong></span></p>
<p><span><strong><em>      break;<br />
</em></strong></span></p>
<p><span><strong><em>    }<br />
</em></strong></span></p>
<p><span><strong><em>  }<br />
</em></strong></span></p>
<p><span><strong><em>  if (!allValid)<br />
</em></strong></span></p>
<p><span><strong><em>  {<br />
</em></strong></span></p>
<p><span><strong><em>    alert(&#8220;Please enter only letter characters in the \&#8221;Confirmation\&#8221; field.&#8221;);<br />
</em></strong></span></p>
<p><span><strong><em>    theForm.Confirmation.focus();<br />
</em></strong></span></p>
<p><span><strong><em>    return (false);<br />
</em></strong></span></p>
<p><span><strong><em>  }<br />
</em></strong></span></p>
<p><span><strong><em>  return (true);<br />
</em></strong></span></p>
<p><span><strong><em>}<br />
</em></strong></span></p>
<p><span><strong><em>//&#8211;&gt;&lt;/script&gt;&lt;!&#8211;webbot BOT=&#8221;GeneratedScript&#8221; endspan &#8211;&gt;&lt;form method=&#8221;GET&#8221; action=&#8221;request_package.asp&#8221; onsubmit=&#8221;return FrontPage_Form1_Validator(this)&#8221; language=&#8221;JavaScript&#8221; name=&#8221;FrontPage_Form1&#8243;&gt;<br />
</em></strong></span></p>
<p><span><strong><em> &lt;p align=&#8221;center&#8221;&gt;&lt;font face=&#8221;Tahoma&#8221; color=&#8221;#006699&#8243;&gt;You are going to request the license for the software package &lt;b&gt;&lt;% response.write File1(0) %&gt;&lt;/b&gt; do you confirm the request?&lt;/font&gt;&lt;/p&gt;<br />
</em></strong></span></p>
<p><span><strong><em> &lt;p align=&#8221;center&#8221;&gt;<br />
</em></strong></span></p>
<p><span><strong><em> &lt;!&#8211;webbot bot=&#8221;Validation&#8221; s-display-name=&#8221;Confirmation&#8221; s-data-type=&#8221;String&#8221; b-allow-letters=&#8221;TRUE&#8221; b-value-required=&#8221;TRUE&#8221; i-minimum-length=&#8221;2&#8243; i-maximum-length=&#8221;3&#8243; &#8211;&gt;&lt;input type=&#8221;text&#8221; name=&#8221;Confirmation&#8221; size=&#8221;20&#8243; value=&#8221;Please type YES or NO&#8221; maxlength=&#8221;3&#8243;&gt;&lt;/p&gt;<br />
</em></strong></span></p>
<p><span><strong><em>  &lt;p align=&#8221;center&#8221;&gt;&lt;input type=&#8221;submit&#8221; value=&#8221;Submit&#8221; name=&#8221;B1&#8243;&gt;&lt;/p&gt;<br />
</em></strong></span></p>
<p><span><strong><em>&lt;/form&gt;<br />
</em></strong></span></p>
<p><span><strong><em>&lt;/font&gt;<br />
</em></strong></span></p>
<p><span><strong><em>&lt;%<br />
</em></strong></span></p>
<p><span><strong><em>if Request.querystring(&#8220;Confirmation&#8221;) = &#8220;Please type YES or NO&#8221; then<br />
</em></strong></span></p>
<p><span><strong><em>elseif Request.querystring(&#8220;Confirmation&#8221;) = &#8220;YES&#8221; then<br />
</em></strong></span></p>
<p><span><strong><em>    Set objEmail = CreateObject(&#8220;CDO.Message&#8221;)<br />
</em></strong></span></p>
<p><span><strong><em>    objEmail.From = download_center@mydomain.com &#8216;<span>BE SURE TO CHANGE THIS</span><br />
</em></strong></span></p>
<p><span><strong><em>    objEmail.To = &#8220;dloadcenter_admin@mydomain.com&#8221;&#8216;<span>BE SURE TO CHANGE THIS<br />
</span></em></strong></span></p>
<p><span><strong><em>    objEmail.Subject = &#8220;[Download Center 2.0] Package request from: &#8221;  &amp; UCase(USERID)<br />
</em></strong></span></p>
<p><span><strong><em>    BodyTxt = &#8220;The user &#8221; &amp; UCase(USERID) &amp; &#8221; must be added to &#8221; &amp; NEEDED_GROUP &amp; &#8221; group in order to be allowed to download &lt;b&gt;&#8221; &amp; FILE &amp; &#8220;&lt;/b&gt;&#8221; &amp; vcbcrlf<br />
</em></strong></span></p>
<p><span><strong><em>    objEmail.Textbody = BodyTxt &amp; &#8220;Please verify with the user&#8217;s manager to see if the user is allowed to download this software.&#8221;<br />
</em></strong></span></p>
<p><span><strong><em>    objEmail.Configuration.Fields.Item(&#8220;http://schemas.microsoft.com/cdo/configuration/sendusing&#8221;) = 2<br />
</em></strong></span></p>
<p><span><strong><em>    objEmail.Configuration.Fields.Item(&#8220;http://schemas.microsoft.com/cdo/configuration/smtpserver&#8221;) = &#8220;mail.lamrc.com&#8221;<br />
</em></strong></span></p>
<p><span><strong><em>    objEmail.Configuration.Fields.Item(&#8220;http://schemas.microsoft.com/cdo/configuration/smtpserverport&#8221;) = 25<br />
</em></strong></span></p>
<p><span><strong><em>    objEmail.Configuration.Fields.Update<br />
</em></strong></span></p>
<p><span><strong><em>    objEmail.Send<br />
</em></strong></span></p>
<p><span><strong><em>Else<br />
</em></strong></span></p>
<p><span><strong><em>    Response.redirect(&#8220;default.asp&#8221;)<br />
</em></strong></span></p>
<p><span><strong><em>End If<br />
</em></strong></span></p>
<p><span><strong><em>%&gt;&lt;head&gt;&lt;title&gt;..:: Download Center ::..&lt;/title&gt;&lt;/head&gt;<br />
</em></strong></span></p>
<p><span><strong><em>======END CODE======<br />
</em></strong></span></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-request_packageasp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[TLBAT] Intranet: an image is worth 1000 words!!</title>
		<link>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-an-image-is-worth-1000-words/</link>
		<comments>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-an-image-is-worth-1000-words/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 12:52:13 +0000</pubDate>
		<dc:creator>alessandro.panzetta</dc:creator>
				<category><![CDATA[Active Server Pages]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Intranet]]></category>
		<category><![CDATA[Intranet portal]]></category>
		<category><![CDATA[IT support]]></category>
		<category><![CDATA[Patch management]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-an-image-is-worth-1000-words/</guid>
		<description><![CDATA[Hi folks, I just found out that I had an image of the concept behind the Download Center so I think it&#8217;s much better to post it so this can clearly explain how the whole thing works…here it is!]]></description>
				<content:encoded><![CDATA[<p>Hi folks, I just found out that I had an image of the concept behind the Download Center so I think it&#8217;s much better to post it so this can clearly explain how the whole thing works…here it is!</p>
<p><img src="http://cdn.ttgtmedia.com/ITKE/uploads/blogs.dir/52/files/2008/09/diagram1.gif" alt="Download Center diagram" /></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-an-image-is-worth-1000-words/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[TLBAT] Intranet: the download_special.asp</title>
		<link>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-download_specialasp/</link>
		<comments>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-download_specialasp/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 12:36:44 +0000</pubDate>
		<dc:creator>alessandro.panzetta</dc:creator>
				<category><![CDATA[Active Server Pages]]></category>
		<category><![CDATA[Bandwidth]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Intranet]]></category>
		<category><![CDATA[Intranet portal]]></category>
		<category><![CDATA[IT support]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-download_specialasp/</guid>
		<description><![CDATA[So we&#8217;re finally at the &#8220;interesting&#8221; stuff: the page that checks if a user is allowed or not to download a certain package. As in previous posts in order to allow a user to download a certain file he/she must be a member of a given group; e.g. we want to restrict the downloads of [...]]]></description>
				<content:encoded><![CDATA[<p>So we&#8217;re finally at the &#8220;<em>interesting</em>&#8221; stuff: the page that checks if a user is allowed or not to download a certain package.</p>
<p>As in previous posts in order to allow a user to download a certain file he/she must be a member of a given group; e.g. we want to restrict the downloads of <strong><em>MySoftware.exe</em></strong> and make this available only to the members of the <strong><em>grp_MySoftware</em></strong> group. We defined then in our database that this file has the following entry:</p>
<blockquote><p>PackageDesc = &#8220;My beautiful software 1.0&#8243;</p>
<p>PackageName = &#8220;MySoftware.exe&#8221;</p>
<p>PackageType = &#8220;Special&#8221;</p>
<p>NeededGroup = &#8220;grp_MySoftware&#8221;</p></blockquote>
<p>The code that you find below will check if the user that is visiting the page is part of the grp_MySoftware group and, if successful, build the download link by redirecting him/her to the closest distribution point. Example <strong><em>http://192.168.xxx.1/files/MySoftware.exe</em></strong> where <strong><em>xxx</em></strong> is the subnet of the client visiting the page.</p>
<p>So now let&#8217;s see the code and remember to change the <strong><em>MyDomain = &#8220;contoso&#8221;</em></strong> to your domain name (E.g. if you have <em>mycompany.com</em> just type <em>mycompany</em>).</p>
<p>The code that follows is self-explanatory so just…read it and check the commented lines!</p>
<p><strong><em>&#8216;======CODE======<br />
</em></strong></p>
<p><span>&lt;!&#8211; #include file=&#8221;adovbs.inc&#8221; &#8211;&gt;<br />
</span></p>
<p><span>&lt;%<br />
</span></p>
<p><span>Session.Timeout=10<br />
</span></p>
<p><span>Dim NEEDED_GROUP<br />
</span></p>
<p><span>Dim SOURCE<br />
</span></p>
<p><span>Dim FILE<br />
</span></p>
<p><span>Dim MyDomain<br />
</span></p>
<p><span>&#8216;Dim USERID<br />
</span></p>
<p><span>FILE = Request.querystring(&#8220;file&#8221;)<br />
</span></p>
<p><span>USERID =  Request.querystring(&#8220;UserName&#8221;)<br />
</span></p>
<p><span>MyDomain = &#8220;contoso&#8221;<br />
</span></p>
<p><span>Dim Licensed<br />
</span></p>
<p><span>Set cnnSearch = Server.CreateObject(&#8220;ADODB.Connection&#8221;)<br />
</span></p>
<p><span>cnnSearch.Open &#8220;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&#8221; &amp; Server.Mappath(&#8220;db/downloads.mdb&#8221;) &amp; &#8220;;&#8221;<br />
</span></p>
<p><span>strSQL2 = &#8220;SELECT Packages.NeededGroup FROM Packages WHERE (((Packages.PackageName)=&#8217;&#8221; &amp; FILE  &amp; &#8220;&#8216;)) GROUP BY Packages.NeededGroup;&#8221;<br />
</span></p>
<p><span>Set rstSearch2 = cnnSearch.Execute(strSQL2)<br />
</span></p>
<p><span>Do While Not rstSearch2.EOF<br />
</span></p>
<p><span>   NEEDED_GROUP= rstSearch2.Fields(&#8220;NeededGroup&#8221;).Value<br />
</span></p>
<p><span>    rstSearch2.MoveNext<br />
</span></p>
<p><span>Loop<br />
</span></p>
<p><span>Call CheckGroup<br />
</span></p>
<p><span>Sub CheckGroup<br />
</span></p>
<p><span>Set objDictionary = CreateObject(&#8220;Scripting.Dictionary&#8221;)<br />
</span></p>
<p><span>set User = GetObject(&#8220;WinNT://&#8221; &amp; MyDomain &amp; &#8220;/&#8221; + USERID)<br />
</span></p>
<p><span>For Each Prop In User.groups<br />
</span></p>
<p><span>    if instr(Prop.Name,right(NEEDED_GROUP,3)) &gt; 0 then<br />
</span></p>
<p><span>        Licensed = True<br />
</span></p>
<p><span>    end if<br />
</span></p>
<p><span>Next<br />
</span></p>
<p><span>End Sub<br />
</span></p>
<p><span>if Licensed = True then<br />
</span></p>
<p><span>Call GimmePack(FILE)<br />
</span></p>
<p><span>else<br />
</span></p>
<p><span>    Call RequestPack(NEEDED_GROUP, FILE)<br />
</span></p>
<p><span>End if<br />
</span></p>
<p><span>&#8216; *** Get the visitor&#8217;s subnet<br />
</span></p>
<p><span>CLIENT_IP = Request.ServerVariables(&#8220;REMOTE_ADDR&#8221;)<br />
</span></p>
<p><span>SUBNET0 = Split(CLIENT_IP,&#8221;.&#8221;)<br />
</span></p>
<p><span>&#8216; *** Check the distribution point for the given subnet<br />
</span></p>
<p><span>strSQL = &#8220;SELECT Sites.Subnet, Sites.Distrib_Point FROM Sites WHERE (((Sites.Subnet)=&#8217;&#8221; &amp; SUBNET0(2) &amp; &#8220;&#8216;)) GROUP BY Sites.Subnet, Sites.Distrib_Point;&#8221;<br />
</span></p>
<p><span>Set rstSearch = cnnSearch.Execute(strSQL)<br />
</span></p>
<p><span>Do While Not rstSearch.EOF<br />
</span></p>
<p><span>    Session(&#8220;SOURCE&#8221;) = rstSearch.Fields(&#8220;Distrib_Point&#8221;).Value<br />
</span></p>
<p><span>    rstSearch.MoveNext<br />
</span></p>
<p><span>Loop<br />
</span></p>
<p><span>&#8216; *** Create the download link and redirect the by using the REFRESH metatag so the package automatically starts downloading<br />
</span></p>
<p><span>Sub GimmePack(FILE)<br />
</span></p>
<p><span>    DOWNLOAD_LINK = Session(&#8220;SOURCE&#8221;) &amp; FILE<br />
</span></p>
<p><span>    response.write &#8220;&lt;html&gt;&lt;head&gt;&lt;META http-equiv=&#8217;refresh&#8217; content=&#8217;3;URL=&#8221; &amp; DOWNLOAD_LINK &amp; &#8220;&#8216;&gt;&lt;title&gt;Download page for &#8221; &amp; FILE &amp; &#8220;&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&#8221;<br />
</span></p>
<p><span>    response.write &#8220;&lt;center&gt;&lt;FONT FACE=TAHOMA SIZE=2 COLOR=#006699&gt;You are registered to download &lt;b&gt;&#8221; &amp; FILE  &amp; &#8220;&lt;/b&gt;&lt;/FONT&gt;&lt;br&gt;&#8221;<br />
</span></p>
<p><span>    response.write &#8220;&lt;FONT FACE=TAHOMA SIZE=2 COLOR=#006699&gt;Your download should start in few seconds, if this doesn&#8217;t happen, click &lt;a href=&#8221; &amp; DOWNLOAD_LINK &amp; &#8220;&gt;HERE&lt;/a&gt;&lt;/b&gt; to download the file&lt;/FONT&gt;&lt;center&gt;&#8221;<br />
</span></p>
<p><span>    LogHit<br />
</span></p>
<p><span>End Sub<br />
</span></p>
<p><span>Sub LogHit<br />
</span></p>
<p><span>    CLIENT_IP = Request.ServerVariables(&#8220;REMOTE_ADDR&#8221;)<br />
</span></p>
<p><span>    Dim DB_CONNECTIONSTRING<br />
</span></p>
<p><span>    DB_CONNECTIONSTRING = &#8220;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&#8221; &amp; Server.Mappath(&#8220;db/hits.mdb&#8221;) &amp; &#8220;;&#8221;<br />
</span></p>
<p><span>    Dim objRecordset<br />
</span></p>
<p><span>    Set objRecordset = Server.CreateObject(&#8220;ADODB.Recordset&#8221;)<br />
</span></p>
<p><span>    strSQL = &#8220;SELECT * FROM downloads;&#8221;<br />
</span></p>
<p><span>    objRecordset.Open strSQL, DB_CONNECTIONSTRING, adOpenKeyset, adLockPessimistic, adCmdText<br />
</span></p>
<p><span>    objRecordset.AddNew<br />
</span></p>
<p><span>    objRecordset.Fields(&#8220;Package&#8221;) = FILE<br />
</span></p>
<p><span>    objRecordset.Fields(&#8220;UserName&#8221;) = USERID<br />
</span></p>
<p><span>    objRecordset.Fields(&#8220;IP_ADDR&#8221;) = CLIENT_IP<br />
</span></p>
<p><span>    objRecordset.Fields(&#8220;Date&#8221;) = Date<br />
</span></p>
<p><span>    objRecordset.Update<br />
</span></p>
<p><span>    objRecordset.Close<br />
</span></p>
<p><span>    Set objRecordset = Nothing<br />
</span></p>
<p><span>End Sub<br />
</span></p>
<p><span>Sub RequestPack(NEEDED_GROUP, FILE)<br />
</span></p>
<p><span>    Response.Redirect &#8220;request_package.asp?UserName=&#8221; &amp; UCase(USERID) &amp; &#8220;?Group=&#8221; &amp; NEEDED_GROUP &amp; &#8220;?File=&#8221; &amp; FILE &amp; &#8221; &#8221;<br />
</span></p>
<p><span>&#8216;    Session.Abandon<br />
</span></p>
<p><span>End Sub<br />
</span></p>
<p><span>%&gt;&lt;head&gt;&lt;title&gt;..:: Download Center ::..&lt;/title&gt;&lt;/head&gt;<br />
</span></p>
<p><strong><em>&#8216;======END CODE======<br />
</em></strong></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-download_specialasp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[TLBAT] Intranet: download.asp</title>
		<link>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-downloadasp/</link>
		<comments>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-downloadasp/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 10:13:34 +0000</pubDate>
		<dc:creator>alessandro.panzetta</dc:creator>
				<category><![CDATA[Active Server Pages]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Intranet]]></category>
		<category><![CDATA[Intranet portal]]></category>
		<category><![CDATA[IT support]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-downloadasp/</guid>
		<description><![CDATA[In this post we will build the page that downloads the packages that we have defined as: STANDARD, GOODIE or PATCH. These software packages are the ones that are available to all users in our domain so no special need is required except being a user in the domain. What the page will do is [...]]]></description>
				<content:encoded><![CDATA[<p>In this post we will build the page that downloads the packages that we have defined as: STANDARD, GOODIE or PATCH. These software packages are the ones that are available to all users in our domain so no special need is required except being a user in the domain.</p>
<p>What the page will do is to identify in which IP subnet the user is located and build the download URL relative to his or her site; this will save bandwidth and reduce download times for the users.</p>
<p>The page uses an ASP Server Variable that is used to obtain the client&#8217;s IP address and then compare this to our sites&#8217; definition in our database, indeed if we look at the code we will see the: <em><strong>Request.ServerVariables(&#8220;REMOTE_ADDR&#8221;)</strong><br />
</em>string, this variable is the IP address of the computer that is visiting the page.</p>
<p>As an example let&#8217;s consider the IP address 192.168.39.123, in this page we will check the 3<sup>rd</sup> octet of the IP address and compare it to our database; in this case the &#8220;39&#8243; part identifies the Italian site located in Milan so the final URL will be &#8220;<strong><em>http://iis_ita1/download/free/myfile.exe</em></strong> &#8221; where the <strong><em>myfile.exe</em></strong> is passed by the <strong><em>default.asp</em></strong> page.</p>
<p>The page then will also log the hit for the given file to the hits database; this is done by calling the LogHit subroutine.</p>
<p>The next post will discuss the SPECIAL packages where in order to be allowed to download a given file, the user is required to be member of a given domain group…stay tuned!!</p>
<p><span><em>&lt;!&#8211; #include file=&#8221;adovbs.inc&#8221; &#8211;&gt;<br />
</em></span></p>
<p><span><em>&lt;%<br />
</em></span></p>
<p><span><em>Dim cnnSearch<br />
</em></span></p>
<p><span><em>Dim rstSearch<br />
</em></span></p>
<p><span><em>Dim strDBPath<br />
</em></span></p>
<p><span><em>Dim strSQL<br />
</em></span></p>
<p><span><em>Dim strSearch<br />
</em></span></p>
<p><span><em>Dim SOURCE<br />
</em></span></p>
<p><span><em>Set cnnSearch = Server.CreateObject(&#8220;ADODB.Connection&#8221;)<br />
</em></span></p>
<p><span><em>cnnSearch.Open &#8220;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&#8221; &amp; Server.Mappath(&#8220;db/downloads.mdb&#8221;) &amp; &#8220;;&#8221;<br />
</em></span></p>
<p><span><em>FILE = Request.QueryString(&#8220;file&#8221;)<br />
</em></span></p>
<p><span><em>&#8216; *** Get the visitor&#8217;s subnet<br />
</em></span></p>
<p><span><em>CLIENT_IP = Request.ServerVariables(&#8220;REMOTE_ADDR&#8221;)<br />
</em></span></p>
<p><span><em>SUBNET0 = Split(CLIENT_IP,&#8221;.&#8221;)<br />
</em></span></p>
<p><span><em>&#8216; *** Check the distribution point for the given subnet<br />
</em></span></p>
<p><span><em>strSQL = &#8220;SELECT Sites.Subnet, Sites.Distrib_Point FROM Sites WHERE (((Sites.Subnet)=&#8217;&#8221; &amp; SUBNET0(2) &amp; &#8220;&#8216;)) GROUP BY Sites.Subnet, Sites.Distrib_Point;&#8221;<br />
</em></span></p>
<p><span><em>Set rstSearch = cnnSearch.Execute(strSQL)<br />
</em></span></p>
<p><span><em>Do While Not rstSearch.EOF<br />
</em></span></p>
<p><span><em>    SOURCE = rstSearch.Fields(&#8220;Distrib_Point&#8221;).Value<br />
</em></span></p>
<p><span><em>    rstSearch.MoveNext<br />
</em></span></p>
<p><span><em>Loop<br />
</em></span></p>
<p><span><em>&#8216; *** Create the download link and redirect the by using the REFRESH metatag so the package automatically starts downloading<br />
</em></span></p>
<p><span><em>DOWNLOAD_LINK = &#8220;http://&#8221; &amp; SOURCE &amp; &#8220;/download/free/&#8221; &amp; FILE<br />
</em></span></p>
<p><span><em>response.write &#8220;&lt;html&gt;&lt;head&gt;&lt;META http-equiv=&#8217;refresh&#8217; content=&#8217;3;URL=&#8221; &amp; DOWNLOAD_LINK &amp; &#8220;&#8216;&gt;&lt;title&gt;Download page for &#8221; &amp; FILE &amp; &#8220;&lt;/title&gt;&lt;/head&gt;&lt;body bgcolor=&#8217;#B1C9E9&#8242;&gt;&#8221;<br />
</em></span></p>
<p><span><em>response.write &#8220;&lt;br&gt;&lt;center&gt;&lt;font face=tahoma size=3 color=#006699&gt;Your download should start automatically in 3 seconds.&lt;br&gt; If the download doesn&#8217;t start, click &lt;b&gt;&lt;a href=&#8217;&#8221; &amp; DOWNLOAD_LINK &amp; &#8220;&#8216; style=&#8217;text-decoration:none&#8217;&gt; HERE&lt;/a&gt;&lt;/b&gt; to download the file you requested.&lt;/center&gt;&lt;/body&gt;&lt;/html&gt;&#8221;<br />
</em></span></p>
<p><span><em>&#8216; *** Free up some memory<br />
</em></span></p>
<p><span><em>Set rstSearch = Nothing<br />
</em></span></p>
<p><span><em>Set cnnSearch = Nothing<br />
</em></span></p>
<p><span><em>LogHit<br />
</em></span></p>
<p><span><em>Sub LogHit<br />
</em></span></p>
<p><span><em>    USERID = split(Request.ServerVariables(&#8220;LOGON_USER&#8221;),&#8221;\&#8221;)<br />
</em></span></p>
<p><span><em>    Dim DB_CONNECTIONSTRING<br />
</em></span></p>
<p><span><em>    DB_CONNECTIONSTRING = &#8220;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&#8221; &amp; Server.Mappath(&#8220;db/hits.mdb&#8221;) &amp; &#8220;;&#8221;<br />
</em></span></p>
<p><span><em>    Dim objRecordset<br />
</em></span></p>
<p><span><em>    Set objRecordset = Server.CreateObject(&#8220;ADODB.Recordset&#8221;)<br />
</em></span></p>
<p><span><em>    strSQL = &#8220;SELECT * FROM downloads;&#8221;<br />
</em></span></p>
<p><span><em>    objRecordset.Open strSQL, DB_CONNECTIONSTRING, adOpenKeyset, adLockPessimistic, adCmdText<br />
</em></span></p>
<p><span><em>    objRecordset.AddNew<br />
</em></span></p>
<p><span><em>    objRecordset.Fields(&#8220;Package&#8221;) = FILE<br />
</em></span></p>
<p><span><em>    objRecordset.Fields(&#8220;UserName&#8221;) = USERID(1)<br />
</em></span></p>
<p><span><em>    objRecordset.Fields(&#8220;IP_ADDR&#8221;) = CLIENT_IP<br />
</em></span></p>
<p><span><em>    objRecordset.Fields(&#8220;Date&#8221;) = Date<br />
</em></span></p>
<p><span><em>    objRecordset.Update<br />
</em></span></p>
<p><span><em>    objRecordset.Close<br />
</em></span></p>
<p><span><em>    Set objRecordset = Nothing<br />
</em></span></p>
<p><span><em>End Sub<br />
</em></span></p>
<p><span><em>%&gt;&lt;head&gt;&lt;title&gt;..:: EIT Download Center ::..&lt;/title&gt;&lt;/head&gt;<br />
</em></span></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-downloadasp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[TLBAT] Intranet : The home page</title>
		<link>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-home-page/</link>
		<comments>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-home-page/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 15:21:33 +0000</pubDate>
		<dc:creator>alessandro.panzetta</dc:creator>
				<category><![CDATA[Active Server Pages]]></category>
		<category><![CDATA[Admin tools]]></category>
		<category><![CDATA[Bandwidth]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Intranet]]></category>
		<category><![CDATA[Intranet portal]]></category>
		<category><![CDATA[IT support]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-home-page/</guid>
		<description><![CDATA[In this post I&#8217;ll present the home page and will explain how this works….so let&#8217;s play J First in order to have this working we need a file called adovbs.inc that can be downloaded here, this file contains all instructions for connecting to the database via ADO.The we need to download some images that will [...]]]></description>
				<content:encoded><![CDATA[<p>In this post I&#8217;ll present the home page and will explain how this works….so let&#8217;s play <span>J</span></p>
<p>First in order to have this working we need a file called <em>adovbs.inc</em> that can be <a href="http://alessandro.panzetta.googlepages.com/adovbs.zip" title="adovbs.inc zipped file">downloaded here</a>, this file contains all instructions for connecting to the database via ADO.The we need to download some images that will be used in the pages, the images are <a href="http://alessandro.panzetta.googlepages.com/images.zip" title="Images">available here</a>. So now go to the directorywhere your site will be hosted (E.g. <strong><em>c:\inetpub\wwwroot</em></strong>) and unzip images in a directory called <strong><em>images</em></strong>. Also create a folder named dbwhere you will save the downloads.mdb file that you created as in my previous post so in the end you will have a folder structure as follows:</p>
<p><em><strong>c:\inetpub\wwwroot\Download_Center</strong></em></p>
<p><em><strong>c:\inetpub\wwwroot\Download_Center\images</strong></em></p>
<p><em><strong>c:\inetpub\wwwroot\Download_Center\db</strong></em></p>
<p>Now we need to create our <strong><em>default.asp</em></strong> page, the code is at the bottom of this post. let&#8217;s discuss on this code.</p>
<p>It consists of some basic HTML that uses some internal subroutines to build 4 tables (<a href="http://cdn.ttgtmedia.com/ITKE/uploads/blogs.dir/52/files/2008/09/dload_center.png" target="_blank">see screen shot</a>) that contain: the software available to everyone, the software for users in given groups, the patches and the goodies.</p>
<p>In order to dynamically build these tables a subroutine called  <strong><em>DoTD </em></strong>is called, this subroutine accepts an option that specifies whic table must be built; possible values are  <strong><em>STANDARD, SPECIAL,PATCH, GOODIE</em></strong>.</p>
<p>In addition to this procedure there&#8217;s also a <em><strong>Counter</strong></em> subroutine that is called by the <em><strong>DoTD</strong></em> and that shows how many times the given package has been downloaded. In order fr this to work you need a <strong><em>hits.mdb</em></strong> file (<a href="http://alessandro.panzetta.googlepages.com/hits.mdb" title="Hits database">available here</a>) where the hits will be recorded; remember to save this file in the <em><strong>db</strong></em> directory.</p>
<p>Once you have finished downloading the files described above, create a new <strong><em>default.asp page</em></strong>  with the following code andsave it in the root folder of your website.</p>
<p>For now this is enough, in the next post I&#8217;ll describe the <strong><em>download_special.asp </em></strong>file  that is the one that checks if the user visiting the page is allowed to download a certain file or not&#8230;.stay tuned!!!</p>
<p><em><strong>&#8216;======================<br />
</strong></em></p>
<p><em><strong> &lt;%<br />
Session.Timeout=10<br />
USERID = split(Request.ServerVariables(&#8220;LOGON_USER&#8221;),&#8221;\&#8221;)<br />
%&gt;<br />
&lt;title&gt;..:: Download Center ::..&lt;/title&gt;<br />
&lt;body bgcolor=&#8221;#B1C9E9&#8243;&gt;</strong></em></p>
<p><em><strong>&lt;div align=&#8221;center&#8221;&gt;<br />
&lt;center&gt;</strong></em></p>
<p><em><strong>&lt;table border=&#8221;0&#8243; cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243; style=&#8221;border-collapse: collapse&#8221; bordercolor=&#8221;#111111&#8243; width=&#8221;90%&#8221;&gt;<br />
&lt;tr&gt;<br />
&lt;td width=&#8221;100%&#8221; background=&#8221;images/tile_sub.gif&#8221;&gt;<br />
&lt;p align=&#8221;center&#8221;&gt;&lt;b&gt;&lt;font face=&#8221;Tahoma&#8221; color=&#8221;#006699&#8243; size=&#8221;5&#8243;&gt;..:: Download Center ::..&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;</strong></em></p>
<p><em><strong>&lt;center&gt;&lt;font color=&#8221;#006699&#8243; size=&#8221;2&#8243; face=&#8221;Tahoma&#8221;&gt; &lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt; &lt;/font&gt;&lt;font size=&#8221;2&#8243; face=&#8221;Tahoma&#8221;&gt;<br />
&lt;a style=&#8221;text-decoration: none&#8221; title=&#8221;Click to see all the packages you have downloaded from this site&#8221; href=&#8221;MY_downloads.asp&#8221;&gt;&lt;font color=&#8221;#006699&#8243;&gt;<br />
Click here to view your Download History&lt;/font&gt;&lt;/a&gt;&lt;font color=&#8221;#006699&#8243;&gt;<br />
&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;&lt;/font&gt;&lt;/font&gt;&lt;/center&gt;&lt;br&gt;</strong></em></p>
<p><em><strong>&lt;table border=&#8221;0&#8243; cellspacing=&#8221;1&#8243; style=&#8221;border-collapse: collapse&#8221; bordercolor=&#8221;#111111&#8243; width=&#8221;90%&#8221; id=&#8221;AutoNumber2&#8243;&gt;<br />
&lt;tr&gt;<br />
&lt;td width=&#8221;100%&#8221;&gt;&lt;font face=&#8221;Tahoma&#8221; color=&#8221;#006699&#8243; size=&#8221;2&#8243;&gt;By clicking the &lt;b&gt;DOWNLOAD&lt;/b&gt; button you are automatically<br />
rerouted to the closest software distribution server. &lt;br&gt;<br />
Please try to avoid<br />
software downloads through RAS.&lt;/font&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/center&gt;<br />
&lt;/div&gt; &lt;table border=0 align=center cellspacing=10&gt;<br />
&lt;tr&gt;&lt;td valign=top&gt;<br />
&lt;table border=2 bordercolor=#006699 cellspacing=3 cellpadding=3 align=center&gt;<br />
&lt;tr&gt;&lt;td bgcolor=#006699 align=center background=&#8221;images/tile_sub.gif&#8221;&gt;<br />
&lt;font color=&#8221;#006699&#8243; size=&#8221;2&#8243; face=&#8221;Tahoma&#8221;&gt;&lt;b&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;<br />
No License Required &lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;<br />
&lt;td bgcolor=#006699 align=center background=&#8221;images/tile_sub.gif&#8221;&gt;&lt;b&gt;<br />
&lt;font size=&#8221;2&#8243; color=&#8221;#006699&#8243; face=&#8221;Tahoma&#8221;&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;<br />
&lt;/font&gt;&lt;/b&gt;&lt;font size=&#8221;2&#8243;&gt;&lt;b&gt;<br />
&lt;font face=Tahoma color=#006699&gt;Download&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;b&gt;&lt;font size=&#8221;2&#8243; color=&#8221;#006699&#8243; face=&#8221;Tahoma&#8221;&gt; &lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;<br />
&lt;td bgcolor=#006699 align=center background=&#8221;images/tile_sub.gif&#8221;&gt;&lt;b&gt;<br />
&lt;font size=&#8221;2&#8243; color=&#8221;#006699&#8243; face=&#8221;Tahoma&#8221;&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;<br />
&lt;/font&gt;&lt;/b&gt;&lt;font size=&#8221;2&#8243;&gt;&lt;b&gt;<br />
&lt;font face=Tahoma color=#006699&gt;Hits&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;b&gt;&lt;font size=&#8221;2&#8243; color=&#8221;#006699&#8243; face=&#8221;Tahoma&#8221;&gt; &lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;%<br />
Which = &#8220;Standard&#8221;<br />
DoTD<br />
%&gt;<br />
&lt;/table&gt;<br />
&lt;/td&gt;<br />
&lt;td valign=top&gt;<br />
&lt;table border=2 bordercolor=#006699 cellspacing=3 cellpadding=3 align=center&gt;<br />
&lt;tr&gt;&lt;td bgcolor=#006699 align=center background=&#8221;images/tile_sub.gif&#8221;&gt;<br />
&lt;font color=&#8221;#006699&#8243; size=&#8221;2&#8243; face=&#8221;Tahoma&#8221;&gt;&lt;b&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;<br />
License Required &lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;<br />
&lt;td bgcolor=#006699 align=center background=&#8221;images/tile_sub.gif&#8221;&gt;&lt;b&gt;&lt;font color=&#8221;#006699&#8243; size=&#8221;2&#8243; face=&#8221;Tahoma&#8221;&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt; Download &lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor=#006699 align=center background=&#8221;images/tile_sub.gif&#8221;&gt;&lt;b&gt;&lt;font color=&#8221;#006699&#8243; size=&#8221;2&#8243; face=&#8221;Tahoma&#8221;&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt; Hits &lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;%<br />
Which = &#8220;Special&#8221;<br />
DoTD<br />
%&gt;<br />
&lt;/table&gt;<br />
&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td valign=top&gt;<br />
&lt;table border=2 bordercolor=#006699 cellspacing=3 cellpadding=3 align=center&gt;<br />
&lt;tr&gt;&lt;td bgcolor=#006699 align=center background=&#8221;images/tile_sub.gif&#8221;&gt;<br />
&lt;font color=&#8221;#006699&#8243; size=&#8221;2&#8243; face=&#8221;Tahoma&#8221;&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt; &lt;b&gt;Patches<br />
&lt;/b&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;&lt;/font&gt;&lt;/td&gt;<br />
&lt;td bgcolor=#006699 align=center background=&#8221;images/tile_sub.gif&#8221;&gt;&lt;font color=&#8221;#006699&#8243; size=&#8221;2&#8243; face=&#8221;Tahoma&#8221;&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt; &lt;/font&gt;&lt;b&gt;<br />
&lt;font face=Tahoma color=#006699 size=2&gt;Download &lt;/font&gt;&lt;/b&gt;&lt;font color=&#8221;#006699&#8243; size=&#8221;2&#8243; face=&#8221;Tahoma&#8221;&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;&lt;/font&gt;&lt;/td&gt;<br />
&lt;td bgcolor=#006699 align=center background=&#8221;images/tile_sub.gif&#8221;&gt;&lt;font color=&#8221;#006699&#8243; size=&#8221;2&#8243; face=&#8221;Tahoma&#8221;&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt; &lt;/font&gt;&lt;b&gt;<br />
&lt;font face=Tahoma color=#006699 size=2&gt;Hits &lt;/font&gt;&lt;/b&gt;&lt;font color=&#8221;#006699&#8243; size=&#8221;2&#8243; face=&#8221;Tahoma&#8221;&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;%<br />
Which = &#8220;Patch&#8221;<br />
DoTD<br />
%&gt;<br />
&lt;/table&gt;<br />
&lt;/td&gt;<br />
&lt;td valign=top&gt;<br />
&lt;table border=2 bordercolor=#006699 cellspacing=3 cellpadding=3 align=center&gt;<br />
&lt;tr&gt;&lt;td bgcolor=#006699 align=center background=&#8221;images/tile_sub.gif&#8221;&gt;<br />
&lt;font color=&#8221;#006699&#8243; size=&#8221;2&#8243; face=&#8221;Tahoma&#8221;&gt;&lt;b&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt; Goodies &lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;<br />
&lt;td bgcolor=#006699 align=center background=&#8221;images/tile_sub.gif&#8221;&gt;&lt;b&gt;&lt;font color=&#8221;#006699&#8243; size=&#8221;2&#8243; face=&#8221;Tahoma&#8221;&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt; Download &lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;<br />
&lt;td bgcolor=#006699 align=center background=&#8221;images/tile_sub.gif&#8221;&gt;&lt;b&gt;&lt;font color=&#8221;#006699&#8243; size=&#8221;2&#8243; face=&#8221;Tahoma&#8221;&gt;&lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;<br />
Hits &lt;img border=&#8221;0&#8243; src=&#8221;images/dot.gif&#8221;&gt;&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;%<br />
Which = &#8220;Goodie&#8221;<br />
DoTD<br />
%&gt;<br />
&lt;/table&gt;<br />
&lt;/td&gt;&lt;/tr&gt;<br />
&lt;/table&gt;</strong></em></p>
<p><em><strong>&lt;%<br />
Sub DoTD()<br />
Dim cnnSearch<br />
Dim rstSearch<br />
Dim strDBPath<br />
Dim strSQL<br />
Dim strSearch<br />
Set cnnSearch = Server.CreateObject(&#8220;ADODB.Connection&#8221;)<br />
cnnSearch.Open &#8220;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&#8221; &amp; Server.Mappath(&#8220;db/downloads.mdb&#8221;) &amp; &#8220;;&#8221;<br />
strSQL = &#8220;SELECT * FROM Packages WHERE (((Packages.PackageType)=&#8217;&#8221; &amp; WHICH &amp; &#8220;&#8216;)) ORDER BY Packages.PackageName;&#8221;</strong></em></p>
<p><em><strong>Set rstSearch = cnnSearch.Execute(strSQL)<br />
Do While Not rstSearch.EOF<br />
Package = rstSearch.Fields(&#8220;PackageDesc&#8221;).Value<br />
File =  rstSearch.Fields(&#8220;PackageName&#8221;).Value</strong></em></p>
<p><em><strong>If WHICH = &#8220;Special&#8221; then<br />
response.write &#8220;&lt;tr&gt;&lt;td&gt;&lt;font face=tahoma color=#006699 size=1&gt;&lt;b&gt;&#8221; &amp; Package  &amp; &#8220;&lt;/td&gt;&lt;td&gt;&lt;a href=download_special.asp?File=&#8221; &amp; File &amp; &#8220;&amp;UserName=&#8221; &amp; USERID(1) &amp; &#8220;&gt;&lt;img border=0 src=images/downloadnow.gif alt=&#8217;This page may take some time to load due to the license checking procedures, please be patient.&#8217;&gt;&lt;/a&gt;&lt;/td&gt;&#8221;<br />
response.write Counter(File) &amp; &#8220;&lt;/tr&gt;&#8221;<br />
rstSearch.MoveNext</strong></em></p>
<p><em><strong>ElseIf WHICH = &#8220;Patch&#8221; then<br />
response.write &#8220;&lt;tr&gt;&lt;td&gt;&lt;font face=tahoma color=#006699 size=1&gt;&lt;img src=images/alert.gif&gt; &lt;b&gt;&#8221; &amp; Package  &amp; &#8220;&lt;/td&gt;&lt;td&gt;&lt;a href=download.asp?File=&#8221; &amp; File &amp; &#8220;&gt;&lt;img  border=0 src=images/downloadnow.gif alt=Please download/apply this Patch asap!&gt;&lt;/a&gt;&lt;/td&gt;&#8221;<br />
response.write Counter(File) &amp; &#8220;&lt;/tr&gt;&#8221;<br />
rstSearch.MoveNext<br />
Else<br />
response.write &#8220;&lt;tr&gt;&lt;td&gt;&lt;font face=tahoma color=#006699 size=1&gt;&lt;b&gt;&#8221; &amp; Package  &amp; &#8220;&lt;/td&gt;&lt;td align=center&gt;&lt;a href=download.asp?File=&#8221; &amp; File &amp; &#8220;&gt;&lt;img  border=0 src=images/downloadnow.gif alt=&#8217;This software is approved by EIT.&#8217;&gt;&lt;/a&gt;&lt;/td&gt;&#8221;<br />
response.write Counter(File) &amp; &#8220;&lt;/tr&gt;&#8221;<br />
rstSearch.MoveNext<br />
End if<br />
Loop</strong></em></p>
<p><em><strong>Set rstSearch = Nothing<br />
cnnSearch.Close<br />
Set cnnSearch = Nothing<br />
End Sub</strong></em></p>
<p><em><strong>Function Counter(FILENAME)<br />
Dim cnnSearch<br />
Dim rstSearch<br />
Dim strDBPath<br />
Dim strSQL<br />
Dim strSearch<br />
Set cnnSearch = Server.CreateObject(&#8220;ADODB.Connection&#8221;)<br />
cnnSearch.Open &#8220;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&#8221; &amp; Server.Mappath(&#8220;db/hits.mdb&#8221;) &amp; &#8220;;&#8221;<br />
strSQL = &#8220;SELECT Count(downloads.Package) AS HITS FROM downloads WHERE (((downloads.Package)=&#8217;&#8221; &amp; FILENAME &amp; &#8220;&#8216;));&#8221;<br />
Set rstSearch = cnnSearch.Execute(strSQL)</strong></em></p>
<p><em><strong>Do While Not rstSearch.EOF<br />
response.write &#8220;&lt;td align=center&gt;&lt;b&gt;&lt;font face=tahoma size=1 color=006699&gt;&#8221; &amp; rstSearch.Fields(&#8220;HITS&#8221;).Value &amp; &#8220;&lt;/font&gt;&lt;/td&gt;&#8221;<br />
rstSearch.MoveNext<br />
Loop</strong></em></p>
<p><em><strong>Set rstSearch = Nothing<br />
cnnSearch.Close<br />
Set cnnSearch = Nothing<br />
End Function</strong></em></p>
<p><em><strong>%&gt;</strong></em></p>
<p><em><strong>&#8216;======================<br />
</strong></em></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-home-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[TLBAT] Intranet: The database behind</title>
		<link>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-database-behind/</link>
		<comments>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-database-behind/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 13:11:32 +0000</pubDate>
		<dc:creator>alessandro.panzetta</dc:creator>
				<category><![CDATA[Active Server Pages]]></category>
		<category><![CDATA[Bandwidth]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Intranet]]></category>
		<category><![CDATA[Intranet portal]]></category>
		<category><![CDATA[IT support]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[self-service]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-database-behind/</guid>
		<description><![CDATA[As described in the last post, the Download Center relies on a Microsoft Access database that will be described in this post. So, first create a new MSAccess database and then create a table called &#8220;Packages&#8221; like the following: Packages ID PackageDesc PackageName PackageType NeededGroup ID:         Auto increment PackageDesc:    Contains a short description of the file [...]]]></description>
				<content:encoded><![CDATA[<p>As described in the last post, the Download Center relies on a Microsoft Access database that will be described in this post.</p>
<p>So, first create a new MSAccess database and then create a table called &#8220;<em>Packages</em>&#8221; like the following:</p>
<table border="0">
<tr>
<td colspan="5" valign="middle"><span><strong>Packages</strong></span></td>
</tr>
<tr>
<td valign="middle"><span><strong>ID</strong></span></td>
<td valign="middle"><span><strong>PackageDesc</strong></span></td>
<td valign="middle"><span><strong>PackageName</strong></span></td>
<td valign="middle"><span><strong>PackageType</strong></span></td>
<td valign="middle"><span><strong>NeededGroup</strong></span></td>
</tr>
</table>
<p><span><strong>ID</strong></span>:         Auto increment</p>
<p><span><strong>PackageDesc:    </strong>Contains a short description of the file (E.g. Microsoft FrontPage)<br />
</span></p>
<p><span><strong>PackageName:    </strong>Is the filename, avoid using spaces (E.g. &#8220;MSaccess.exe&#8221; better than &#8220;MS Access.exe&#8221;) because this will be used to construct the download link<br />
</span></p>
<p><span><strong>PackageType:    </strong>Can be <em>Special</em> or <em>Standard</em> or <em>Goodie. </em>Standard/Goodie will be available for download to everyone while Special will be only for the users that are members of given groups.<br />
</span></p>
<p><span><strong>NeededGroup:    </strong>In case of <em>Special</em> package the visiting user must be part of this group in order to download the package.<br />
</span></p>
<p><span>Then create another table called &#8220;Sites&#8221; as the following:<br />
</span></p>
<table border="0">
<tr>
<td colspan="3" valign="middle"><span><strong>Sites</strong></span></td>
</tr>
<tr>
<td valign="middle"><span><strong>Country</strong></span></td>
<td valign="middle"><span><strong>Subnet</strong></span></td>
<td valign="middle"><span><strong>Distrib_Point</strong></span></td>
</tr>
</table>
<p><strong>Country</strong>:    Short name of the Country (E.g. ITA=Italy, GER=Germany)</p>
<p><strong>Subnet</strong>:        The third octet of the country/site&#8217;s IP address range (E.g. ITA= 192.168.<span>39</span>.x)</p>
<p><strong>Distrib_Point</strong>:    The web server in the given country (E.g. <em>websrv_ITA</em>)</p>
<p>The first table will handle information on the packages themselves and whether they&#8217;re freely accessible or not; the second table instead will be used in order to redirect the user to his/her local web server in order to save bandwidth. This is applicable only in environments in which the IP subnets are correctly set for country level and where in every country or site there is a local IIS web site.</p>
<p>In the next post I&#8217;ll be showing you how to build the homepage for this site and the techniques used for it….keep on reading!</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-database-behind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[TLBAT] Intranet: The concept behind it</title>
		<link>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-concept-behind-it/</link>
		<comments>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-concept-behind-it/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 07:01:40 +0000</pubDate>
		<dc:creator>alessandro.panzetta</dc:creator>
				<category><![CDATA[Active Server Pages]]></category>
		<category><![CDATA[Admin tools]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Intranet]]></category>
		<category><![CDATA[IT support]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-concept-behind-it/</guid>
		<description><![CDATA[In this post I&#8217;ll explain how our Download Center will be constructed, how it works and what&#8217;s the idea behind it. The Download Center is a project I developed in the past for a company where I worked for; this project was a part of another part of the project that had two main goals: [...]]]></description>
				<content:encoded><![CDATA[<p>In this post I&#8217;ll explain how our Download Center will be constructed, how it works and what&#8217;s the idea behind it.</p>
<p>The Download Center is a project I developed in the past for a company where I worked for; this project was a part of another part of the project that had two main goals: first I was trying to reduce the overall cost of the IT department in Europe, the second was to improve the relationship the IT Department and the rest of the world, that&#8217;s to say The Users!</p>
<p>At that period the IT Dept. wasn&#8217;t seen very good because we were spending a lot of money for upgrades, technology changes and so on, this was resulting in a bad consideration of our department versus the users because they just thought &#8220;They are spending a lot of money with no real advantage and, above all, I have no visibility on how this budget is spent.&#8221;</p>
<p>By creating this project and others I was able to A) reduce IT costs by 20% (reduced telecommunication costs with another project) and B) Give the Users more control on their IT assets, expenses and have them do many things &#8220;self-service&#8221; resulting for us in a significant decrease of the customer calls and consequentially reducing the workload on the IT staff.</p>
<p>Ok, go ahead now and see why I created this project! The company had a lot or &#8220;road-runners&#8221; that means that many users were travelling a lot in Europe, Asia, US and most of them had no Administrative privileges at all so we had the need of providing them a tool that allowed to obtain the Company licensed software in the easiest, fastest way possible.</p>
<p>The Download Center is a set of ASP pages that relies on 2 Microsoft Access databases and the Domain users/groups membership to work.</p>
<p>The two databases were called <em>downloads.mdb</em> and <em>hits.mdb</em> (we&#8217;ll discuss later their table structure), while the Domain users/groups part was used to check whether the user visiting the page was entitled to download/install the given software. Let&#8217;s say: you need Microsoft Frontpage? You must be a member of the &#8220;<em>MSFrontPage</em>&#8221; security group.</p>
<p>In addition to this feature the Download Center is also capable of redirecting the users to the closes server possible so this also reduce the download times and costs because the road-runners where mainly connected in RAS and VPN from Hotels.</p>
<p>In the next post I&#8217;ll discuss more about the databases and the start page…keep on reading!</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-the-concept-behind-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[TLBAT] Intranet: Enumerate client computer groups and their members</title>
		<link>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-enumerate-client-computer-groups-and-their-members/</link>
		<comments>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-enumerate-client-computer-groups-and-their-members/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 15:34:28 +0000</pubDate>
		<dc:creator>alessandro.panzetta</dc:creator>
				<category><![CDATA[Active Server Pages]]></category>
		<category><![CDATA[Intranet portal]]></category>
		<category><![CDATA[IT support]]></category>
		<category><![CDATA[self-service]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-enumerate-client-computer-groups-and-their-members/</guid>
		<description><![CDATA[So here we are…on the field This is just a soft start, in this page we will create a page that shows the groups on the client computer that is surfing the ASP page and their relative members. First we need to understand that this will work only in an environment where the security has [...]]]></description>
				<content:encoded><![CDATA[<p>So here we are…on the field <span> <img src='http://itknowledgeexchange.techtarget.com/it-support/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span></p>
<p>This is just a soft start, in this page we will create a page that shows the groups on the client computer that is surfing the ASP page and their relative members.</p>
<p>First we need to understand that this will work only in an environment where the security has been correctly set and on the IIS server for the directory where we will store the ASP files, the anonymous authentication has been disabled and the Windows authentication enabled. This must be done otherwise the pages will be run with the <em>IUSR_xxxx</em> account that has no privilege on the computers, if we enable the Windows authentication instead, the pages will be run by the logged on User.</p>
<p>Here is our first ASP page, copy the text below and paste it to your<em> local_groups_members.asp</em> page in the folder for the self service portal and run it.</p>
<p>==================================</p>
<p><span>&lt;%@ language=&#8221;VBSCRIPT&#8221; %&gt;<br />
</span></p>
<p><span>&lt;%<br />
</span></p>
<p><span>Dim ComputerName<br />
</span></p>
<p><span>ComputerName = Request.ServerVariables(&#8220;REMOTE_HOST&#8221;)<br />
</span></p>
<p><span>%&gt;</span></p>
<p><span>&lt;html&gt;<br />
</span></p>
<p><span>&lt;head&gt;<br />
</span></p>
<p><span>&lt;meta name=&#8221;GENERATOR&#8221; content=&#8221;SAPIEN Technologies PrimalScript 3.1&#8243;&gt;<br />
</span></p>
<p><span>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=iso-8859-1&#8243;&gt;<br />
</span></p>
<p><span>&lt;title&gt;[&lt;% Response.Write ComputerName %&gt;] Local Groups and their members&lt;/title&gt;<br />
</span></p>
<p><span>&lt;/head&gt;<br />
</span></p>
<p><span>&lt;body&gt;<br />
</span></p>
<p><span>&lt;%<br />
</span></p>
<p><span>Set colGroups = GetObject(&#8220;WinNT://&#8221; &amp; ComputerName &amp; &#8220;&#8221;)<br />
</span></p>
<p><span>colGroups.Filter = Array(&#8220;group&#8221;)<br />
</span></p>
<p><span>Response.Write &#8220;&lt;font face=tahoma size=3&gt;&#8221;<br />
</span></p>
<p><span>Response.Write &#8220;Here is the list of the local Groups and their members for computer:&lt;b&gt;&#8221; &amp; ComputerName &amp; &#8220;&lt;/b&gt;&lt;br&gt;&lt;br&gt;&#8221;</span></p>
<p><span>Response.Write &#8220;&lt;table border=2 bordercolor=#006699&gt;&#8221; &amp; VbCrLf<br />
</span></p>
<p><span>For Each objGroup In colGroups<br />
</span></p>
<p><span>    Response.Write &#8220;&lt;tr&gt;&lt;td bgcolor=&#8217;#006699&#8242;&gt;&lt;font face=tahoma size=3 color=&#8217;white&#8217;&gt; &lt;b&gt;&#8221; &amp; objGroup.Name &amp; &#8220; &lt;/td&gt;&lt;/tr&gt;&#8221; &amp; VbCrLf<br />
</span></p>
<p><span>    For Each objUser in objGroup.Members<br />
</span></p>
<p><span>        Response.Write &#8220;&lt;tr&gt;&lt;td bgcolor=white&gt;&lt;font face=tahoma size=2 color=&#8217;#006699&#8242;&gt; &#8221; &amp; objUser.Name &amp; &#8220; &lt;/td&gt;&lt;/tr&gt;&#8221; &amp; VbCrLf<br />
</span></p>
<p><span>    Next<br />
</span></p>
<p><span>Next<br />
</span></p>
<p><span>Response.Write &#8220;&lt;/table&gt;&#8221; &amp; VbCrLf<br />
</span></p>
<p><span>%&gt;<br />
</span></p>
<p><span>&lt;/body&gt;<br />
</span></p>
<p><span>&lt;/html&gt;<br />
</span></p>
<p>==================================</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/it-support/tlbat-intranet-enumerate-client-computer-groups-and-their-members/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
