IIS

All posts tagged IIS

Are you almost finished with implementing Exchange, you install Groupshield and the authentication method used is changed. This is what I experienced today during an Exchange 2007 installation. The authentication method before the installation of Groupshield was mostly basic authentication and some integrated authentication.

Next you install Groupshield and after that it is not possible anymore to login with only the username and you will need to login as domain\username. Very strange because when I checked the Exchange Management Console and IIS everything was OK.

The only way to fix this issue is to change the authentication mode and then revert it back to the one you want.

Redirect port 80 to 443 with IIS

I think you may have needed it in the passed, you want to prevent that users can access a website on port 80 but also want to prevent they got an error displayed. The script below is the solution for this issue, it will redirect the user to the https version of the website.

The script can be placed in the root of the webserver in case of IIS this is wwwroot.

redirect.htm (bron)

<script language=”JavaScript”>function goElseWhere()

<!– begin hide

{

var oldURL = window.location.hostname + window.location.pathname;

var newURL = “https://” + oldURL;

window.location = newURL;

}

 

goElseWhere();

// end hide –>

</script>

The last step is to configure IIS to display this page instead of the default error page.

First how to do this in IIS 6.

Start the IIS Manager and get the properties of the default website. Select the tab called Custom Errors and search for HTTP error 403.4 .

When found select it and push the edit button, this will open the following window.

Select browse and search for the file redirect.htm which you have placed in the root of IIS. Click on OK to select the file and click on OK again to close the window above. A warning will be displayed that this error is also used by other virtual directories/websites. Click on JOK and restart IIS.

To change the custom error in IIS 7 you must follow the steps below.

Open the IIS Manager and select the Default Website, in the right part of the manager several icons are displayed.

Select the icon Error Pages, an overview of default error pages will be displayed. Right click somewhere on the white space en select add. The following window will be displayed.

Fill in the fields as specified below:

  • status code: 403.4
  • file path: %systemroot%\Inetpub\wwwroot\redirect.htm

Clickon OK and restart IIS.

When visiting the site http://webmail.domein.nl you will get redirected to https://webmail.domein.nl.

Event ID 2050 on CAS Server

I have been very busy this week so I did not had many time to blog. Yesterday and today I visited a forum to have a look for interesting issues. One item I found was about Event ID 2050 on a CAS server. When looking at the details of the event you will see the following:

Process IISIPMC4F9B6B7-0BB9-449F-99DA-B205432B1C43 -AP “MSEXCHANGEOWAAPPPOOL (PID=3404). The shared memory heap could not be created. This may be caused if physical memory limits have been exceeded. It may also be caused if too many other processes are running DSAccess. You may be able to resolve this error by restarting the Exchange server that logged this event

With this message you can go several ways so I started with googeling on the issue. You will discover soon that it has to do something with the application pool of IIS. As you can see in the event details it is the MSEXCHANGEOWAAPPPOOL. In this case the MSEXCHANGEOWAAPPPOOL didn’t ran under the correct account. It needs to run under the local system account so after correcting this it worked. Microsoft has published an KB article about this, below you will find the link.

open

OWA and ActiveSync won’t work anymore

Today I discovered a strange issue in my Exchange 2007 test environment both OWA and ActiveSync didn’t work anymore. A strange .NET error was displayed that if I wanted more info I needed to change a XML file. As I didn’t had changed many on the system I first looked if all services were running, this was the case. The next step was checking the event logs also there was nothing strange to find. The last step was IIS on first sight everything appeared to be OK but after investigating the .NET tab of the virtual folder OWA I discovered that it was set to 1.1 instead of 2.0. After changing this everything worked OK.

Install PHP and Mysql in Vista

This tutorial will explain how you can get PHP and Mysql working with IIS 7. In IIS 7 several things have changed which will make the installation a little bit complicated then it was in previous versions or as with Apache. I found out the issues myself also and searched on Google for the solutions.

First download the following software:

  • PHP 5.x (the zip file is the easiest)
  • Mysql 5.x

When you downloaded both software packages we can start with installing. We will divide this is a few steps:

  • install PHP
  • configure IIS/PHP
  • install Mysql

Install PHP

The zip file contains all the files you need, extract them to a location such as c:\Program Files\PHP.

You will see the directory contains a few sub-directories:

  • Ext
  • Extras
  • PEAR
  • Dev

Especially the “ext” directory is important because it contains all extensions to expand PHP.

Configure IIS/PHP

The next step is configuring PHP and IIS. The configuration from PHP will be done by modifying the file “php.ini” which is a simple text file. This file can be found in the root of the PHP directory and needs to be copied to “c:\Windows”. You can make adjustments if you like, for example switch on some extensions.

For using PHP with Mysql we need to remove the “;” in front of the next line: extension=php_mysql.dll.

After this is done we need to copy some files: “php_mysql.dll” which can be found in the “ext” directory, and both “libmysql.dll” and “libeay32.dll” from the PHP directory, all of them need to be copied to  “c:\windows\system32″.

When this is done we need to configure IIS. The IIS configuration is not much work but first we have to add some components because they are not installed by default. So start “add and remove programs” and choose the option “windows parts ..”. The next options need to be enabled:

 

 

 

When this is installed we could continue with configuring IIS. Start up the IIS Management and choose the optie “Handler mappings”. When this is opened you will get an option to add a “add script mapping”, when choosing this you will get the following screen:

 

 

 

Fill in all fields as above except “executable/file path” here you need to select the directory where PHP is installed. Press OK, Windows will ask you if this needs to be applied to all IIS parts, click OK this will safe you a lot of time.

The handler mappings will look like this:

 

 

 

To check if PHP is configures OK create a PHP file with the following content:

phpinfo()

Safe this file to the root of your webserver and open the file via Internet Explorer. When the installation is successful you will get an overview of all the settings you did in the PHP.ini

Install Mysql

The last step is installing Mysql you can use the default steps for this. The only option that may need to be changed is the type of server. For a developers machine you need to select “developer” if you want to use it for production then this option is not recommended.

Handlertoewijzingen overzicht

 

 

Scripttoewijzing toevoegen

 

 

 

IIS component toevoegen

This page contains an overview of all the tutorials:

PHP

Install PHP and Mysql in Vista open

Exchange tutorials

Create a user via Powershell open

Configure Exchange UM open

Activate UM options for a user open

Configure the Exchange UMTestphone open

Create users via CSV open

Create transport rules open

Install Anti-spam Agents on the Hub Transport server  open

Install Exchange 2007 in an Exchange 2003 environment open

Create a resource Mailbox open

Exchange 2007 setup parameters open

Add and configure UM language-packs open

Message Classifications open

Outlook Web Access open

Implement an Edge Transport server open

Message Recording Management open

Dynamic Distribution Groups open

Changing Out Of Office settings on an Exchange 2007 server open

Prepare Windows 2008 for Exchange 2007 open

Organizational forms in Exchange 2007  open

Shared address space open

Moving logs of a CCR enabled storage group open

Install a certificate open

Autodiscover in a multiforest environment open

Make OCS client available in OWA open

Exchange 2010 SP1 beta: install and configure UM role open

Windows 2008

Install DNS and AD open

Creating shares open

IMSS

Prevend spoofing with IMSS open

Block unknown internal domains with Trend Micro IMSS open

Synology

Install the SSH/telnet patch on the Synology open

PHP installation issues

PHPAs promissed I would report how the installation of PHP went on a new server. During the instllation the following parameters will be setup: upload_tmp_dir and session.save_path to the tmp directory from the user that is logged on. This can cause some really strange issues, so change the directory to one that can be accessed easily by every user. Besides this issue I got the issue that .php files were not recognized correctly. By adding the reference to php5isapi.dll again it worked OK. There needs to be fixed a lot to the installation of PHP despite it uses a MSI.