views:

292

answers:

0

I am trying to open a docx document in an iframe dynamically using a asp.net hyperlink. The user should then be able to alter some content controls that are bound to a custom.xml in the document. Later on I want to extract this data using the open xml sdk.

The document opens properly in the iframe and everything seems fine. However, when I try to access the document, I get an exception saying that the document is opened by another process. I am running this using Visual Studio 2008 and the development server. Even if I restart Visual Studio the file is still locked by the other process, only if I open the task manager and kill the word process am I able to access the file again. Can I somehow terminate the process that opens up the document in the iframe programatically, or is there a way to open up the document without causing this lock? Could it be the development server that is causing this problem?

Sincerely, Fredrik