ApplicationClass.FileSaveAs run in window service mode throws exception

G

Guoming

I have an window service that opens a project from project server and save
it to local harddisk using the ApplicationClass.FileSaveAs method.

It works perfectly when I use a console application to instanticate start
the window service. However, when I deploy the windows service and let it
run by itself, the FileSaveAs method throws exception :

Exception: System.Runtime.InteropServices.COMException
Message: The method is not available in this situation.
Source: Microsoft Project
at System.RuntimeType.ForwardCallToInvokeMember(String memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)
at Microsoft.Office.Interop.MSProject.ApplicationClass.FileSaveAs



Anybody has any hint?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top