Opened 12 years ago

Closed 12 years ago

#1984 closed defect (fixed)

AjaxViewer SetSelectionXML does not work anymore on Mapguide 2.4

Reported by: znarf1965 Owned by: jng
Priority: high Milestone: 2.4
Component: AJAX Viewer Version:
Severity: blocker Keywords: 2.4 Ajax viewer SetSelectionXML
Cc: znarf1965 External ID:


I'm testing beta 2.4 on Windows 7 32 bit and I'm experimenting an error on AjaxViewer SetSelectionXML(). If I execute it, Mapguide does not select anything.

The severity for me is very high because without this function I can't use Mapguide.

I've built a very simple task pane with a button and I have set it as initial URL in my basic WebLayout (please see the attached project for both mgp and .Net app).

If I follow with debugger, I can see that selection.ToXml() seems working properly. But as a result of executing Java Script, I get the right zoom, but nothing is selected.

I’ve made further tests on Mapguide 2.2, on Infrsatructure Map Server 2013 and on both Oracle and shp based features. In these tests I used exactly the same .Net project and the same mgp.

The result is that SetSelectionXML() works properly on both Mapguide 2.2 and Infrastructure Map Server 2013. But it does not work for Mapguide 2.4. So this is a bug specifically related to 2.4.

I include to this ticket my .Net simple project (and mgp) that replicates the problem on a mgp based on shp files.

Attachments (2) (966.4 KB ) - added by znarf1965 12 years ago.
simple .net app + mgp
Web.config (4.5 KB ) - added by znarf1965 12 years ago.
AIMS 2013 web.config

Download all attachments as: .zip

Change History (6)

by znarf1965, 12 years ago

Attachment: added

simple .net app + mgp

comment:1 by jng, 12 years ago

Owner: set to jng

comment:2 by jng, 12 years ago

Ok, the problem is that we are getting a potentially dangerous Request.Form value due to the selection XML.

Why did this not happen in MGOS 2.2? Because the MapGuide .net API was still at .net Framework 2.0. For MGOS 2.4 and AIMS 2013, the MapGuide .net API is now at .net Framework 4.0

This brings up another question. AIMS 2013 is obviously doing something correct in this regard. The solution/workaround is to add this line to under the <system.web> section of web.config in mapviewernet:

<httpRuntime requestValidationMode="2.0" />

This is where I'll need you to do some fact finding (as I do not have AIMS 2013 and you do). Does AIMS 2013 have this configuration setting for mapviewernet? If so, I'll put this in as the official fix, otherwise we need to find out the .net web application configuration differences between MGOS 2.4 and AIMS 2013, something I'll need your help with.

by znarf1965, 12 years ago

Attachment: Web.config added

AIMS 2013 web.config

comment:3 by znarf1965, 12 years ago

Cc: znarf1965 added

I confirm that your workaround does hos job: now Mapguide 2.4 can select.

Please fine the AIMS web.config. As you will see, this AIMS config file does not contain the line you sugested.

comment:4 by jng, 12 years ago

Resolution: → fixed
Status: new → closed

Fixed r6575

Note: See TracTickets for help on using tickets.