Bing Maps Geocode request returns 401 Unauthorized error when call is from SharePoint
-
5 มีนาคม 2555 17:16
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.
- ย้ายโดย Richard_BrundrittMicrosoft, Owner 16 มีนาคม 2555 18:48 (From:Bing Maps: Map Control and Web services Development)
ตอบทั้งหมด
-
10 มีนาคม 2555 13:54เจ้าของ
The error you are seeing is not from Bing Maps. If you are using the same credentials in both apps then it has to be something else. This may be a security issue with SharePoint.http://rbrundritt.wordpress.com
- เสนอเป็นคำตอบโดย Richard_BrundrittMicrosoft, Owner 10 มีนาคม 2555 14:02
- ทำเครื่องหมายเป็นคำตอบโดย Richard_BrundrittMicrosoft, Owner 16 มีนาคม 2555 18:48