M
Michael
I am writing an Outlook XP/2003 COM Add-in in C# (Visual Studio .NET 2003).
I would like to also act as a .NET remoting service that clients can connect
to for information. I've added this code to initialize the server component
in the Add-in:
// Set up the remote service.
try
{
HttpChannel myChannel = new HttpChannel(_RemotingPort);
ChannelServices.RegisterChannel(myChannel);
Type myType = typeof(ProjectStateSummaries);
RemotingConfiguration.RegisterWellKnownServiceType(myType,
_RemotingEndPointStr,
WellKnownObjectMode.Singleton);
}
catch (System.Exception e)
{
Log.Write(this, TraceLevel.Error, "Problem registering server remoting
channel.");
Log.Write(this, TraceLevel.Error, e);
}
However, when I look at the RegisterWellKnownServiceType results in
fuslogvw.exe, I get the results below. It appears as if the register call
can't find my own dll, perhaps since Outlook is not a .NET program.
Is there anything I can do to get the service registered properly so that I
can connect to it from C# clients? This product will be commercially
distributed, so I don't want to mess with the Outlook installation or
directories in inappropriate ways...
Michael
*** Assembly Binder Log Entry (2/18/2005 @ 5:45:06 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\fusion.dll
Running under executable C:\Program Files\Microsoft
Office\OFFICE11\OUTLOOK.EXE
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = IssueManager, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=a6ec1e3a68dfd681
(Fully-specified)
LOG: Appbase = C:\Program Files\Microsoft Office\OFFICE11\
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : (Unknown).
===
LOG: Processing DEVPATH.
LOG: DEVPATH is not set. Falling through to regular bind.
LOG: Publisher policy file is not found.
LOG: Host configuration file not found.
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: IssueManager, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=a6ec1e3a68dfd681
LOG: Cache Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Office/OFFICE11/IssueManager.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Office/OFFICE11/IssueManager/IssueManager.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Office/OFFICE11/IssueManager.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Office/OFFICE11/IssueManager/IssueManager.EXE.
LOG: All probing URLs attempted and failed.
I would like to also act as a .NET remoting service that clients can connect
to for information. I've added this code to initialize the server component
in the Add-in:
// Set up the remote service.
try
{
HttpChannel myChannel = new HttpChannel(_RemotingPort);
ChannelServices.RegisterChannel(myChannel);
Type myType = typeof(ProjectStateSummaries);
RemotingConfiguration.RegisterWellKnownServiceType(myType,
_RemotingEndPointStr,
WellKnownObjectMode.Singleton);
}
catch (System.Exception e)
{
Log.Write(this, TraceLevel.Error, "Problem registering server remoting
channel.");
Log.Write(this, TraceLevel.Error, e);
}
However, when I look at the RegisterWellKnownServiceType results in
fuslogvw.exe, I get the results below. It appears as if the register call
can't find my own dll, perhaps since Outlook is not a .NET program.
Is there anything I can do to get the service registered properly so that I
can connect to it from C# clients? This product will be commercially
distributed, so I don't want to mess with the Outlook installation or
directories in inappropriate ways...
Michael
*** Assembly Binder Log Entry (2/18/2005 @ 5:45:06 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\fusion.dll
Running under executable C:\Program Files\Microsoft
Office\OFFICE11\OUTLOOK.EXE
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = IssueManager, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=a6ec1e3a68dfd681
(Fully-specified)
LOG: Appbase = C:\Program Files\Microsoft Office\OFFICE11\
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : (Unknown).
===
LOG: Processing DEVPATH.
LOG: DEVPATH is not set. Falling through to regular bind.
LOG: Publisher policy file is not found.
LOG: Host configuration file not found.
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: IssueManager, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=a6ec1e3a68dfd681
LOG: Cache Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Office/OFFICE11/IssueManager.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Office/OFFICE11/IssueManager/IssueManager.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Office/OFFICE11/IssueManager.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Office/OFFICE11/IssueManager/IssueManager.EXE.
LOG: All probing URLs attempted and failed.