OneDrive Developer Center (redirect)

Looking for the Live SDK?

OneDrive logo

The Live SDK 5.6 is now available

Find it on the OneDrive Dev Center, the new place to find samples, documentation, and other resources for integrating OneDrive into your app.
Choose your download

If you're using previous versions of the Live SDK, the Live SDK 5.5 reference is still available.

 none
Bing Maps Geocode request returns 401 Unauthorized error when call is from SharePoint

    질문

  • I'm developing a SharePoint Timer Job to geocode some lists of addresses held on our SharePoint site.

    I'm using code based on the MSDN samples here: http://msdn.microsoft.com/en-us/library/ff701729.aspx to do the actual Geocoding request.

    The problem I get is that when I call the service from SharePoint (running locally) I get a 401 unauthorised error in return.

    Interestingly, I have also created a small winforms application which does the same thing (but without SharePoint/IIS) using the same code which works perfectly.

    I'm setting the credentials the same way on both apps as follows:

     request.Proxy.Credentials = CredentialCache.DefaultCredentials;

    I'm an enterprise user and I'm using the same key on both apps - but one works and one doesn't - any ideas why this might be? Is it something i need to set in IIS perhaps?

    I tried setting "Pipelined = false" on the request which was a suggestion I read about on but that didn't seem to work.

    Any suggestions gratefully accepted.

     

    2012년 3월 5일 월요일 오후 5:16

답변

OneDrive Developer Center (redirect)

Looking for the Live SDK?

OneDrive logo

The Live SDK 5.6 is now available

Find it on the OneDrive Dev Center, the new place to find samples, documentation, and other resources for integrating OneDrive into your app.
Choose your download

If you're using previous versions of the Live SDK, the Live SDK 5.5 reference is still available.