
January 5th, 2005, 07:49 AM
|
|
Registered User
|
|
Join Date: Jan 2005
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
System.Runtime.InteropServices.COMException (0x80040155): Interface not registered
hi,
I have developed a service in C#. it send a URL as a attachment in .mht format with a text email. I have used CDO.Message interface's createMHTMLbody to convert URL to .mht format file and saved on local drive. After saving to local drive, attached to the mail. Codes are follows:
CDO.Message mhtBody = new CDO.MessageClass();
mhtBody.CreateMHTMLBody(ReportUrl, CDO.CdoMHTMLFlags.cdoSuppressNone, "", "");
ADODB.Stream stm = mhtBody.GetStream();
string TempFile = Directory.GetCurrentDirectory();
TempFile += "SiteSummary"+session.TestSessionID+".mht";
stm.SaveToFile(TempFile, ADODB.SaveOptionsEnum.adSaveCreateOverWrite);
stm.Close();
ReportUrl is in right format. I have copied CDOSYS.DLL to the bin folder and set reference to the application. Application is getting compiled without error throwing execption at run time. Error is follows
System.Runtime.InteropServices.COMException (0x80040155): Interface not registered
After getting this error, i have also re-registered CDOSYS.DLL but still getting error. I have tried by giving reference from local CDOSYS.dll and C:/winnt/system32/cdosys.dll, but not able to eliminate this error.
A quick help is highly esteemed.
thanks
|