如何通过ASP.NET 2.0杀死Win 2003服务器中的Word进程 [英] How to kill the word process inside win 2003 server through ASP.NET 2.0

查看:110
本文介绍了如何通过ASP.NET 2.0杀死Win 2003服务器中的Word进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的先生/女士,

我需要通过asp.net 2.0应用程序终止Win 2003服务器中的word进程.

我们需要从数据库中打印地址标签,因此我们已使用邮件合并概念在Word文档中打印标签.

对于每个请求,我们都需要终止服务器中的单词处理,以根据新请求生成带有标签的新单词doc.

当我们尝试杀死单词process时,它会抛出一个异常,例如文件已打开".

我如何杀死这个过程?或是否有解决此问题的方法?

请帮助我

Dear Sir/madam,

I need to kill the word process in the win 2003 server through asp.net 2.0 application.

We need to print the address labels from the DB so we have used mail merge concept to print the labels in word document.

For each request we need to kill the word process in the server to generate new word doc with the labels as per the new request.

When we try to kill the word process its throwing an exception as "file already opened".

How can i kill the process ? or is there any workaround for this problem?

pls. help me

推荐答案

Office,因此Word并不是旨在运行服务器端的应用程序.

尝试每个COM对象:
Office, and therefore Word isn''t an application that is meant to run server side.

Try for each COM object:
System.Runtime.InteropServices.Marshal.ReleaseCom Object 



您可以尝试更改Word的设置,以便在其自己的过程中打开每个新文档.

您还可以使用SysInternalSuite程序包中的PsKill.exe杀死单词实例.

祝你好运!



You could try to change the setting of Word so that every new document is opened in it''s own process.

You could also use PsKill.exe from the SysInternalSuite package to kill the word instances.

Good luck!


这篇关于如何通过ASP.NET 2.0杀死Win 2003服务器中的Word进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆