SharePoint IP Download Document 401 Unauthorized Error only on InfoPath files

Hi,

We are using the SharePoint integration pack available from CodePlex to download a submitted InfoPath form from a SharePoint 2007 document library.  Whenever the policy runs, it fails on the Download Document step with the following message:

Exception occurred in SharePointDomain::DownloadFile: The remote server returned an error: (401) Unauthorized. Details: Url =<SharePoint URL>, Destination = <local path> Exception: Exception Target site: SharepointDomain.DownloadFile Stack trace: at Opalis.IP.SharePoint.SharepointDomain.DownloadFile(String url, String destination) at Opalis.IP.SharePoint.DownloadDocument.DoExecute() at Opalis.IP.SharePoint.DownloadDocument.Execute(IOpalisRequest request, IOpalisResponse response)

If we use any other kind of document (Word doc, Excel spreadsheet, etc.), the file downloads successfully, so we are not suspecting a fault in the connection configuration.

Any pointers would be appreciated!

Thank you,

Derek

November 28th, 2011 8:26pm

A quick Bing search turned this up:

 

http://knrs.blogspot.com/2010/11/sharepoint-401-unauthorized-when.html

 

"Today, I got an "401: Unauthorized" exception when calling the WebClient.DownloadFile method to download an Infopath file from SharePoint, even if I provided the correct permissions (setting the WebClient.Credentials property).

This was because of the Infopath Forms Server feature in MOSS 2007 Enterprise edition. This feature redirects to the /_layouts/FormServer.aspx page, apparently this was resulting in an Unauthorized exception.

A workaround is to add "?NoRedirect=true" to the url, like this: http://ServerName/sites/SiteCollection/FormLibrary/Form1.xml?NoRedirect=true.

More information about some Query Parameters you can use on the /_layouts/FormServer.aspx page: http://msdn.microsoft.com/en-us/library/ms772417.aspx "

Free Windows Admin Tool Kit Click here and download it now
November 28th, 2011 8:57pm

Hi, Robert,

I've given this a shot, but to no avail.  Since I do not actually build the SharePoint URL, I'm not sure where to put the NoRedirect.  In the configuration, I tried adding to the end of the "SharePoint Site URL" and "List Name".  I also tried adding to the end of the ID field in the Download Document activity.  All ended with different errors.

Do you know if this is something that can be configured as the IP currently stands, or must this become a dev request?

Thanks,

Derek

November 28th, 2011 9:15pm

 

Hi,

 

Please also see if the issue occurs when downloading the InfoPath form directly via the site. Meanwhile, please check the issue referring to the method in the following Knowledge Base article:

 

You receive error 401.1 when you browse a Web site that uses Integrated Authentication and is hosted on IIS 5.1 or a later version

http://support.microsoft.com/kb/896861

 

Hope this helps.

 

Thanks.
Free Windows Admin Tool Kit Click here and download it now
November 30th, 2011 6:58am

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
Free Windows Admin Tool Kit Click here and download it now
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
Free Windows Admin Tool Kit Click here and download it now
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
Free Windows Admin Tool Kit Click here and download it now
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
Free Windows Admin Tool Kit Click here and download it now
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
Free Windows Admin Tool Kit Click here and download it now
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
Free Windows Admin Tool Kit Click here and download it now
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
Free Windows Admin Tool Kit Click here and download it now
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
Free Windows Admin Tool Kit Click here and download it now
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
Free Windows Admin Tool Kit Click here and download it now
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
Free Windows Admin Tool Kit Click here and download it now
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
Free Windows Admin Tool Kit Click here and download it now
December 9th, 2011 11:13pm

Hi Derek,

I ran in to the same problem and found that I could add "?NoRedirect=true" on the Download Attachment module. I ran a Get List Item followed by a Download Attachment module. In the Attachment URL field I put "{EncodedAbsUrl from "Get List Item"}?NoRedirect=true". Hope this helps.

Cheers,

Mark 

 

  • Marked as answer by DMReinhard Friday, December 16, 2011 3:37 PM
December 9th, 2011 11:13pm

Hi Mark,

Just had a chance to get that into our development system, and the Download Attachment module with NoRedirect worked flawlessly.

Thank you for your help!

Derek

Free Windows Admin Tool Kit Click here and download it now
December 16th, 2011 3:37pm

This helps! Thx

February 18th, 2014 2:24pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics