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.

     

    5 มีนาคม 2555 17:16

คำตอบ