Page 1 of 1

problems with VPM file being locked

Posted: Sun May 31, 2009 12:50 am
by yobiman
I am developing several programs that run a .VPM file via a Webservice interface. When I run the webservice and find an error in the underlying model, I am unable to republish the .VPM file. Basically the webservice seems to keep it locked up.. Is there any way I can unlock the file without restarting my computer. I did try stopping and restarting IIS ( I am running the webservice on a local machine), but that did not seem to work... Would be grateful if anyone has ideas

Thanks
Phil

Posted: Sun May 31, 2009 9:53 am
by bob@vensim.com
This is a known problem with earlier versions of Vensim that was fixed in 5.9. Just make sure to close the context using the model.

Note that Vensim is not licensed for use in providing web services unless you have purchased the multicontext DLL license.

Posted: Mon Jun 01, 2009 11:11 pm
by yobiman
Thanks Bob
What command do I use to close the context?

Posted: Tue Jun 02, 2009 10:02 am
by bob@vensim.com
VensimContextDrop

Posted: Thu Jun 04, 2009 9:12 am
by yobiman
Bob

I tried to used this command without success.. Is it for the multicontext version?
I do plan on buying this, but am testing on a local machine for now

Posted: Thu Jun 04, 2009 9:41 am
by bob@vensim.com
This is for the multicontext version. To make sure a .vpm file is not in use in a single context open a different .vpm file (actually any 1 context using a .vpm file would lock it).

Alternatively you can either restart the web service or use LoadLibrary/FreeLibrary instead of linking with the .lib file for the Vensim DLL and be sure that FreeLibrary is called.