[[PageOutline]] = Install MapGuide 2.4 on IIS = Step-by-step instructions to installing MapGuide 2.4 on IIS. These instructions should also work with MapGuide 2.5/2.6. Rename occurrences of "2.4" and "24" with the corresponding MapGuide version. == Prerequisite: Microsoft .NET Framework 4 == If Microsoft .NET Framework 4 or 4.5 is not installed, install [http://www.microsoft.com/download/details.aspx?id=17851 Microsoft .NET Framework 4 (Web Installer)]. == Prerequisite: IIS == '''Windows Server 2008''' 1. Open Start -> Server Manager -> Roles 2. Roles Summary -> If "Web Server (IIS)" is not installed, Add Role 3. Web Server (IIS) -> Add Role Services 4. Install * Web Server (IIS) -> Application Development Features -> ASP.NET, which also installs .NET Extensibility, ISAPI Extensions and ISAPI Filters * Web Server (IIS) -> Application Development Features -> CGI, which also enables FastCGI in IIS7 and above [[br]][[Image(using-fastcgi-to-host-php-applications-on-iis-246-IIS - Enable FastCGI Role.png)]] '''Windows 7''' 1. Open Start -> Control Panel -> Programs -> Programs and Features -> Turn Windows features on or off 1. Install * Internet Information Services, which also installs several default features * Internet Information Services -> World Wide Web Services -> Application Development Features -> ASP.NET, which also installs .NET Extensibility, ISAPI Extensions and ISAPI Filters * Internet Information Services -> World Wide Web Services -> Application Development Features -> CGI, which also enables FastCGI in IIS7 and above [[br]][[Image(screenshot.1.jpg)]] '''Windows 8''' 1. Install * Internet Information Services -> World Wide Web Services -> Common HTTP Features -> Static Content (This is a default feature for IIS on Windows 7, however must be manually installed for IIS on Windows 8) == Prerequisite: FastCGI for IIS == '''IIS6 and below''' Install [http://www.iis.net/download/FastCGI FastCGI for IIS]. '''IIS7 and above''' [http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis/#EnableFastCGI FastCGI] is enabled when CGI is installed in IIS7. == Upgrade from MapGuide 2.2 or older == If upgrading from MapGuide 2.2 or older, the repository must be upgraded using the following procedure: [http://help.autodesk.com/view/AIMS/2013/ENU/?caas=caas/vhelp/help-dev-autodesk-com/v/Infr--Map-Server/enu/2013/Help/0008-Installa0/0008-Installa8/0009-Upgrade-9.html Upgrade to Autodesk Infrastructure Map Server 2013 from a 2009 or Later Release] Use the following definitions: * MapGuide Enterprise 2011 Server or Infrastructure Map Server 2012 = MapGuide 2.2 or older * Autodesk Infrastructure Map Server 2013 = MapGuide 2.4 == Upgrade from MapGuide 2.(x-1) or older to 2.x == If upgrading from an 2.(x-1) or older version to 2.x (for example, upgrading from 2.4 to 2.6), I recommend uninstalling the old version and rebooting to finish the uninstallation. This will clean up old IIS settings (such as the IIS application pool for the old version, for example, MapGuide24AppPool), leaving a clean IIS environment for installing the new version. Install the new version into the same folder as the old version to automatically inherit your existing repository (your repository is not touched during the uninstallation of the old version or installation of the new version). Installing the new version without uninstalling the old version can result in invalid IIS settings that are a combination of the old and new versions and an inoperative MapGuide installation. If this occurs, uninstall MapGuide and manually remove all IIS settings in the manual configuration of IIS below for both the old and new versions to clean the IIS environment before reinstalling the new version. == Install MapGuide == Run the installer and select: * IIS configuration to allow the installer to configure IIS, or * Manual configuration if you want to manually configure IIS. == Manual configuration: IIS == If MapGuide has been installed with a manual configuration, IIS will need to be manually configured. 1. For Windows 7, open Start -> Control Panel -> System and Security -> Administrative Tools -> Internet Information Services (IIS) Manager 1. Open [root]\Application Pools -> Actions -> Add Application Pool... * Name: MapGuide24AppPool * .NET Framework version: .NET Framework v4.0.30319 * Managed pipeline mode: Integrated * Start application pool immediately: True [[br]][[Image(screenshot.2.jpg)]] 1. Open [root] -> FastCGI Settings (If there is no FastCGI Settings (ie. Windows Server 2008), install [http://www.iis.net/downloads/microsoft/administration-pack IIS 7.0 Administration Pack]) -> Actions -> Add Application... * Full Path: C:\Program Files\OSGeo\MapGuide\Web\Php\php-cgi.exe * FastCGI Properties: * Max Instances: 0 * Activity Timeout: 70 [[br]][[Image(screenshot.3.jpg)]] 1. Open [root] -> ISAPI and CGI Restrictions -> Actions -> Add... * ISAPI or CGI path: C:\Program Files\OSGeo\MapGuide\Web\www\mapagent\isapi_MapAgent.dll * Description: MapGuide 2.4 MapAgent ISAPI handle * Allow extension path to execute: True [[br]][[Image(screenshot.4.jpg)]] 1. Open [root] -> MIME Types -> Actions -> Add... * File name extension: .json * MIME type: application/json [[br]][[Image(screenshot.13.jpg)]] 1. Open [root]\Sites\Default Web Site -> Actions -> View Applications -> Actions -> Add Application... * Alias: mapguide * Application pool: MapGuide24AppPool (or MapGuide25AppPool) * Physical path: C:\Program Files\OSGeo\MapGuide\Web\www [[br]][[Image(screenshot.5.jpg)]] 1. Open [root]\Sites\Default Web Site\mapguide -> Error Pages -> Select "401" -> Actions -> Remove * Are you sure that you want to remove the selected custom error page? Yes 1. Open [root]\Sites\Default Web Site\mapguide -> Handler Mappings -> Actions -> Add Module Mapping... * Request path: *.php * Module: FastCgiModule * Executable (optional): C:\Program Files\OSGeo\MapGuide\Web\Php\php-cgi.exe * Name: MapGuide_2.4_PHP_via_FastCGI [[br]][[Image(screenshot.6.jpg)]] * Do you want to create a FastCGI application for this executable? Yes 1. Right-click [root]\Sites\Default Web Site\mapguide\mapagent -> Convert to Application * Alias: mapagent * Application pool: MapGuide24AppPool * Physical path: C:\Program Files\OSGeo\MapGuide\Web\www\mapagent [[br]][[Image(screenshot.7.jpg)]] 1. Open [root]\Sites\Default Web Site\mapguide\mapagent -> Handler Mappings -> Select "CGI-exe" -> Actions -> Edit Feature Permissions... * Read: True * Write: True * Execute: True [[br]][[Image(screenshot.12.jpg)]] 1. Open [root]\Sites\Default Web Site\mapguide\mapagent -> Handler Mappings -> Actions -> Add Script Map... * Request path: mapagent.fcgi * Executable: C:\Program Files\OSGeo\MapGuide\Web\www\mapagent\isapi_MapAgent.dll * Name: MapGuide 2.4 MapAgent ISAPI handler [[br]][[Image(screenshot.8.jpg)]] * Open Request Restrictions... * Mappings -> Invoke handler only if request is mapped to: False [[br]][[Image(screenshot.9.jpg)]] * Do you want to allow this ISAPI extension? Yes 1. Right-click [root]\Sites\Default Web Site\mapguide\mapviewernet -> Convert to Application * Alias: mapviewernet * Application pool: MapGuide24AppPool (or MapGuide25AppPool) * Physical path: C:\Program Files\OSGeo\MapGuide\Web\www\mapviewernet [[br]][[Image(screenshot.10.jpg)]] 1. For .NET API: Right-click [root]\Sites\Default Web Site\mapguide -> Add Application... * Alias: mapviewerajax * Application pool: MapGuide24AppPool * Physical path: C:\Program Files\OSGeo\MapGuide\Web\www\mapviewernet [[br]][[Image(screenshot.11.jpg)]] 1. For .NET API: Open [root]\Sites\Default Web Site\mapguide\mapviewerajax -> Default Document -> Add... * Name: ajaxviewer.aspx == Test == 1. Open http:\\localhost\mapguide\mapagent\index.html -> Other -> Create Session -> Submit * Username: Administrator * Password: admin == Previous releases == * [wiki:ConfigureGuide22Windows Configure MapGuide 2.2 on Windows] * [wiki:MGOS2onVistaIIS7 Installing MapGuide Open Source 2.0 Web Server Extensions on Vista / Windows Server 2008 / IIS7]