开发者

Unable to access DCOM object from Windows Service written in c# (Windows 2003 server) but can access the object when hosted as a console application

I have written an application in C# that writes to an accounting system via a DCOM object (name of the object is Toolkit Object). When this application is hosted as Windows Service in Windows 2003 the service is unable to open the DCOM object although the user identity under which the service is running has all the necessary access rights.

When I host the same application using a console app it works fine.

I have tried tweaking the acces开发者_开发知识库s rights to the DCOM object through DCOMCNFG but nothing seems to work.


COM uses Windows Messages to communicate between processes. So the first question is: Does your service have a message pump? If not, that's most likely the problem.

Try creating a hidden window (or a visible window to test the hypothesis).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜