RSSAll Entries in the "Windows 2003 Server" Category

Windows server passive port range

Really quick one.

To set Windows server passive port range you should use adsutil.vbs which is one of the administration scripts located usually at: C:>\Inetpub\AdminScripts . I am saying usually as the Windows server installation could be on a different drive.

The issue with the Windows passive port range is that the default firewall (firewall.cpl) does not have option or field to open port range, and often when you setup FTP on your Windows server an try to connect with FTP client it may appear with error similar to this one bellow.


directory listing denied because of missing opened passive port range


As you can see from the log, you can connect to the server using FTP, but when you try to do something like listing directory content or copying files it times our. The reason is because the FTP client is trying to connect trough any opened port above 1024 one. (The usual default range is a big one. For example between 40000 and 45000)

You can add several ports manually, but if you have many FTP users, their FTP clients may exceed the port range number and will face the same issue as above. Try using this for testing purposes only (to make sure the issue is because passive port range is not set).

Manual setup of passive port range on windows firewall


To set passive FTP port range on a Windows server the command should be executed via the command line. So go to Start -> Run… type cmd and then:


The result should be similar to this one:

Passive port range sring

Once executed you should not have further issues with Passive mode using your FTP client.

Another method to enable Passive Port Range on Windows 2008 is to execute the following command:

It should return one big ‘OK’, and passive FTP access will be possible.


Log off user in Windows

This will be a quick one. There was inquiry from one of our visitors how to log off remote users on Windows server, and I will provide a quick example.

To have a view on the currently logged users, the best way will be trough the Task Manager. To open it remotely just right click on the Windows Task Bar.

Right click Windows Taskbar

Once the Task Manager is opened, click on the Users tab and you will find a list of the currently logged users.

Taks Manager currenlt logged users

Right-click and log off Windows user according to your needs.

Log off Windows user remotely.

You can log off remote user as well as the local ones.

Redirect domain alias to a particular folder in Windows

Often you may need some kind of redirection for your URL’s to a particular folder where you are going to use files and applications that differ from your main domain.
If fact this is often used in the search engine optimization for one or another purpose, or you can use it to cheat hosting companies if they are too expensive or with good quality, but small amount of present services.
No matter what are your intentions, in thit tutorial I will talk about redirecting domain alias to a particular folder under Windows.

Basically this is ASP script that checks what is the domain (Web server request) that the request is coming from and then using ‘if – then’ sequence it will be forwarded to a particular folder.

Let’s say you have ‘’ as your main domain and then you have ‘’ pointed to ‘’ as domain alias. (Referral tutorial is: Create domain alias in IIS on Windows server ).
Then you want this domain alias to open a different folder than the main domain and your visitors to remain with the filing that this is totally separated domain, as in the same time your are going to use the same hosing, the same server, and the same IP address.

Well, just check the next code (that I am using on one of my servers):

Set folder permissions on Windows server

In this tutorial we will set folder permissions in Windows server. This will help FTP Virtual directory to be accessed.

Go inside the folder locate a blank spot and click properties. In our case this will be:
C:\\Inetpub\\wwwroot\\ as on the picture below which is the root folder for FTP account that we created in Setup FTP for Web site in IIS on Windows-server.


Create and configure users in Windows Server

This tutorial will be about how to create and configure users in Windows Server. It will cover a requirement for folder access in setup FTP for Web site in IIS on Windows server tutorial.

Windows user can be created in the local management console under System Tools section, where Local Users and Groups is located. Expand it and click on Users. Then right-click somewhere on the filed and choose New User.

Setup FTP for Web site in IIS on Windows server

We have discussed how to setup a website in IIS, and now we will discuss a setup FTP for Web site in IIS on Windows server.
We will use the Default FTP site in IIS where will create so called Virtual Directory.

Click Start, click Programs, click Administrative Tools, and then click Internet Services Manager.

Preview website without IP change

You will find this tutorial about how to set IP address for a domain name (website) manually in hosts file on Windows useful in case you are transferring your domain from one company to another, and the domain is still not pointed to the new hosting IP address. Basically this will allow you to preview website without DNS change.
Another case is if you just want to domain name instead of IP address. We all know that is easiest to be remembered instead of (the IP of the hosting).
Certainly you just can do a joke with someone as setting often used domains like,, to point to a different IP address.
Here I will tell that this is common trick used by hackers to set (for example) to point to an IP on a server where exactly the same (as Yahoo’s) web page will be set, but the login form there will just still your password and generate error message line ‘Incorrect password’ and will forward you to the real website.

Anyway, how this can be done? How to preview website without IP change?

This can be done in a file called ‘hosts’, and all Windows OS’ are using it to define certain domains or IP addresses.

The mentioned file is always located into the ‘%SYSTEMROOT%\system32\drivers\etc’ folder. Usually this is ‘C:\WINDOWS\system32\drivers\etc’, but it depends on where your Windows is installed.

For example if you copy the next string:


And paste it into Windows Explorer like on the next picture, when you hit Enter, you will be directed to the ‘hosts’ file location.

Windows hosts file location

The address will be converted as per the Windows installation location C:\WINDOWS\system32\drivers\etc\.

Hosts file directory content

Now locate the file called ‘hosts’ and open it with your preferred text editor. My advice is to use Notepad to avoid any special characters in this file.

The Windows ‘hosts’ file content by default is:

As you can see this file describe itself, and what it is doing is the mappings of IP addresses to host names.

There is always one record for the local host and as you can see I have set up to point to a local IP address where I am running Web server.

If you open this domain in your browser, you will see the original website. In my case it will open a page which I am using for creating tutorials.
For example you can see how this trick is used in this tutorial:

Setup a website in IIS on Windows Server

Just add an entry to the hosts file and save it. Then all your browsers will open the new location allowing you to preview website without IP change, and all FTP clients, etc. will open it from the new IP address as well.

Setup a website in IIS on Windows Server

This tutorial will provide you with the step-by-step picture instructions how to setup a website in IIS on Windows Server.
I presume you have Windows Server installed already with IIS (Internet Information Service), so first log in log on to the Web server computer as an administrator either directly if you have access or via remote desktop.
Click Start, point to Settings, and then click Control Panel.
Click on Start – Administrative Tools, and then double-click Internet Services Manager.


Set an application folder in IIS on Windows server

This tutorial will show you how to set a folder as an application in IIS on Windows server.
Application folder is a folder from the web content with own web.config file which runs with different settings than the main web.config.

I presume you are familiar with IIS, so I will not explain IIS, application pool, etc.

Open IIS Manager. (for example: Start -> Run type there inetmgr), then click on the websites.
Click on desired website and go the folder which has to be created as an application folder.
Right click on that folder and then choose ‘Properties’.


ASP test mail script CDONTS – CDO for Windows Server

This tutorial will provide you with a test ASP CDONTS mail script which will help you to troubleshoot or just test whether the mail server is running fine on your Windows server.

Why the script is called CDONTS? Here is some description:

CDO (Collaborative Data Objects) is a programming interface from Microsoft for accessing MAPI-based e-mail, calendaring and scheduling servers. Originally called \"OLE Messaging\" and \"Active Messaging,\" CDO wraps the Enhanced MAPI library into a COM object that provides the ability to dynamically create Web pages. CDO is server oriented whereas MAPI has a client orientation.

CDONTS (CDO for Windows (NT) Server) is the SMTP version of CDO. It is widely used to send text e-mail and HTML-based e-mail from ASP pages. CDONTS was introduced with Internet Information Server 4 (IIS4) to make the Web server software fully Internet compliant.

Anyway, the script is written in one file which calls itself. It is divided in two parts – HTML form and ASP processor section.

Here is the form part(I keep it simple since I am using this only for testing purposes).