Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 3rd, 2004, 03:59 PM
Registered User
Join Date: Jun 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ParthaChoudhury Send a message via Yahoo to ParthaChoudhury
Default Problem Using CAPICOM, CDOSYS and EXCEL Interop wi

1. If the attachment is an Excel file (zipped or
unzipped) generated in the app and is sent as secure mail
(S/MIME PKCS#7 encryption), the mail cannot be opened in
outlook - it says, "Your Digital Id can not be found by
the underlying security system". Works fine if the
attachment is a text file (zipped or unzipped).
2. When using CDO, the file(s) used as attachment are
locked and are not available for exclusive access (to be
deleted). If
System.Runtime.InteropServices.Marshal.ReleaseComO bjec()
is used to release the CDO object used, then any
subsequent call to .NET MailMessage object fails saying
NULL reference to CDO.

Application Flow:
1. The application generates result files in Excel or
text format.
2. If output option is "compress", then the file(s) are
zipped up and the result file(s) are deleted.
3. If the mailing option is "non-secure", then it uses
standard .NET mailing and sends the file(s) as attachment.
4. If the mailing option is "secure" and we have a
digital id of the recipient available, then:
a. A CDO Message is created and the file(s) are attached
to it.
b. The message is encrypted (using CAPICOM) S/MIME
(PKCS#7) format and sent out.
5. The file(s) used as attachment(s) are deleted.

The application is written in C# and compiled under .NET v
1.1 and runs as a Windows Service on a Windows 2003 /
Windows 2000 server.


..NET framework assemblies:

Custom .NET libraries
Microsoft.ApplicationBlocks.Data.dll (v 2)
ICSharpCode.SharpZipLib (a ICSharpCOde open source
ICSharpCode.SharpZipLib.Zip (a ICSharpCOde open source
NullableTypes (a sourceforge.net open source project)

COM through Interop:
Excel 11 (2003)
CDO for Windows 2000
CAPICOM (I had to change a few calls in the
typelib to make it work with .NET)
WaitFor.DLL (from Serverobjects.com - waits till you get
exclusive access to a file)


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Interop Issue geomar .NET Framework 2.0 0 February 10th, 2007 09:21 PM
Help needed regarding excel interop livehed ASP.NET 2.0 Basics 0 November 26th, 2006 10:31 AM
Help needed regarding Excel Interop livehed C# 0 November 20th, 2006 02:25 PM
Problem activating Excel Interop lagyossarian ASP.NET 2.0 Basics 1 July 21st, 2006 02:36 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.