Tuesday, April 15, 2008

Cannot open Infopath attachments in Outlook 2007

I have built an InfoPath form and web enabled it. Users fill in the form in Internet Explorer and attach a file to it. When they press the “Save” button, a mail is sent to some receivers in Outlook. When they try to open the form, they get the following error:


Enlarged error:

I will try to translate the above error message here: “Infopath cannot open the following file c:\documents….” “The file is not a valid xml file”. “The form contains XML that cannot be parsed”. An invalid character was found in the content” and then it complains on the formatting of my attachment field which in this case is “fält2”.
After I press OK on the error message the form opens up as a normal mail, and not in InfoPath as expected:


As you can see, the mail attachment has been converted to an empty textbox!
The attachment is removed, because if I try to open the attached form.xml file I get the same error in InfoPath.
This happens to ALL types of files, except .txt files. If the user attach a .txt file and the form is opened in Outlook, it opens correctly and you can see that attached file:
I have this case at Microsoft right now, and will tell you the solution to this as soon as I get it.

31 comments:

Kris McClure said...

Lise,

Any luck on this issue yet? I am having the same problem with a IFS form deployment. All other forms on the site work fine when emailed to a recipient.

Lise said...

Hi Kris!
No, I have had this case at Microsoft for half a year now - but still no solution in sight! I will post any replies from them that will solve this issue!
Take care,
Lise

Travis said...

I have this same message and just got off the phone with a sharepoint group member. He spent an hour or so looking into it and couldn't solve it. He said that I need to speak with the InfoPath Development team. I'm still waiting for a call back from them. It's bizarre that only a handful of people are getting this. What kind of environment do you have Lise? WinServ2k3R2, Moss2k7, MSSQL2k5? Do you have any updates on this?

Lise said...

Hi Travis!
Thanks for your comment! No, you wouldnt believe for how long time this case has been at Microsoft support... And now that I have changed company they had to close the case... Dude, now there is no solution in sight! The environment is Win server 2003 SP2 with MOSS server (enterprise), one SQL 2005 SP2 (i think it was), MS office 2007, Exchange server 2003, Outlook 2007 clients. I have swedish language templates on the moss installation. I think this problem began when we upgraded our MOSS server from SPS2003. But I am not sure... cant remember anymore, it was waaaay back in time. I have tried all the tools that MS brought me, you know running traces on the exchange server, sending cab files with all logs in it to MS from the moss server, etc etc. And my case has circulated from one InfoPath specialist, through a MOSS specialist to an Exchange specialist... And they all have been very helpful and we ran live meeting so they could check all the settings was okey. Its really strange. Do you get the exact same error as I do? The xml render error in Outlook? Interesting.....
Please keep me posted if you ever find a solution or something else that could be of interest!
Take care,
/Lise

Travis said...

Yes I get the same exact error as you, except it is in English. And I am in the same exact environment as you. Microsoft Support isn't being much help either. There are just so many variables that are keeping me from narrowing down the problem. Some of my forms work, some of them don't. I'm not sure if you had the same results. They did have smiliarities, the ones didn't work all seemed to be above 9KB... except one form. My attachment error isn't consistant either, sometimes it's line 51 position 12, or line 51 position 43, etc. Seems to be completely random. That's disappointing that Micro$oft wasn't able to help you, I hope you got a refund. Oh and we had a contractor open the attachment on his Vista/Outlook 2007 machine and he didn't receive the problem.

Travis said...

I also forgot to mention the forms work great as stand alone. They generate the email and the email attachment isn't corrupt. It's only after I publish it to a sharpoint document library and allow to view the form as a webpage in the form library settings that the attachment becomes corrupt.

Travis said...

Sorry about spamming your blog =) I just thought I'd let you know we just set up a Vista machine with Outlook 2007 and received the same error message, so I'm not sure why our contract who is outside of our domain can see it on his machine and not machines on our domain.

Travis said...

I forgot to ask, what spam filtering did your old company have?

Travis said...

I just found that I can have InfoPath send the email to both myself and the contractor I mentioned. I open it and get that error message, he opens it and does not. When he fowards the email he received from the form to me, I can open it just fine.

Lise said...

Hi again Travis,
Thanks for spamming me - I like :)
I can say check on all your points, but I did find something that differs when attaching files. And that is that .TXT files works! That's the only file format that works, but no other file extension. We used SoftScan as spam filter, which one do you use? I was thinking that maybe it is Outlook conversion (or Exchange) that makes the files corrupt. Otherwise, the .txt files would not work either. Well, all this is a mess and please post more comments here and maybe we can solve this issue together. That would be really nice since MS cant do it. :)
Take care,
Lise

Travis said...

After several hours of troubleshooting we've come to a couple possible conclusions. If I configure InfoPath to email the contractor, he has no problems at all opening the attachment. He can send them to us and we can open them without any problem. I took a form and began taking data control out and eventually it pushed through a small enough file size (35k) and it was able to get through without corruption. So everything is pointing at our MOSS Server communicating with our 2003 Exchange Server, I'm wondering if there is some that is cutting off the xml at a certain point based on file size when it comes from an internal source.

Travis said...

Another possible conclusion is that the contractor's exchange server is exchange 2007 and it is parsing the xml and fixing it somehow. It may be far fetched, but I didn't want to rule out that difference. We're going to try running a virtual server of exchange 2007 this week (hopefully) and see if we can get the email.

Lise said...

Sounds great! Look forward to see the results!
/Lise

Travis said...

Been working with Microsoft the last couple of days playing "climb the ladder" and they did have me make one change. Our Exchange 2k3 server had a different character set than the MOSS server. We couldn't change the MOSS Server to the same settings as the Exchange Server because it didn't have the option, so we had to update Exchange. I didn't write down what it was, I believe it was iso-1885 or something to that effect and MOSS was utf-8. We updated and it didn't fix it. We're going to restart the Exchange server tonight to see if that makes a difference. Microsoft also said that this probably wouldn't fix it, but it's something that needs to be eliminated.

Travis said...

Microsoft also said they've seen this in the past and that clients have upgraded to Exchange 2007 and that fixed the problem. I also believe the technician is going to send me over to the Exchange technicians, so it is definitely looking like there is a problem with Sharepoint talking to Exchange 2k3. We didn't set up a test Exchange 2k7 server yet because we're planning on actually rolling it out in the next month or so, so for now the form submissions will have to work through the Outlook preview.

Lise said...

Hi Travis!
Mhm I can tell you that we have tried that too on our Exchange server. Did not help, at least not in our environment. Went into the STORE properties and made some changes but no luck...
Thanks for the info, you've almost tried all that I have been through :)
Funny if it turns out that you have to upgrade to Exch 2007. Typically MS or what??
/Lise

Travis said...

I knew he was going to suggest that upgrade, which isn't to terrible of news because we are so close. I can only imagine what it would've been like had we done this a year or so ago, they had just installed Exchange 2k3. I was actually curious if you had changed the character set in your environment, hmmmm. I think I've just excepted it for it is and believe the only solution is the Exchange upgrade, but I hope this post is useful for anyone that hasn't upgraded.

Travis said...

This was in my Inbox this morning from Microsoft:
"Other than upgrading to Exchange 2007, there is nothing that can be done right now. We are still researching the issue and I will get back to you this afternoon with any updates we may have."

Lise said...

Wow!! Cool :)
I know they really wanted a solution to this! The technicians I have spoken to at MS were really looking into this issue and were very helpful. But like I said, I had to close the case since I switched company. They said that they had ONE similar case at that time, so this error is so unique and hard to identify. And now you have the same error, so maybe there is a bigger interest now to find a solution.
Hope to hear from you with an answer from MS :=)
/Lise

Travis said...

Well I've migrated over to Exchange Technicians, but haven't worked with them yet. Our Server Engineer has accepted the fact that we need to upgrade to Exchange 2k7 and has already put it in motion. He asked that I call of the Microsoft Hounds, so it appears there still wont be a solution. I thought we were getting close, but the Exchange Server is outside the the scope of my position and without his participation I cannot proceed.

Travis said...

Call OFF the Microsoft Dogs that is.

Lise said...

Hi Travis
So... what youre saying is that you want be able to test if a migration to Exch 2k7 is the solution or? I was so curious to know if that would help. Since I cant test that either....
Well keep me posted, take care!
/Lise

Travis said...

Upgrading to Exchange 2007 fixed it for us! =)

Lise said...

Hi Travis!
Great news!!
Actually, Microsoft has a fix for this if you are still on a Exchange 2003 server. I got a mail the other day from one of the specialists, very kind of him, where he sent me a link to the fix. I have just not had time to write about it! So if anyone wants the link to the fix, I can mail it for you!
Thanks again Travis, have a nice weekend!
/Lise

smmy95 said...
This comment has been removed by the author.
smmy95 said...

Lise,
I have the same issue on opening up the infopath form from the outlook. sometimes it works sometimes it doesnt. can you please send me the link to fix this issue?
Thanks,

Lise said...

Hi Surpeet
I am not sure you got my mail I just sent to you.
Please post your email here!
Thanks
Lise

smmy95 said...

I did get your email but there is no link for thast solution. I am not sure if you have sent any other email beside your post.
Thanks..

Lise said...

Okey :) Here it is, http://support.microsoft.com/?id=968334

/Lise

Alex said...

To my surprise when I had corrupted mail and also had problems with outlook files,myslef helped next software-cannot open pst file,as far as I know it has free status,also utility can open files with PST and OST extension and repair all files from that archives,program permits to process such files, even if they contain viruses or the file is too large, it is safe,compatible with all supported versions of Microsoft Outlook and Microsoft Windows,analyses your mailbox and attempts to identify the mails, that can be successfully retrieved,extract either separate files of *.eml, *.txt and *.vcf format or pack these files to a file of PST format, that can be opened with Microsoft Outlook or any other compatible email client.

Anonymous said...

One man asked me added by the letter to him a photo,I did it,and after that my mails were damaged.Fortunately the same man helped me.He advised-how to open ost in ms outlook 2003.To my surprise program helped me very fast.It was free as he said.Moreover software can open ost file in Outlook 2003 and recover your data from these encrypted *.ost files.