Subscribe to this thread
Home - General / All posts - IMS keep file map opened
rb34 post(s)
#10-Jan-19 11:53


we developed a webgis based on Manifold 8 IMS.

The problem is that IMS seems to keep the file map opened, so we can't overwrite it unless we restart IIS (or the application pool).

Here is how we load the file:

MapServer = newManifold.Interop.MapServer();

varoptions = "file="d:\" + System.Environment.NewLine + [many other options]

MapServer.CreateWithOpts(options, m.state, null, false);

Does anyone has the same problem? Is there a solution?

Thanks in advance


6,376 post(s)
#10-Jan-19 12:58

IMO that's by design and my solution is to store data that are modified often on a PostGIS server with true multiuser access.

Shutdown adusts priorities: Do we really want to go back to where we came from?

rb34 post(s)
#10-Jan-19 13:53

Hi Klaus,

thanks for your reply. I agree with you, but our situation is different: our customer (Public Administration) uses Manifold to create and update their map, then, they need to publish maps on a remote web server (in a datacenter) where is installed our WebGIS solution. So, we developed a Manifold plugin that send to our webservice the map. The webservice replace the old file with the new one. Everything works perfectly only if the webgis didn't yet load the map file. In that case, the webservice can't overwrite the file. The only way is to restart the pool or to use an external tool (es. handles64.exe) to close the file. After that, we can publish successfully the map


1,439 post(s)
#10-Jan-19 18:17

I've run into this before. I was able to set up a task on the server to reload the manifold application at a specific time, then another task copy updated .map files and overwrite the ones serving the IMS. Again, this would fail if someone happened to hit the IMS during or just before a file got copied. To guard against this, I had another task that renamed the default.asp file to some other name, then renamed another asp file to default.asp that had a message saying "temporarily out of service". Once the copying was finished the default.asp file was renamed back and the proper default.asp file was renamed as well so people could access the IMS again.

So in summary my task schedule was something like this:

1. Reload mapserver (see the default_admin.asp page created by manifold when you export to IMS)

2. Rename default.asp file to default_temp.asp (or whatever)

3. Rename default_maint.asp to default.asp

4. Copy the new .map files

5. Rename default.asp to default_maint.asp

6. Rename default_temp.asp back to default.asp

"The blessing in life is finding the torture you are comfortable with." - Jerry Seinfeld, 6/26/2013

Manifold User Community Use Agreement Copyright (C) 2007-2019 Manifold Software Limited. All rights reserved.