Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am using soap to pull data from a list in sharepoint. Pulling plain text fields works great but when I try to pull an image, the only way I can is to pull the URL. The image is stored on the sharepoint server so it asks the user to log in when they view the page.

How can I set permissions so that they dont have to log in? The image must be stored in the sharepoint list.

EDIT: id just like to note that the best way I have found so far to pull an image out of sharepoint is to encode it with a base64 encoder tool like this: http://www.greywyvern.com/code/php/binary2base64

then you can use soap to pull the encoded string like a normal text field. (Apparently I am the only person in the world who is trying to pull images out of sharepoint, there are literally zero resources/posts/documentation about how to do this and not have to log in)

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Matt,

The first question is if this is internal or not.

If it's internal, when the SOAP request is fired, it should fire with the credentials of the user logged in (unless your script is doing something different). If users are on the same network, you should add the URLs to your trusted or local intranet sites to permit the automatic login using the user's credentials.

Your only other option would be to either specify credentials that do have access in your web service request (though there's lots of potential security issues with passing plain text passwords in a public web service request), or enable anonymous access on your SharePoint environment (also not a very good idea).

SharePoint will protect the security of your data, and there's no way to just circumvent those permissions. If you're internal and you can't make this work, then you're likely dealing with infrastructure/authentication issues, or an issue with your script. The end user, or the user that executes the web service request must have access to the content you're trying to access. I can't tell from your question if you're trying to get a public request to secured content (won't work), or if you're just having issues with the authentication piece.

share|improve this answer
    
Well it is public first off (the site isnt live yet however), and I am passing my own credentials for authentication, but I still get asked to log-in. Ive also tried setting anonymous permissions to view content but that didnt work either. –  Matt Grogan Oct 30 '11 at 19:54
    
So you're trying to access data in an internal site with protected content, from a public site... and you're passing plain text credentials through a SOAP request to try and accomplish this? "DANGER WILL ROBINSON" –  webdes03 Oct 31 '11 at 12:47
    
Is there some resource that I can learn more about this? Ill go ahead and accept this response, it kind of answered my question. –  Matt Grogan Oct 31 '11 at 12:57
    
SOAP requests are incredibly easy to intercept, and thus, as a best practice you should never put passwords in them; this approach obviously opens you up to a few security holes. You would also need to take into account your organization's overall topology, as a public site in the DMZ likely can't communicate to an internal system anyway due to either topology or firewall rules. You may be able to develop a custom web service or a custom proxy to expose this data, but you'd need to process the request server side to eliminate the "public plain text password" issue. –  webdes03 Oct 31 '11 at 17:00
add comment

Set the Sharepoint permissions for anonymous access to be able to read items from the image library and you shouldn't have to worry about authentication issues. If that isn't possible, then like Mike says, you have to pass in some sort of authenitcated user account to view the data.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.