Object not found in store error when trying to load MimeContent of an email (containing attachments)

This is a weird one and I'm hoping someone can reproduce this and give me some help.
We have a system that uses the EWS Managed API to send emails. Optionally an email may need to be saved out as an rfc822 (.eml) file afterwards for storing in our own database. In order to save to a file I need to load up the MimeContent of the message.
And this is where an "Object not found in store" exception can get thrown.
The really strange part is that the exception only seems to occur if the email contains an attachment and if there is too much of a delay between sending the email and trying to access the MimeContent!
My test code is something like:
// Set up the basics
_item = new EmailMessage(P7ExchangeService.Service);
_item.Subject ="Hello world";
_item.ToRecipients.Add("some name", "[email protected]");
_item.Body = new MessageBody(BodyType.HTML, @"<html><head></head><body>hello world<image src=""cid:blah""/></body></html>");
// Add attachment
FileAttachment att = _item.Attachments.AddFileAttachment("blah", "c:\temp\blah.jpg");
att.IsInline = true;
att.ContentId = "blah";
// Send and save
_item.SendAndSaveCopy();
// Wait a bit (see comments below)
Thread.Sleep(5000);
// Now try and save out
var propCollection = _item.GetLoadedPropertyDefinitions();
propCollection.Add(ItemSchema.MimeContent);
_item.Load(new PropertySet(propCollection)); // EXCEPTION!
// ... etc
On some systems it seems that the sending can take a while, hence my Thread.Sleep() call to simulate this.
Its when I try and load up the MimeContent that I will then get the exception. But ONLY if I sleep (simulating the occasional delay seen on customer sites) and ONLY if the email contains an attachment.
The mimecontent is necessary in order to save out to a file (by accessing the _item.MimeContetn property).
Can someone please explain the exception and/or provide a better way of doing this??

This is normal EWS doesn't return the Id of the Item in the SentItems Folder so you need to use a workaround like
http://blogs.msdn.com/b/exchangedev/archive/2010/02/25/determining-the-id-of-a-sent-message-by-using-extended-properties-with-the-ews-managed-api.aspx .
If you want to understand the issue you can enable tracing and look at responses, the actually Id your trying to load the MimeContent from is probably the Id of the draft message. Eg to send a message via EWS with attachments multiple operations must be
used to construct it and when the messages finally gets sent the copy in the drafts folder is deleted and a copy is created in the SentItems folder. However the Id isn't returned for the SentItems copy hence you need the workaround.
Cheers
Glen

Similar Messages

  • Your profile option does not allow automatic numbering error when trying to load BSA

    We are getting this error while trying to load BSAs. The profile option is set to always at the responsibility level,
    The same code and settings were tested in lower instances and it went through fine
    Document sequence is set correctly.
    Any inputs to resolve this issue would be greatly appreciated. It has stopped out production Data conversi
    Thanks
    R

    Hi Winsky,
    Ensure Profile: Sequential Numbering must be set to: 'Partially Used' at app level
    Refer the following note and check whether it helps:
    I Get The Error: Your Profile Option Does Not Allow Automatic Numbering. [ID 560388.1]
    In Order Import stuck record with error "Your Profile Option Does Not Allow Automatic Numbering" [ID 1083645.1]
    Best Regards,

  • Why am I getting an app store error when trying to download Lion?

    Why am I getting an app store error when trying to download Lion? Any ideas?

    I would complain really bad and get them to give you a Flash card that they just came out with because they've inconvenienced you so much and  you don't have hours to spend at the apple store waiting for the whole thing to load.
    The only thing about the flash cards is that it will change your whole motherboard so it won't allow you to install snow leopard or anything less, ever again. (as what the apple specialist told me over the phone).
    I would also suggest waiting. It really isn't worth the hastle and you may not benefit from installing it on your old computer... just a thought.

  • "404 Not Found nginx" Certificate Error when performing Google search

    Ever since I upgraded to Mavericks on my 2.4 GHz Intel iMac I have started getting occasional errors when trying to access Google sites (search, docs, calendar, YouTube, etc).  In Safari, I get the warning that the Certificate is Invalid, and when I view the certificate I see a hierarchy of Certificates: "Class 3 Public Primary Certification Authority > Verisign Class 3 Public Primary Certification Authority - G5 > Verisign Class 3 Secure Server CA - G3 > [and here is the weird part to me] a web domain *other than* google or the site I am visiting, e.g. "www.netflix.com" (I don't have a netflix account), or www.skype.com, or others.  Sometimes when I then accept the certificate I am redirected to the site listed in the cert screen, e.g. Netflix, other times I get a screen that says "404 Not Found nginx", other times a screen saying "Invalid URL: The requested URL "/", is invalid. Reference #9.4d290e6b1389574.4981108".  I am then not able to access any google sites until some time has passed. This happens in all browsers; it is not specific to Safari.
    Other notes:
    -My computer's date and time is correct
    -I deleted the SystemRoot Certificates for Verisign and the problem went away but not having that certificate created a lot of different problems.
    -I reinstalled Mavericks to get the System Root certs back and the problem returned
    Thanks for any advice you have.

    1. Have you restarted your router and your broadband device (if they're separate) since you first noticed the problem? If not, do that now and see whether there's any change.
    2. From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Privacy ▹ Remove All Website Data
    and confirm. Test.

  • I get a "the requested URL was not found on this server" when trying to play a song in my iphone

    I have a new iphone5 and after synking my songs and musice. I get a "The requested URL was not found on this server" when I click on a song or a music video. It is almost like itunes did not copy my songs from my account to the new iphone.

    I was having the same problems with my movies and tv shows.  I unchecked them, then rechecked them, and synced all them again.  Presto!  They are all working again.  Thank you.

  • Error when trying to load data from ODS to CUBE

    hi,
      Iam getting a short dump  when trying to load data from ODS to CUBE. The Run time error is 'TYPELOAD_NEW_VERSION' and the short text is 'A newer version of data type "/BIC/AZODS_CA00" was found than one required.please help me out.

    Hi,
    Check this thread.........Ajeet Singh  has given a good solution here.........
    Re: Error With Data Load-Getting Canceled Right Away
    Also check SAP note: 382480..................for ur reference............
    Symptom
    A DART extraction job terminates with runtime error TYPELOAD_NEW_VERSION and error message:
    Data type "TXW_INDEX" was found in a newer version than required.
    The termination occurs in the ABAP/4 program "SAPLTXW2 " in "TXW_SEGMENT_RECORD_EXPORT".
    Additional key words
    RTXWCF01, LTXW2U01, TXW_INDEX
    Cause and prerequisites
    This problem seems to happen when several DART extraction jobs are running in parallel, and both jobs access table TXW_INDEX.
    Solution
    If possible, avoid running DART extractions in parallel.
    If you do plan to run such jobs in parallel, please consider the following points:
    In the DART Extract configuration, increase the value of the parameter "Maximum memory allocation for index (MB)" if possible. You can estimate reasonable values with the "File size worksheet" utility.
    Run parallel DART jobs on different application servers.
    As an alternative, please apply note 400195.
    It may help u.........
    Regards,
    Debjani.......

  • Error when trying to create new element in workflow container

    hi experts,
    I hit an error 'cusomer-own workflow are not allowed to be configure" when trying to create a new element in the container.
    have anybody come across this problem and how to overcome it
    TQ

    Aren't customer task not used anymore?
    Or am I mixing things up here.
    Well the problem isn't a problem it is SAP standard behaviour you simply can't configure customer tasks (type T in PFTC)
    You can only configure Standard Tasks (TS) or workflow templates (WS)
    Kind regards, Rob Dielemans
    Edited by: Rob Dielemans on May 29, 2009 12:51 PM
    Just had a look at the SAP help and indeed types T aren't allowed anymore SAP gives the solution to copy the customer task, this will automatically change it to a standard task

  • Error When trying to load master data 0material

    Hi,
    I got the following error when trying to laod 0MATERIAL master data
    "value '000000000004343434 ' for characteristic 0MATERIAL is in external format     "
    "0MATERIAL : Data record 1 ('000000000004343434 '): Version '000000000004343434 ' is not valid
    Can anybody help me in resolving this issue.
    Regards

    Hi,
    Run transaction OMSL.
    Create an entry for MATCONV in the overview screen.
    Double click on this line and set the length parameter for MATCONV.
    the same transaction exists in the r/3 OLTP system compare the 2 systems to set the right values in the details screen in BW.
    Hope this helps
    Provide points if it does.
    Regards
    Lalan

  • Bw problem/error when trying to load data

    hi experts i suddenly have this issue when trying to load data anywhere in my bw system (psa,ods,infocubes) i get the following abap runtime error:
    SNAP_NO_NEW_ENTRY
    runntime error,short dump could not be written
    and bellow that it generally says that SNAP is full and i need to create more free space
    any suggestions what i should do?
    ps.i ve tried the re-organize option and no luck, i need to take more drastic measures
    thanks

    check the below thread...
    [SNAP_NO_NEW_ENTRY;

  • Method not found in class errors when compiling project

    Hi,
    I am getting the following errors when compiling my project:
    Error(3,8): ReqLinesNotificationsVORowImpl not found
    Error(25,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(31,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Number) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(37,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(43,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Number) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(49,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(55,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Number) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(61,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(67,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(67,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(79,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(85,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(91,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(97,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(103,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(109,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(115,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(121,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(127,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Number) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(133,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(139,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Number) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(145,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(151,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Number) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(157,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(163,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(169,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(175,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(181,23): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(187,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Date) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(193,23): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(199,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Date) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImplError(205,23): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    I have ReqLinesNotificationsVORowImpl and ReqLinesNotificationsVOImpl files in myprojects directory. Can anyone help please?
    Thanks

    Hi,
    From the error it seems that the code is refering ReqLinesNotificationsVOExRowImpl file.
    Please make sure that its class file is present in myclasses folder.
    Since u have mentioned that ReqLinesNotificationsVORowImpl is already placed in myclasses folder. Hope this should resolve your issue.
    Regards,
    Raj Papdeja

  • TS4036 could not sign in server error when trying to restore iphone from icloud

    I am trying to restore my iPhone from an iCloud  backup.  I deleted everything on the phone per restore instructions. Connected to wireless on iPhone.  Logged on to my iCloud account.    Told the iPhone to restore from iCloud backup.  I keep getting ""could not sign in" server error OK.  I get this messge over and over.

    I actually noticed when I had this problem just now that my iPhone 4 wasn't on wif. Only connected to 3G even though I entered my network info and clicked connect. So I backed up a few steps and re selected to connect to wifi and it fixed my issue!

  • Apple os x 10.7 server "not connected to internet" error when trying to download "essentials" through working wifi internet connection?

    Lion and Server downloaded fine, but Server wants additional "essential files" .
    I try to load these but I get "not connected to internet" error message despite working wifi internet connection?
    How to proceed (connection is good, firewall off,??)

    answer at https://discussions.apple.com/thread/3189925?tstart=90

  • ASP app is throwing error when trying to load any of the Crystal Reports

    The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.
    A couple notes:yes, I did search for this problem, I've read (and have been confused by) the documentation both on MSDN and this site. I've never used Crystal within a .NET application that I've written, so please treat me like an idiot.  I've got 16 hours in this issue and I can't figure out what to do.  I don't want to go too far into what I have already tried; I'd rather start a fresh conversation with you (the kind person who is going to save me from death at the hands of my users).
    My application was written in .net 1.1 by an outside source.  Since then, other apps were installed on the same server that were .net 2.0 (don't know if this is relevant).  Recently, we reformatted the server.  When I dropped the application back into its former location and hooked it up to IIS, everything was fine except now we can't get any of the reports to load.  We just get the error above, along with another that says "CrystalReportViewer - rptViewer Error: Object reference not set to an instance of an object."
    The same thing happens on both my Win 2003 app server and my XP SP4 development machine.

    I was doing a side-by-side comparison of the new and old server (we backed up the server before the reformat) and I can see that, evidently, CR XI was installed.  We have the directory C:\Program Files\Common Files\Business Objects\3.0 and all the versions match what is located in the project's bin directory.  Does this confirm that I did have XI installed and licensed at one time?
    If I purchase a more recent version, couldn't I update the reports to use the newer version?  I have all the source code.
    Thanks for your help, it is a nice sanity check for me after hours of reading forums and documentation.
    Also, just a shot in the dark, but I'm assuming it wouldn't do me any good to simply restore the aforementioned folder to my C drive?  Would that work if I registered all the dll's?
    Edited by: Eric Hollering on Dec 2, 2009 6:40 PM
    To be clear, I do have VS 2003 & 2005, and I have the source code.  I just have never used Crystal Reports in any of my .NET apps because the need wasn't there, so recompiling is not out of the question.
    Edited by: Eric Hollering on Dec 2, 2009 6:49 PM
    Also, I looked at the CrystalDecisions.CrystalReports.Engine.dll that was in the C:\Program Files\Common Files\Business Objects\3.0\Managed folder and when I right-click and view the properties, then the Version tab, in addition to the 11.0.9500.2 version number, there is a property called Product Version that has the value .NET.  Does that mean that this dll was bundled with Visual Studio?
    I also found this directory on the old server...does this tell you anything?
    C:\Program Files\Business Objects\BusinessObjects Enterprise 11
    I did see that you can still buy XI from CDW.  I have a call into them currently to check with Business Objects for any registrations from my company.
    Edited by: Eric Hollering on Dec 2, 2009 8:27 PM

  • "Invalid file name" error when trying to load the report in IIS/CR 2008

    We have deployed our application to many installations with no problem however in one particular case we get this error whenever we try to load any reports in our web app.
    I made sure that the DefaulAppPool user (Network Service) has read+excute on all folders as well as the IIS anonymous user.
    The anonnymous access is off but Windows Integrated Security is on.
    ASP.NET Version:2.0.50727.3082
    Web.config is healthy and is listed below.
    Other pages in the application which are not depenent on C.R load and run perfectly.
    I don't know what else to check
    thanks for you help
    jeff
    Web.Config Entries related to CR ***********
    <compilation debug="true">
    <assemblies>
    <add assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Shared, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.ReportSource, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Enterprise.Framework, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Enterprise.Desktop.Report, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.CrystalReports.Engine, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Enterprise.InfoStore, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Enterprise.Viewing.ReportSource, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
    </assemblies>
    <buildProviders>
    <add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></buildProviders>
    </compilation>
      ERROR DETAILS *****************
    [COMException (0x800001fb): Invalid file name.]
       CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0
       CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +95
       CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +356
    [CrystalReportsException: Load report failed.]
       CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +418
       CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.get_ProductLocaleID() +31
       CrystalDecisions.ReportSource.CachedObjectReportSource.GetReport(RequestContext context, Boolean bAddToCacheWhenCreated) +474
       CrystalDecisions.ReportSource.CachedObjectReportSource.InternalGetReport(RequestContext context, Boolean bAddToCacheWhenCreated) +15
       CrystalDecisions.Web.CrystalReportSource.get_ReportDocument() +184
       CrystalReportPageTemplate.OnInit(EventArgs e) in

    I got a procmon log file and examined it. I have the file and I could also provide you with that or screenshots of it.
    There is nothing unusual about it. I can see entires in which CR has successfully opened the report and has cached in a c:\windows\temp.
    However there is one or two non-successful entries that may be related, especially that examining the stack trace brings us to a call to get_ProductLocaleID():
    - A call to read reg entry HKU\S-1-5-20\Software\Business Objects\Suite 12.0\Crystal Reports\Locale fails with NAME NOT FOUND.
    - immediately after that and from the same process (w3wp.ex) there is a call to open directory "c:\" which is logged as ACCESS DENIED.
    Any subsequent unsuccessful calls seem to be results of exception handling in the debug code.
    Does this point to any setup issues with CR? We always run the redistributable x86 runtime when installing it.

  • Getting Kernel32.dll procedure entry point errors when trying to load NI-IMAQ v2.6.1

    Here is a copy of what appears in the Error Log:
    Application popup: setup.exe - Entry Point Not Found : The procedure entry point GlobalGindAtomA could not be located in the dynamic link library KERNEL32.dll.
    I have also recieved the following:
    Application popup: autorun.exe - Entry Point Not Found : The procedure entry point TerminatePsocess could not be located in the dynamic link library KERNEL32.dll.
    and:
    Application popup: autorun.exe - Entry Point Not Found : The procedure entry point IsCadReadPtr could not be located in the dynamic link library KERNEL32.dll.
    FYI - software loaded onto a IDENTICAL machine (hardware) w/o difficulty.

    Is the other machine "IDENTICAL" in terms of operating system, software, etc? Does the error occur when trying to acquire an image in Measurement & Automation Explorer (MAX), as well as in your programming environment? Have you tried reinstalling the NI-IMAQ driver? Has this system always exhibited this problem, or are these errors a new phenomenon?
    Best regards,
    Dawna P.
    Applications Engineer
    National Instruments

Maybe you are looking for