I have developed a Exchange 2003 Managed Async sink using the Onsave event.
My problem is that I cannot get the sink to run correctly without Microsoft
visual studio 2003 installed on the Exchange server.
What happens is that the sink is executing as expected without VS 2003 if I
do not open an ADO connection the message. But if I open a connection
anywhere in the code it does not run at all.
public void OnSave(Exoledb.IExStoreEventInfo pEventInfo, string bstrURLItem,
int Flags)
{
log("Start","Start"); /// write a log entry to a file
}
The above works, while this below does not execute at all (But the code is
loaded by com+ as the dll files are locked as soon as the event is
triggered):
public void OnSave(Exoledb.IExStoreEventInfo pEventInfo, string bstrURLItem,
int lFlags)
{
CDO.IMessage Message = new CDO.MessageClass();
log("Start","Start"); /// Should write a log entry to a file
but dos not when a ADODB connection is made any where in the code without VS
2003 install.
System.thread.Sleep(10000); // I added this line to make sure it had the
time to close the log file but no out put at all.
Try
{
Message.DataSource.Open(bstrURLItem,null,ADODB.ConnectModeEnum.adModeRead,ADODB.RecordCreateOptionsEnum.adFailIfNotExists,ADODB.RecordOpenOptionsEnum.adOpenSource,"","");
}
Catch(Exception e)
{
Log(“Could not read file”,e.Message); // This is never executed either.
}
}
I have signed all interop assemblies,Sink dll and registered the sink dll as
a com+ service. I do not have to recompile the code or rereg with com on
server just install VS2003 to get it to work.
Any ideas why this is not running without visual studio installed?
BRGDS
Martin W. Larsen
Gary Chang[MSFT] - 15 Jan 2005 07:48 GMT
Hi Martin,
Currently I am looking for somebody who could help you on it. We will reply
here with more information as soon as possible.
If you have any more concerns on it, please feel free to post here.
Thanks for your understanding!
Best regards,
Gary Chang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
"Peter Huang" [MSFT] - 17 Jan 2005 02:08 GMT
Hi
Based on my understanding, if we install the VS.NET 2003 then whether or
not we use the ADODB.Connection, the sink will succeed.
If I have any misunderstanding, please feel free to post here.
Based on my experience, the problem maybe caused by the Interop Assembly of
ADODB is not compatible. Are you using the ADODB based on the VS.NET IDE
genereated interop assembly?
If so, I think you may try to use the adodb.dll (adodb PIA).
If we install the VS.NET, it will be located in the path below.
D:\Program Files\Microsoft.NET\Primary Interop Assemblies\adodb.dll
You may check the managed sink dll directory to see if there is such a
adodb interop assembly which means we did not use the adodb PIA which will
may cause the problem.
We can also find the adodb.dll in the Microsoft Exchange Server 2003
Enterprise Edition, it will be located in the path below on the
installation CD.
\setup\i386\exchange\OMA\Browse\bin
Best regards,
Perter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
martinwlarsen@online.nospam - 17 Jan 2005 13:31 GMT
Thanks, it worked when I copied to file \setup\i386\exchange\OMA\Browse\bin
adodb.dll to the sink folder.
BRGDS
Martin w. Larsen
> Hi
>
[quoted text clipped - 26 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" [MSFT] - 18 Jan 2005 07:16 GMT
Hi
I am glad that works for you.
Best regards,
Perter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.