File this one under the bizarre category…
I have been working with client for the last while where it has been some struggle to get MapGuide Enterprise to connect to their SQL Server instance through the ODBC FDO Provider. This is generally such a trivial procedure, and it has worked in every test and client scenario I have ever created, but we hit the wall in this particular clients environment.
The main problem in this case was the cryptic error message that was returned by MapGuide:
response returned status code 502 (BadGateway)
Well that’s not telling me much now is it? And let me tell you, Google wasn’t much help here either, other than confirming that this is a general ‘http’ based error.
This environment was also implementing an ISA Server for managing the network, and that was the only thing that was different between the test environments and the production environment. Or so we thought…
We tried all sorts of configuration changes opening ports, and enabling protocols and nothing worked. So, a couple weeks, and many test scenarios later we have found the root cause of the problem: a SQL Server password that contains special characters like: &, @ and !.
The only way we discovered this was we setup a completely localized environment, with MapGuide server installed on a local machine, along with MapGuide Studio. When we attempted to connect in this environment we received a more meaningful, only somewhat cryptic, error message:
Feature Source - Unterminated entity reference, 'Doug'
WHAT! Doug? What the heck!?
Well as it turns out, ‘Doug’ happened to be part of the SQL Server password being used, and more importantly, it was preceded by an ‘&’ character: Bob&Doug.
So, I can only assume that MapGuide could not properly pass the password because of the how http handles the & (ampersand) for URL query strings. This also got me thinking, what recommended password policies? After reviewing this, it seems that certain ‘special characters’ are recommended for stronger password policies, but excluded from that list is the ampersand character.
Hopefully, somebody else finds this information useful.
Until next time,
Take care
Warren M










