December 14, 2011

Mapguide 6.5 Server Not Found on Hardened Windows 2008 Server

Filed under: Mapguide — Tags: , , , — Darrin Maidlow @ 11:39 am

It seems I’ve become the “go to guy” when it comes to Mapguide 6.5 on modern platforms!   This post builds on my previous post that documents .  In this edition we look at the situation faced on a clients server.   Basically the installation went off without a hitch with one exception.  When attempting to test the Mapguide 6.5 ISAPI the following error occurred:

HTTP Error 500.19 – Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid

(more…)

October 27, 2011

Installing Mapguide 6.5 SP1 on Windows 2008 Server

Filed under: Mapguide — Tags: , , , , — Darrin Maidlow @ 5:22 pm

In reply to a previous comment I assumed that Windows 2008 was “close enough” to Vista and that Mapguide 6.5 would install no problem.  I was wrong.  When attempting the install I was prompted with Mapguide 6.5 MDAC 2.8 Missingan “MDAC Not Detected” warning.  MDAC you may remember is the old tyme “Microsoft Data Access Component” and was one of the last releases.  MDAC has since been superseded and is apparently not included with Windows 2008.  Nor can it be installed.   I didn’t even bother contact Autodesk – I knew their response was likely going to start off with a good laugh, followed by something to the effect of “yeah that’s really old, you should probably just find an equally old Windows server.”  This of course is not an option =)   The good news though is that we can hack the Mapguide Server 6.5 installer and once installed Mapguide Server seems to run just fine.  Big thanks to Microsoft for all the effort they put into maintaining backwards compatibility.  Note this process may well work for Windows Vista and will probably work for Windows 7 – but I have not tested that.  Also – I should add this is going to be completely unsupported by Autodesk and will definitely be completely unsupported by me.  Please do the appropriate amount of testing before you put this into production.  That said, I’ve not noticed any problems with Mapguide 6.5 running on Windows 2008.

Getting Started

Mapguide 6.5 Task ManagerSo to get started.  You’ll need a piece of free software from Microsoft called .  You’ll also need your which can be downloaded from Autodesk.    Once Orca is installed start the Mapguide 6.5 server setup.  The required MSI file that we need to edit is stored inside a single self extracting exe.  You can extract these files by launching the installer on your Windows 2008 server and starting task manager once the “MDAC Not Detected” error is displayed.   Make sure the “Show processes from all users” is checked and find “ServerInstall.exe”  Right click on this process and choose “Open File Location”.  Take a copy of these files and place them somewhere, preferably on your Windows 2008 server’s local drive.

**Update– thanks to Krzysztof Skwarek for pointing out that Orca is a bit of a pain in the ass to get ahold of.  I have the Windows SDK installed already so I didn’t notice this pain point.   Given that the platform SDK is freely available, I’ve uploaded the here for your convenience. (If this is a problem Microsoft, please don’t get litigious…just send me an e-mail to let me know. I’ll gladly take it down and make the good people download the 250MB platform SDK =])

 

Hacking the Installer and Installing

Next, fire up Orca.   Choose File / Open and browse to your copy of the installation files.  Select ServerInstall.msi.  In the left hand window scroll down and find Orca MDAC Not Detected“InstallUISequence”  Select that.  In the right hand pane find and select “MDACNotDetected” .   Right click on this row and pick “Drop Row”.  You will be prompted that this will permanently remove 1 rows.  Click Ok and save the msi.

Your installation is now hacked and will get past that error message when you run ServerInstall.exe.  Make sure your run this from a local drive.  When I tried to run the install from a network share, Windows “protected” me and it wouldn’t work.

At this point you can run through the installation process.

So where were we, yes installing.  When you get to the “Select Components” screen make sure that “ISAPI MapAgent” is selected.  By default is not installed.  Don’t be alarmed on the next screen when the installer tells you it will not create the virtual directory.  Like with Vista, the installer is not capable of dealing with IIS7.  That’s no problem as configuring Mapguide 6.5 on IIS7+ is pretty simple and we’ll go over that in a minute.  You may need to reboot once the installation is complete but after that the “Autodesk Mapguide® Server 6.5” service should be up and running.   Start / Run / services.msc will bring up the services.

IIS 7 Configuration

You’ll need IIS 7 installed with support for ISAPIs.  If you do not have this installed, can probably help you out.  Next start the IIS manager (start / run / inetmgr) .  First let’s create a new application pool.  Expand the server and choose “Application Pools”.   Right click and choose “Add Application Pool”.   Name the app pool (Mapguide6.5 might be a good name).  Set the pipeline mode to classic.   If you’re on a 64 bit version of Windows you must set the app pool to 32bit mode as Mapguide 6.5 is a 32bit app.  Right click on the newly created application pool and choose “Advanced Settings”.  Set “Enable 32-Bit Applications” to true.  This setting will only be available on 64 bit systems.  If you don’t see it – you probably don’t need to worry about it.

Now expand Sites and choose the web site you want to create the application (formerly called virtual directory) in.  Right click the site and choose “Add Application”.  Name the application Mapguide6.5.  For the physical path browse to C:\Program Files\Autodesk\MapGuideServer6.5\MapAgents (or Program Files (x86) on x64 systems).  Select our newly created application pool.isapi accessisapi config

Finally we need to enable the ISAPI agent.  One last round of dirty trickery and we’ll have Mapguide 6 running.  In windows explorer browse to C:\Program Files\Autodesk\MapGuideServer6.5\MapAgents\ and make a copy of MapAgent_isapi.isa.  Name it MapAgent_isapi.dll.   In the inetmgr tree select the virtual directory and double click Handler Mappings.   Next we’re going to “Add Module Mapping”.  Set the request path to be MapAgent_Isapi.isa.  For module choose “IsapiModule”.   For executable browse to the newly copied MapAgent_Isapi.dll.  Set the name to Mapguide 6.5.  Click on the Request Restrictions button and choose the Access tab.  Click the Execute radio button.

**Update – thanks to Krzysztof Skwarek for pointing out that you can choose “Script” here instead of “Execute”.

You will be prompted to “allow this ISAPI” extension.  Click Yes.

The Test

At this point you should be done!  You can fire up a browser and test the isapi using the following url (assuming you used my default virtual directory name):

http://localhost/mapguide6.5/mapagent_isapi.isa?item=test

If you get the following results you should be good to go!

mapguiderunning

I considered posting the modified installer but I’m not sure if that would have been poking “the sleeping dragon”.  As much as I would like to help – I don’t need any nasty letters from the Autodesk legal team =).  If this is something you need done but you’re not comfortable editing installers or delving into the guts of IIS7,  feel free to contact me via .   We’d love to help you out!

May 1, 2008

Manually configure Mapguide 2009 Web Tier on Vista x64 IIS7

Filed under: Uncategorized — Tags: , — Darrin Maidlow @ 3:37 pm

My configuration is this. I have a 32 bit window server running IIS6 and Mapguide server. however for development purposes and local debugging I needed the web tier to be run from my workstation – but working with my network Mapguide enterprise server.

First off, you need to ensure that IIS 7 is installed on the Vista machine, you also need to specify ASP.NET and the ISAPI components be installed. To start off, run the web tier installation and choose a manual installation. I did a custom install, and did not install the php, site admin, or java components. I installed my web tier to C:\inetpub\MapGuideEnterprise2009. It is critical that you do not install it to the default location in program files (x86), or the Vista permissions will break everything. You will know this has occurred because your map will show all question marks in the layer legend, and no map data.  In the server log you will see session timeout errors.  If you do install it to the default location, just move the entire folder structure out of program files (x86).

Finish the installer, this should deploy the needed Mapguide files. I noticed a bit of a delay in the copying new files portion of the installer. Seemed to be hung for several minutes, but it did complete.

Now start up IIS manager (start / run / inetmgr)

This is the ‘hard’ part. It looks nothing like what I was expecting.  IIS Internet Manager has been pretty static for the past, oh ten years…

A default web site should be configured – double click on the computer in the left pane to expand the tree.

 clip_image002

 

First off – we’re going to create a new application pool specifically for Mapguide. This will save us some problems down the road. If you are not familiar with them, application pools are a newer concept introduced in IIS 6. Each application in IIS requires an application pool. Only one version of the .NET framework can be used by a single application pool. We’re going to set this pool to use .NET 2.0 (which also includes 3.0 and 3.5)

 clip_image004

 

The most important reason for a new application pool is to set this pool/worker process to run in 32 bit mode. Select the new application pool and choose Advanced Settings. Change Enable 32-Bit Applications to true.

 clip_image006

 

If you do not set the pool to run as 32 bit, you will get an error message that says:

"The page you are requesting cannot be served because of the Multipurpose Internet Mail Extensions (MIME) map policy that is configured on the Web server. The page you requested has a file name extension that is not recognized, and is not allowed."

A new behavior in IIS7 is a change between virtual directories and applications. In IIS6 and below, we would create a virtual directory, and then add an application to the properties of that virtual directory. With IIS7, we right click and instead of choosing Add Virtual Directory we choose Add Application. So let’s add a new application to the Default Web Site.

For simplicity, I’m re-creating the structure exactly as defined on my Windows 2003 server. Once the application is created, right click on it and choose Add Application. So right click on the default web site and choose add application. Call it Mapguide2009 and choose the newly created mapguide2009 application pool.

Next we need to right click on the Mapguide2009 application and create two new applications. One called mapviewerdwf, and mapviewerajax. Each of these apps must point to the same location – the mapviewernet folder. (by default its location is C:\Program Files (x86)\Autodesk\MapGuideEnterprise2009\WebServerExtensions\www\mapviewernet – but we need to use c:\inetpub\wwwroot\ MapGuideEnterprise2009\WebServerExtensions\www\mapviewernet) The other difference is that for each application, we must set the default document to be dwfviewer.aspx and ajaxviewer.aspx respectively. To set the default document select the new application in the tree and double click Default Document in the central pane. Enter the appropriate default document.

clip_image008

 

Next we need to setup a script mapping for the FCGI. Select the Mapguide2009 application and we are going to create yet another application. Call this application mapagent. This should act like adding an application to an existing folder in IIS6. Next, double click on Handler Mappings. In the top right, select Add Script Map. On the script mapping form, enter MapAgent.fcgi (or *.fcgi) for the request path. Browse to and select the isapi_MapAgent.dll from the www\mapagent folder. Under request restrictions, you can also set the verbs to GET,POST.

clip_image010

 

Click Ok and you will be prompted to enable the ISAPI extension. Click on yes.

At this point – the Mapguide 2009 web tier should be installed and running. Try it out by starting up a browser and hitting http://localhost/mapguide2009/mapagent/index.html. Next you can access maps using http://localhost/mapguide2009/mapviewerdwf or mapviewerajax.

Technorati Tags: ,,

Powered by WordPress

Switch to our mobile site