none
Webservice creating docs on Windows 2008 R2 with IIS 7 RRS feed

  • Question

  • Hi

    First I want to make clear that I know this type of solutions is not supported by Microsoft.

    I have created a WebService in VS 2008 which have been running on a Windows 2003 server with IIS 6 for some time. The WebService creates Office document from templates which is passed through the service as a byte array.

    Now, I'm trying to migrate this solution to Windows 2008 R2 with IIS7.
    The WebService is working and from the logs I can see that word is started OK.

    My problem is that the running application can't create a new document from the template.
    The command is wDoc = wApp.Documents.Add(grmFileName), where wDoc is a Word.Document, wApp is the running Word application and grmFileName is the Word template file with full path.
    The error (ex.Message) is (Google translated):
    Word can not read the file.
    Try one of the following.
    * Open and Repair the file.
    * Open the file with the Text Recovery converter.

    If I try with an Excel template, the error message suggests that the file is locked.

    The WebService is set up to run under a specific local account, which is a member of the Users and Administrators group.
    The local acount has full permission to the folder where the templates are stored.
    I have also set the folder in which the templates are created among the Trusted sites.

    What have I missed?


    Best Regards Peter Karlström Midrange AB, Sweden

    • Moved by Cindy Meister MVPModerator Wednesday, November 7, 2012 3:40 PM not using VSTO technology (From:Visual Studio Tools for Office)
    Wednesday, November 7, 2012 10:55 AM

Answers

  • Hi Tom

    Hate to nag about this, but is something happening regarding my question.

    Thanks in advance


    Best Regards Peter Karlström Midrange AB, Sweden

    Tuesday, November 27, 2012 10:08 AM

All replies

  • Hi Peter,

    Thanks for posting in the MSDN Forum.

    I would recommend your read the KB: http://support.microsoft.com/kb/257757. I don't think it is a good idea that use PIA on server side. I would recommend you use Open Xml SDK to handle your issue.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, November 8, 2012 6:55 AM
    Moderator
  • Hi Tom

    Thanks for your reply.

    This is why I mentioned it in the beginning of my post; I know about these facts, and have already went through the page you are proposing.
    However, the solution HAS been working on Windows Server 2003 with IIS6, and my attempts to port this to Open XML has been unsuccessfull, since the SDK doesn't support all the steps I'm going through when I create the document with it's containing text and properties.

    Maybe this is a IIS7 configuration setting I have not seen, in order to make the running Word application to access the template.
    I know that processes running under w3wp.exe process can have their own context, and I want the user which started Word to have access to a file on the local disk.

    Hope there still is help to get...


    Best Regards Peter Karlström Midrange AB, Sweden

    Thursday, November 8, 2012 5:51 PM
  • Hi Peter,

    I will involve some experts into your issue  to see whether they can help you. There might be some time delay, thanks for you patience.

    have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, November 13, 2012 6:15 AM
    Moderator
  • Hi Tom

    Hate to nag about this, but is something happening regarding my question.

    Thanks in advance


    Best Regards Peter Karlström Midrange AB, Sweden

    Tuesday, November 27, 2012 10:08 AM