Strange problem with .Fields and copied messages! - Help!
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
Strange problem with .Fields and copied messages! - Help!

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
K Herner
Guest





Posted: Sun Dec 12, 2004 10:58 pm    Post subject: Strange problem with .Fields and copied messages! - Help! Reply with quote

Hi,

I have written an Event Sink (OnSyncSave) that processes all incoming
messages (in a public folder) modifies a few of their fields, and adds
another two.

The sink was working perfectly, until I had a user copy messages from
his Inbox into the public folder. There strange things started to
happen:

For SOME of the copied messages, I get an error (described below) when
doing any operation on the fields. I include the relevant code below.
I've almost pulled all my hair out! I've used Exchange Explorer to try
and locate any differences between the messages that cause the error
and those that don't but there's nothing different!

I have also noticed that no matter how many times you copy the message
from the Inbox to the public folder, the same error occurs. This would
mean (I assume) that there is something wrong with it, and that the
error wasn't a freak one.

Thanks

***********************************E R R O R
***********************************
Friday, December 10, 2004, 04:50:12 PM
Event Name : OnSyncSave
URL of Source Item: file://./backofficestorage/tmship.com/Public
Folders/Incoming Messages/FW%3A M_xF8FF_V AGIOS RAPHAEL.EML
Flags (0x1000041): EVT_NEW_ITEM EVT_INITNEW EVT_SYNC_BEGIN
3736 Operation failed to complete and the status is unavailable.
The field may be unavailable or the operation was not attempted.
--------------------------------------------------------------------------------

EVENT SINK CODE:
.....
strFromEmail = .Fields("urn:schemas:httpmail:fromemail").Value <=
ERROR OCCURS HERE
.....
msgOriginal = .Fields("urn:schemas:httpmail:htmldescription").Value <=
AND HERE
.....
..Fields.Update

Back to top
Tom Rizzo [MSFT]
Guest





Posted: Sat Dec 18, 2004 11:31 pm    Post subject: Re: Strange problem with .Fields and copied messages! - Help Reply with quote

You can't jump stores in Exchange due to a security restriction so when the
sink tries to retrieve properties from the original message in the inbox
(and it's logged onto the public folder store), you will get the error
you're seeing. If you create another connection to the inbox using ADO,
then you should be able to copy the values between the two.

Tom

--
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint? Check out http://www.microsoft.com/MSPress/books/5517.asp



"K Herner" <royalpuk@hotmail.com> wrote in message
news:2ktor0p3smn6nm466losc1pa2v8nl7q42h@4ax.com...
Quote:
Hi,

I have written an Event Sink (OnSyncSave) that processes all incoming
messages (in a public folder) modifies a few of their fields, and adds
another two.

The sink was working perfectly, until I had a user copy messages from
his Inbox into the public folder. There strange things started to
happen:

For SOME of the copied messages, I get an error (described below) when
doing any operation on the fields. I include the relevant code below.
I've almost pulled all my hair out! I've used Exchange Explorer to try
and locate any differences between the messages that cause the error
and those that don't but there's nothing different!

I have also noticed that no matter how many times you copy the message
from the Inbox to the public folder, the same error occurs. This would
mean (I assume) that there is something wrong with it, and that the
error wasn't a freak one.

Thanks

***********************************E R R O R
***********************************
Friday, December 10, 2004, 04:50:12 PM
Event Name : OnSyncSave
URL of Source Item: file://./backofficestorage/tmship.com/Public
Folders/Incoming Messages/FW%3A M_xF8FF_V AGIOS RAPHAEL.EML
Flags (0x1000041): EVT_NEW_ITEM EVT_INITNEW EVT_SYNC_BEGIN
3736 Operation failed to complete and the status is unavailable.
The field may be unavailable or the operation was not attempted.
--------------------------------------------------------------------------------

EVENT SINK CODE:
....
strFromEmail = .Fields("urn:schemas:httpmail:fromemail").Value <=
ERROR OCCURS HERE
....
msgOriginal = .Fields("urn:schemas:httpmail:htmldescription").Value <=
AND HERE
....
.Fields.Update
Back to top
K Herner
Guest





Posted: Sun Dec 19, 2004 12:37 am    Post subject: Re: Strange problem with .Fields and copied messages! - Help Reply with quote

Hi Tom,

Thanks for the reply,

Your explanation sounds logical, however I am not manually copying
messages from the Inbox to the Public Folder within the sink.

The user copies the message himself (by drag & drop), and the
OnSyncSave event fires for the copied item, just as it does for any
other incoming message.

As I wrote, this error happens when copying SOME messages only. i.e.
If the user copies 10 from his Inbox to the Public Folder, then about
2 or 3 give me the error.

The messages that give me the error, are not random. i.e. If I delete
them from the Public Folder and I recopy them, they still cause the
same error, no matter how many times I do this.

I am convinced that there is something about those messages that
causes this. I still have no clue however. Any other ideas?

Thanks

On Sat, 18 Dec 2004 09:31:53 -0800, "Tom Rizzo [MSFT]"
<thomriz@microsoft.com> wrote:

Quote:
You can't jump stores in Exchange due to a security restriction so when the
sink tries to retrieve properties from the original message in the inbox
(and it's logged onto the public folder store), you will get the error
you're seeing. If you create another connection to the inbox using ADO,
then you should be able to copy the values between the two.

Tom


Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
New Topics Powered by phpBB