Not able to create word document in WCF Service
i am using WCF service to send mail with attachment. in this WCF service i am creating one word document, pushing some data into this document. and attching this as attachment to mail. while creating word document am getting following error:
The server encountered an error processing the request. The exception message is 'Access is deni开发者_C百科ed.'. See server logs for more details. The exception stack trace is:
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
can any one please help in this
I found this article to be quite useful on msdn. I think it's from 2009 but I think it's still accurate in your scenario. This basically explains that microsoft doesn't really support this sort of thing and alternatives you can do.
If you must use automation like this in your wcf service I would recommend launching the service under an account that has access to launch word. I'm not too familiar with wcf but I assume this can be done.
精彩评论