0

統計目的で IE が使用された回数を単純に監視する、一連のリモート コンピューターでバックグラウンドで実行されるサービスを構築しようとしています。私のコードのほとんどは記述されており、リモート コンピューターと同じ仕様の開発用コンピューターで問題なく動作します。また、すべてのリモート コンピュータに Net Framework 4.5.1 がインストールされていることも確認しました。

サービスを開始すると、このエラー メッセージが表示されます (ログに記録します)。

System.Runtime.InteropServices.COMException (0x80040202): Exception HRESULT : 0x80040202
at System.Runtime.InteropServices.ComTypes.IConnectionPoint.Advise(Object pUnkSink, Int32& pdwCookie)
at System.Runtime.InteropServices.ComEventsSink.Advise(Object rcw)
at System.Runtime.InteropServices.ComEventsInfo.AddSink(Guid& iid)
at System.Runtime.InteropServices.ComEventsHelper.Combine(Object rcw, Guid iid, Int32 dispid, Delegate d)
at System.Runtime.InteropServices.ComAwareEventInfo.AddEventHandler(Object target, Delegate handler)
at ServiceLogger.Service1..ctor()

このエラーの原因となるコードは次のとおりです。サービスが program.cs によって作成されたときに発生します。program.cs を変更していません。

InitializeComponent();
shellWindows = new SHDocVw.ShellWindows(); //Global var
shellWindows.WindowRegistered += shellWindows_WindowRegistered; <-- This is the error

私は一日中グーグルで検索しましたが、誰もこの問題を抱えていないようで、リモートコンピューターでのみ発生します。これらのコンピューターの構成に、この問題の原因となるものはありますか? shdocvw ライブラリに問題はありますか?

4

1 に答える 1

0

Turns out it was actually a problem with Internet Explorer itself.

We wanted to prevent users from doing a lot of things on those computers, we fiddled a bit too much with IE and had to install a special version to block a lot of things.

I rebuilt the machine, tested out the service and it works fine.

于 2016-02-29T22:18:04.347 に答える