Troubleshooting Ajax Viewer Windows Server 2016 application migration

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Troubleshooting Ajax Viewer Windows Server 2016 application migration

tuceda
Hi,

I have an old MG 2.5 application that use Ajax Viewer and works well on a
Windows Server 2008 and 2012.
This application have an aspx page as entry point, that read the library
WebLayout identifier defined in url parameter.  The aspx extract the
MapDefinition, and manipulates a MgMap instance by adding some FDO filters
to map layers. When its done, the aspx redirect to mapviewerajax URL with a
session WebLayout identifier in parameters.

Then i tried to move this application on Windows Server 2016. The map is
displayed well, but all operations applied to MgMap have no effect. Layers
are not filtered. If I set the same filters in LayerDefinitions with
Maestro, this works well.
I tried to move on another Windows 2016 Server without success.

I have no error or any log information.

What i'm doing wrong ?


Thanks in advance



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Troubleshooting Ajax Viewer Windows Server 2016 application migration

tuceda
I forgot to say that I also tested MapGuide 3.1 without results.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Troubleshooting Ajax Viewer Windows Server 2016 application migration

Jackie Ng
In reply to this post by tuceda
Check your usage of MgMap constructor and Open/Create/Save methods.

This sounds similar to:
http://osgeo-org.1560.x6.nabble.com/Trouble-after-2014-to-2017-migration-td5431529.html

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Troubleshooting Ajax Viewer Windows Server 2016 application migration

tuceda
Hi Jackie,

Yes, its sounds similar, but i've already check these method calls.

Now the code looks like this:

MgMap map = new MgMap(siteConn);
// strMapDefinition is extracted from web layout content
MgResourceIdentifier mapDefinitionResId = new
MgResourceIdentifier(strMapDefinition);
mapName = mapDefinitionResId.GetName();

//map.Create(resourceService, mapDefinitionResId, mapName);
map.Create(mapDefinitionResId, mapName);

// set filters to some layers ...


//map.Save(resourceService, mapStateId);
map.Save();

This works well on a Windows Server 2012 or on my personal computer (Windows
8).



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Troubleshooting Ajax Viewer Windows Server 2016 application migration

frieda
We moved from Windows Server 2008 R2 to Windows Server 2016 but we have an
older MapGuide version (2.1.0.4283-Final) without problems. We using AJAX
Viewer, IIS and Winforms aspx etc. The only thing we had to do was to
install the Microsoft ASP.NET 2.0 AJAX Extensions 1.0. No code changes
needed.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Troubleshooting Ajax Viewer Windows Server 2016 application migration

tuceda
Hi Frieda,

Thanks for your response.
In your application, do you manipulate the MgMap and an associated WebLayout
?
It seems to me that the WebLayout doesn't take into account the created map
session.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Troubleshooting Ajax Viewer Windows Server 2016 application migration

tuceda
I did more tests:

I tried to display the map created with MgMap using
GETDYNAMICMAPOVERLAYIMAGE mapagent's operation.
This map is well filtered.

So the problem is the WebLayout.

WebLayout content looks like this:
<WebLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xsi:noNamespaceSchemaLocation="WebLayout-2.4.0.xsd">
  <Title/>
  <Map>
    <ResourceId>Library://TEST/TEST.MapDefinition</ResourceId>
    <HyperlinkTarget>TaskPane</HyperlinkTarget>
  </Map>
...


In Windows Server 2012, the created web layout use my created map in
session.
In Windows Server 2016, the created web layout seems to re-create a map from
specified MapDefinition.





--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Troubleshooting Ajax Viewer Windows Server 2016 application migration

frieda
In reply to this post by tuceda
Here are some VB Functions. Please note that this code comes from a
decompiler, because the source code is lost :/

https://pastebin.com/4V3J6BiA



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Troubleshooting Ajax Viewer Windows Server 2016 application migration

tuceda
I found the problem.
For Windows Server 2012, the mapviewernet mapframe.aspx was patched to be
able to open a Map instead of create a Map.
This is why in a new platform, the created map session was ignored.

Thanks frieda for your help.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users