REST API still doesn't work

rated by 0 users
This post has 10 Replies | 4 Followers

Top 10 Contributor
Posts 2,423
Points 19,635
MVPs
Nick Posted: Wed, Jul 2 2008 4:18 AM

Hi, still having problems with the rest API, my media gallery manager which worked in 2008 RTM doesn't work in SP1, I get a nice little error exception about something wrong on the server side.

Little digging and I've found this

"Exception has been thrown by the target of an invocation at CommunityServer.WebServices.Common.BaseService.GetResponse(String url)\r\n   at CommunityServer.WebServices.Common.BaseService.ValidateUserApiKey(String username, String apiKey)\r\n   at CommunityServer.WebServices.Common.BaseService..ctor(String siteUrl, String username, String apiKey)\r\n   at CommunityServer.WebServices.MediaGalleries.MediaGalleriesService..ctor(String siteUrl, String username, String apiKey)\r\n   at nb.development.csmediamanager.Site.get_Service() in H:\\Documents\\Visual Studio 2008\\Projects\\nb development\\nb.development.csmediamanager\\Site.cs:line 69\r\n   at nb.development.csmediamanager.GalleryWorker.Run() in H:\\Documents\\Visual Studio 2008\\Projects\\nb development\\nb.development.csmediamanager\\Workers\\GalleryWorker.cs:line 35\r\n   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n   at System.Threading.ThreadHelper.ThreadStart()"

  • | Post Points: 35
Not Ranked
Posts 17
Points 230

I was getting the same error and fixed it by changing the client to the new one that was included in the solution when I downloaded SP1. The version that came with the SP1 download that I got is Version 4.0.30610.12572.

HTH,

Edgar

- Edgar Dorn

Software Consultant

  • | Post Points: 5
Not Ranked
Posts 7
Points 125

Same here. The problem seems to be in the /api/membership.ashx/users/{username}/apikeys, this does return an error. Putting back the old dll's for the API does solve the problem (so i can keep on developing), but i'm hoping a decent fix will be available soon.

  • | Post Points: 20
Top 10 Contributor
Posts 3,558
Points 53,715
TelligentSupportTeam

When SP1 was initially released, there was an issue with Telligent's obfuscator and the REST (and Mail Gateway) dlls.  Try redownloading CS2008 sp1 and redeploy those two dlls.

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • | Post Points: 20
Not Ranked
Posts 7
Points 125

Have the SDK and Upgrade-packs also been updated? I've tried both, but still have the same errors. Back to the old dll's for me now...

  • | Post Points: 20
Top 10 Contributor
Posts 3,558
Points 53,715
TelligentSupportTeam

I'm not sure about that - try taking them from the web install - they're libary components so you don't need to worry about inconistencies betwen that and the SDK.

I would also say make sure your client app is using the SP1 version of the client dll.

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • | Post Points: 20
Not Ranked
Posts 7
Points 125

afscrome:

I would also say make sure your client app is using the SP1 version of the client dll.

Is that the one from api.communityserver.org?

  • | Post Points: 20
Top 10 Contributor
Posts 3,558
Points 53,715
TelligentSupportTeam

The CommunityServer.WebServices.dll binary included with SP1.

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • | Post Points: 20
Not Ranked
Posts 7
Points 125

That solved the problem. Thanks a lot..

  • | Post Points: 20
Not Ranked
Posts 10
Points 155

hello ,

I am facing the same issue, when I browse cs/api/membership.ashx/users/ganesh/apikeys, I receive target invocation error. as well as when browse cs/api/membership.ashx/users/{userid}/apikeys. It still returns the userdetails and not the apikey details.

how would i solve it

any help is appreciated

  • | Post Points: 20
Top 10 Contributor
Posts 3,558
Points 53,715
TelligentSupportTeam

Ganesh, there's an answer to your question at http://dev.communityserver.com/forums/p/500860/628235.aspx#628235

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • | Post Points: 5
Page 1 of 1 (11 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com