Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Unable to deserialize object from response body of type CommunityServer.WebServices.Serialization.Common.ActivityMessageSerializedSource Error: Line 6: Public Shared Sub AddedQuoteMessage(ByRef quote As Quote) Line 7: Dim service As New CommunityServer.WebServices.Membership.MembershipService("http://www.spiritopedia.com", "secret", "secret") Line 8: service.AddUserActivityMessage("body", "NewForumPost", UserHelper.GetCSUserID(quote.AddedByName)) Line 9: End Sub Source File: C:\Users\Paul\Documents\Visual Studio 2008\Projects\Spirit.Quotes\Spirit.Quotes\BLL\ActivityMessages.vb Line: 8 Stack Trace: [NullReferenceException: Unable to deserialize object from response body of type CommunityServer.WebServices.Serialization.Common.ActivityMessageSerialized] CommunityServer.WebServices.Serialization.Common.Response.GetResponseObject() +222 CommunityServer.WebServices.Membership.MembershipService.AddUserActivityMessage(ActivityMessage message, Int32 userId) +211 CommunityServer.WebServices.Membership.MembershipService.AddUserActivityMessage(String body, String type, Int32 userId) +66 Spirit.Quotes.BLL.ActivityMessages.AddedQuoteMessage(Quote& quote) in C:\Users\Paul\Documents\Visual Studio 2008\Projects\Spirit.Quotes\Spirit.Quotes\BLL\ActivityMessages.vb:8 Spirit.Quotes.BLL.QuotesCL.AddQuote(Quote& quote) in C:\Users\Paul\Documents\Visual Studio 2008\Projects\Spirit.Quotes\Spirit.Quotes\BLL\QuotesCL.vb:33 ASP.addnew_aspx.btnAddQUote_Click(Object sender, EventArgs e) in C:\Users\Paul\Documents\Visual Studio 2008\Projects\Spirit.Quotes\Web\addnew.aspx:36 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746 Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Line 6: Public Shared Sub AddedQuoteMessage(ByRef quote As Quote) Line 7: Dim service As New CommunityServer.WebServices.Membership.MembershipService("http://www.spiritopedia.com", "secret", "secret") Line 8: service.AddUserActivityMessage("body", "NewForumPost", UserHelper.GetCSUserID(quote.AddedByName)) Line 9: End Sub
[NullReferenceException: Unable to deserialize object from response body of type CommunityServer.WebServices.Serialization.Common.ActivityMessageSerialized] CommunityServer.WebServices.Serialization.Common.Response.GetResponseObject() +222 CommunityServer.WebServices.Membership.MembershipService.AddUserActivityMessage(ActivityMessage message, Int32 userId) +211 CommunityServer.WebServices.Membership.MembershipService.AddUserActivityMessage(String body, String type, Int32 userId) +66 Spirit.Quotes.BLL.ActivityMessages.AddedQuoteMessage(Quote& quote) in C:\Users\Paul\Documents\Visual Studio 2008\Projects\Spirit.Quotes\Spirit.Quotes\BLL\ActivityMessages.vb:8 Spirit.Quotes.BLL.QuotesCL.AddQuote(Quote& quote) in C:\Users\Paul\Documents\Visual Studio 2008\Projects\Spirit.Quotes\Spirit.Quotes\BLL\QuotesCL.vb:33 ASP.addnew_aspx.btnAddQUote_Click(Object sender, EventArgs e) in C:\Users\Paul\Documents\Visual Studio 2008\Projects\Spirit.Quotes\Web\addnew.aspx:36 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Are you using the CommunityServer.WebServices.dll from the RTM download? If so, we released an update two weeks ago on our API site and one of the fixes included addressed an issue with adding site activity messages. You can get the updated DLL here: http://api.communityserver.org/download/
Now i'm getting this error. This time, the error is happening upon creation of the service. Not the adding of the activity message.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Unable to deserialize object from response body of type CommunityServer.WebServices.Serialization.Membership.ApiKeyListSerializedSource Error: Public Class ActivityMessages Line 6: Public Shared Sub AddedQuoteMessage(ByRef quote As Quote) Line 7: Dim service As New CommunityServer.WebServices.Membership.MembershipService("http://www.spiritopedia.com", "XXXXX", "XXXXX") Line 8: Dim message As New ActivityMessage Line 9: message.Body = "body" Source File: C:\Users\Paul\Documents\Visual Studio 2008\Projects\Spirit.Quotes\Spirit.Quotes\BLL\ActivityMessages.vb Line: 7 Stack Trace: [NullReferenceException: Unable to deserialize object from response body of type CommunityServer.WebServices.Serialization.Membership.ApiKeyListSerialized] CommunityServer.WebServices.Serialization.Common.Response.GetResponseObject() +222 CommunityServer.WebServices.Common.BaseService.ValidateUserApiKey(String username, String apiKey) +129 CommunityServer.WebServices.Common.BaseService..ctor(String siteUrl, String username, String apiKey) +477 CommunityServer.WebServices.Membership.MembershipService..ctor(String siteUrl, String username, String apiKey) +37 Spirit.Quotes.BLL.ActivityMessages.AddedQuoteMessage(Quote& quote) in C:\Users\Paul\Documents\Visual Studio 2008\Projects\Spirit.Quotes\Spirit.Quotes\BLL\ActivityMessages.vb:7 Spirit.Quotes.BLL.QuotesCL.AddQuote(Quote& quote) in C:\Users\Paul\Documents\Visual Studio 2008\Projects\Spirit.Quotes\Spirit.Quotes\BLL\QuotesCL.vb:33 ASP.addnew_aspx.btnAddQUote_Click(Object sender, EventArgs e) in C:\Users\Paul\Documents\Visual Studio 2008\Projects\Spirit.Quotes\Web\addnew.aspx:36 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
Public Class ActivityMessages Line 6: Public Shared Sub AddedQuoteMessage(ByRef quote As Quote) Line 7: Dim service As New CommunityServer.WebServices.Membership.MembershipService("http://www.spiritopedia.com", "XXXXX", "XXXXX") Line 8: Dim message As New ActivityMessage Line 9: message.Body = "body"
[NullReferenceException: Unable to deserialize object from response body of type CommunityServer.WebServices.Serialization.Membership.ApiKeyListSerialized] CommunityServer.WebServices.Serialization.Common.Response.GetResponseObject() +222 CommunityServer.WebServices.Common.BaseService.ValidateUserApiKey(String username, String apiKey) +129 CommunityServer.WebServices.Common.BaseService..ctor(String siteUrl, String username, String apiKey) +477 CommunityServer.WebServices.Membership.MembershipService..ctor(String siteUrl, String username, String apiKey) +37 Spirit.Quotes.BLL.ActivityMessages.AddedQuoteMessage(Quote& quote) in C:\Users\Paul\Documents\Visual Studio 2008\Projects\Spirit.Quotes\Spirit.Quotes\BLL\ActivityMessages.vb:7 Spirit.Quotes.BLL.QuotesCL.AddQuote(Quote& quote) in C:\Users\Paul\Documents\Visual Studio 2008\Projects\Spirit.Quotes\Spirit.Quotes\BLL\QuotesCL.vb:33 ASP.addnew_aspx.btnAddQUote_Click(Object sender, EventArgs e) in C:\Users\Paul\Documents\Visual Studio 2008\Projects\Spirit.Quotes\Web\addnew.aspx:36 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
Try hitting the webservice directly through your browser. You are missing a DLL:
http://spiritopedia.com/api/membership.ashx
Had you uploaded the newer WebServices DLL to the website? If so, that was not necessary. The updated DLL is only needed on the client side, not on the server site.
Ok, the serverside error is fixed. My api (on server side) is working. I am using the update DLL only on the clientside. I still get an error. Same as the first error I got...
Unable to deserialize object from response body of type CommunityServer.WebServices.Serialization.Common.ActivityMessageSerialized
I hope I can get this resolved.
Thanks for your help!
Maybe I can package up my solution and let you take a look at it?
Sorry for the delay.
I think that might be best. One key thing might be getting your DB. I've tried replicating it locally, but it is working fine.
I've sent a link to the project in a message to you.
Thanks!
I have create a simple console app to try to use the adduseractivitymessage out of the solutions context.
Sub Main()
Dim service As New CommunityServer.WebServices.Membership.MembershipService("http://www.spiritopedia.com", "****", "****")
service.AddUserActivityMessage("body", "NewForum", 2100)
End Sub
I am using the updated assembly from the api.communitysever.com
maybe I can give you access to my production database?
Did your console app work, or did it also throw the error?
I got the stuff you had sent me last week and will be looking at it today.
oops, I forgot to metion that it did also throw the error.
I'm going to package up the console app and send that to you so you dont have to do all that installing of my application.
I sent you a link to download the console app.
When you said you tried it locally, did you use my website and my api key?
Maybe you could try to do the samething I'm trying to do, but using my website and credentials. (they are in the solution I send you).
I don't mind if you add fake activity messages to my site. I'll just delete them later.
Any update on this?
What I think I'm going to do is reinstall the CS and add all my add-ons (which have nothing to do with core), and if that don't work, it must be the database.
How should I go about redoing/reinstall my database? The things is I want to save all the community content on it.
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com