problems with VPM file being locked

Use this forum to post Vensim related questions.
Post Reply
yobiman
Member
Posts: 30
Joined: Wed May 28, 2008 1:28 am

problems with VPM file being locked

Post 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
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
yobiman
Member
Posts: 30
Joined: Wed May 28, 2008 1:28 am

Post by yobiman »

Thanks Bob
What command do I use to close the context?
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

VensimContextDrop
yobiman
Member
Posts: 30
Joined: Wed May 28, 2008 1:28 am

Post 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
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
Post Reply