This project is read-only.
 The Migrator News Feed 
Saturday, May 09, 2009  |  From The Migrator

Hi all,

I'm somewhat new to development with CS, so please bear with me if I'm missing something simple. I'm using CS 2008.5, and trying to retrieve a log of all conversations that have taken place on the server. For each, I'm looking to log the User IDs of participants and date/userID/subject for each message.


I'm able to retrieve the set of conversations, and the IDs of each user participating in each conversation, but I'm getting errors when I try to access the individual messages. In the code below, "c" is the name for the conversation in a foreach loop, and any attempt to read c.Messages fails. I see the same behavior whether or not the conversations include the user for whom I've created the API key (conversation can't be created without at least impersonating a user who's a member of the conversation.) Likewise, any call to c.LoadMessages() (with any of the various overloads) fails. The code below references LoadMessages(), but I've also tried reading from c.Messages.

I'm using Fiddler to check the HTTP request/response for all of this. The Messages Endpoint in the response to GetConversations appears to be correct - if I put it into a browser, I get a page of XML with all the content I need (messages included). However, the Messages property of the "c in conv" Conversation throws "{System.InvalidOperationException} = {"The requested object was could not be found at this location, invalid Uri"}". This is the same exception I get with any call to LoadMessages().


An example LoadMessages GET/Response is


"GET http://[domain]/cs/api/membership.ashx/conversations/fd2ae371-633d-42bb-b2b4-66c8f924d858/messages/?pageindex=0&pagesize=20 HTTP/1.1"


"<?xml version="1.0" encoding="utf-8"?><Error xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Type>NotFound</Type><Message>The requested object was could not be found at this location, invalid Uri</Message></Error>"


If I simply remove the "?pageindex=0&pagesize=20" portion of the request, the response contains all messages in the conversation. (I don't know if there's an upper limit to the # of messages this will get me - I don't have more than a few in any conversation.) However, even c.LoadAllMessages() still uses that query string, it just sets the pageindex/pagesize to 0.


How can I access this content? Is this a bug in the API? I'm running version 4.1.40407.4157


Thanks,


--Ethan


----------------------------

            PagedList<User> siteUser = m_mbSrv.GetUsers();

            foreach (User u in siteUser)
            {
                MembershipService userService = new MembershipService(CSServerConfig.SiteAddress, CSServerConfig.UserName, CSServerConfig.ApiKey, u.Username);

                int pageSize = 20;
                int pageNum = 0;
                PagedList<Conversation> conv;
                do
                {
                    conv = userService.GetConversations(u.Id, pageNum++, pageSize);
                    foreach (Conversation c in conv)
                    {
                            foreach (UserInfo ui in c.Participants)
                            {
                                Console.WriteLine("\t" + ui.Id);
                            }
                            try
                            {
                                c.LoadAllMessages();
                                foreach (ConversationMessage msg in c.Messages)
                                {
                                    Console.WriteLine("\tMessage" + msg.Id + ", by " + msg.Author.Id + " on " + msg.DateCreated.ToString());
                                }
                            }
                            catch (System.Net.WebException e)
                            {
                                string msg = e.Message;
                            }
                          
                        }
                    }

                } while (conv.Count == pageSize);
            }
        }

Saturday, May 09, 2009  |  From The Migrator

Is there any option to rate the comment?


What code changes are need to do this?

Saturday, May 09, 2009  |  From The Migrator

I want to have more then one blogs in a group.


Do any one have any idea what need to be done?


 

Saturday, May 09, 2009  |  From The Migrator

Hello friends


I want to transfer database from Invision Power Board to community server databse.


Here is the link of invision power board databse


http://calcuttaseo.com/invision-power-board-default-database-tables/


 


I can't understand how the store signature,avtars and uploaded files for media.


Can u explain in detain how to transfer data from invision power board database table to community server database.


 


And also  tell me about functionality how the signature,avtars and post for uploaded files work.


 


I got this link for cs2007 http://weblogs.asp.net/romannikitin/archive/2008/01/08/invision-power-board-2-x-x-to-community-server-2007-converter.aspx


but i have cs2008.I have first transffered database in community server 2007(cs2007) database then it transfer it in cs2008 using project which i got from above link.


But this project transfer only following information


  • convert all users with unique emails
  • Forum structure converting
  • Full converting of threads and topics
  • Optional. Blog auto-create for each converted user.

But it not transfer following information:


  • Additional information (ICQ, Yahoo, MSN information)
  • User signatures
  • Avatars
  • Display names (if they turned on in IPB)
  • User groups and roles
  • Forum permissions
  • Attachments
  • Voting's

 


And i want to transfer remaining information most important information is user signature,avtars and attachment files or uploaded files for media so plz help me


 


 


Please reply me ASAP


Thanx in advance


 


 


 


 

Friday, May 08, 2009  |  From The Migrator

I would like to display content based on an extended attribute of a post.  How can I do this?

Friday, May 08, 2009  |  From The Migrator

I have built a new subform for our createuser.aspx page and I think it is all ready to go and correct. But I cannot get the Create User form to let go of it's old content.


If I completely remove tthe CSControl:CreateUserForm I can render other content to the page. But as soon as I put it back into the page it renders the entire old form, including the old subform and does not even render items outside of the control.


I've removed the subform here to isolate the issue with the CreateUserForm.


<div class="CommonContentBox">
<div class
="CommonContentBoxContent">
<div>hello world</div
> <!-- This renders fine if the CSControl:CreateUserForm is not present, but disappears when the control is present. -->
<CSControl:ResourceControl runat="server" ResourceName="CreateNewAccount_Instructions" Tag="Div" CssClass="CommonDescription" />
<div class="CommonFormArea" >

<CSControl:CreateUserForm ID="CreateUserForm1" runat="server" >
<FormTemplate
>
<div>Hello again</div
> <!-- This never renders, it is replaced by the old form, including the old subform -->
</FormTemplate
>
</CSControl:CreateUserForm></div></div>


I've removed the old assembly, the new one has a different name.


I've changed the registration info and tags on the createuser.aspx page.


I've recycled the App pool several times, restarted IIS several times and emptied the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files folder and restarted everything again.


Has anyone had this happen before and found a solution?

Friday, May 08, 2009  |  From The Migrator


Hello all, im modifying the homepage to show a list of posts from a certain blog,
but running into an issue
 (which im sure im hitting due to my ignorance of CS)

basically im calling


<CSBlog:WeblogPostList runat="server" ID="BlogInformation" ShowHeaderFooterOnNone="true">
<QueryOverrides BlogPostType="Post" PageSize="5" SectionID="8" PageIndex="0" IncludeCategories="false"
IsAggregate="false" IsCommunityAggregatedOnly="false" PostConfig="Empty" />
<HeaderTemplate>
....



Now since i am the only one who has posted in this specific blog, its showing fine. however if i log out of this user and in as another
im getting

"You have not yet posted or commented."

what am i missing that's causing this to happen?

Thanks in advance!

Friday, May 08, 2009  |  From The Migrator

I have a client who runs his website using Community Server. He's asked me to add a price comparsion table to his site that will draw data from a web service I've developed.


What's the recommended approach to developing custom pages within Community Server? Is there any documentation I should be reading?


I'm presuming there are better ways than just having a separate application that links back and forth between the Community Server pages, but I've no idea where to start.


I'm an ASP.NET WebForms/MVC/C# developer.

Friday, May 08, 2009  |  From The Migrator

Hi,


Please guide, how can i create tag based rss feeds in my comuunity server based site.


Deepak

Thursday, May 07, 2009  |  From The Migrator

Does anyone have a best practices guide for deploying CS 2008.5 SP2 on IIS7? I'm trying to optimize the application pool settings and also any other general IIS7 optimizations.

Thursday, May 07, 2009  |  From The Migrator

I am sorry if this is a really basic question.  I am trying to understand how "Forum", "Forum Group" and "Group"  all relate. My guess is:


1) "Forum Groups" main purpose is to group "Forums" that are not part of a "Group" into permission groups


2) A "Group" is almost a sub-community within the community and is a container that can hold "Forums", "Wikis" etc.


3) A Forum can either be in a "Forum Group" or in a "Group".


4) A "Group" can not contain another "Group" or a "Forum_Group".


Is this correct?


What's a "Hub" and a "Section"  and how do they fit in? How do those entities map to the SQL tables?


Thank you,


Patrick


 


 


 

Thursday, May 07, 2009  |  From The Migrator

I am trying to update a user attribute with the rest webservice wrapper.  I am getting the error "Object does not exist (use POST to create this object), invalid Uri".  I am not sure what I am doing wrong.


Here is my code making the call:



Dim



 



service1 As New CommunityServer.WebServices.Service(

ConfigurationManager.AppSettings(


"COMMUNITY_URL")

"COMMUNITY_URL")



, "rrueckl", "jfraapjd")



Dim



 



result As String = service1.Membership.UpdateUserAttribute(2139, "TimeZone", "-3")




Can anyone shed some light as to why I am getting this error?

Thursday, May 07, 2009  |  From The Migrator

Is there a way to set the user's timezone programmatically from a different app?  Ideally I would like to set it through the cookie when initially creating the user.  If that's not possible, can it be done using the REST API webservice?  If so, how?

Thursday, May 07, 2009  |  From The Migrator

I've banned a user with 'Allow Banned Users to Login' enabled, and tried logging in as the banned user for the and the same error message is coming up:

Access Denied for testUserName1


The account you are attempting to login with could not be completely activated. Please contact your site administrator to activate the account or enable automatic account activation.



 


Any ideas what is happening here??

Thursday, May 07, 2009  |  From The Migrator

Hey All,


I read a post in this forum about the ability to allow content regions, so site admins can change sections of copy with a double click.  I imagined it would work kind of similar to the ad place holders.


Does anyone have any details or the name of the control?


I didn't book mark the post and now I am having difficulty tracking down the info.


Many thanks,



Will

Thursday, May 07, 2009  |  From The Migrator

Am using CS 2008/4.x


We have recently started using the shop function to sell merchanside. No problems there.


However I can't generate/extract a list of the order details to send them through to the packing house (we are just selling 1 item - a book). I have to go into each order separately and copy the purchaser and postage details into a spreadsheet (time consuming!)


I'd really appreciate it if anyone has any ideas on reporting  plug-ins/applications that can suck this kind of info out of the CS shop system for me?


Also, I'd be keen to hear about any other suggestions you have in relation to finance reporting on the shop purchases - the ones generated by CS are confusing and don't give me the details I want (item x number of orders x total price paid, including discounts and shipping).


With thanks,


RideStrong Admin
(www.ridestrong.org.nz)

Thursday, May 07, 2009  |  From The Migrator

Hi,

I am trying to filter the most viewed blog posts for last 1 month. This is how my code looks like:

        <CSBlog:WeblogPostList runat="Server" ID="MostViewedPosts" ShowHeaderFooterOnNone="false" HeaderText="Most Viewed Posts">
            <QueryOverrides ID="PostsQuery" PagerID="Pager" IsAggregate="true" BlogThreadType="Month" SortBy="MostViewed" PageSize="15"/>

This doen't limit the blog posts upto one month from today's date. I see posts that goes beyond one month or several months and even years.


ANY CLUE WHAT MIGHT BE MISSING?? DO YOU HAVE ANY SUGGESTIONS?


I also tried this. But still the same.

<CSBlog:WeblogPostList runat="Server" ID="MostViewedPosts" ShowHeaderFooterOnNone="false" HeaderText="Most Viewed Posts">
            <QueryOverrides ID="PostsQuery" PagerID="Pager" IsAggregate="true" BlogThreadType="Month" SortBy="MostViewed" PageSize="15" BlogPostType="Post" ApplicationType="Weblog"/>

Thanks a lot

Wednesday, May 06, 2009  |  From The Migrator

Hello, im adding a "Featured Member" attirbute to the user table, where we can only have one at a time, and that the admin will just go to edit a profile and click a checkbox if that user is featured.


 


That said, I need to be able to set up some validation to assure that only one user is ever featured at a time.  I have been using the example for sub forms that apply an extended attribute called "FeaturedMember"


 


my questions are:


  1. Can i query all the users to assure only one has this applied?
  2. Would a new column in the table be more appropriate?  if so, are there any posts/blogs that detail the best implementation method of doing this?

Thanks!


James

Wednesday, May 06, 2009  |  From The Migrator

We have aninteresting scenario. We have 3 admin users who each have their own blog setup and have been posting to them for months. So say I have the users: abc, def, and ghi, since the blogs were setup using the defaults I have blogs at:


/blogs/abc
/blogs/def
/blogs/ghi


Now they are asking for us to set it up so that an email notification goes out anytime a user posts a comment on their blogs. By default this email will go to the blog owner's (abc, def, or ghi's) profile email address. This is not what they want, rather they want all notification emails to go to a site admin (lets call him 'xyz').


So ideally if I was setting this up from scratch, I would have created the 3 blogs as all belonging to the admin 'xyz' and just assigned users abc, def and ghi as blog authors and it would all work the way I wanted. But as it stands now these blogs have been active now for months so we cant just recreate them or we'll lose all our posts/comments, etc.


My question is, is there anyway to transfer ownership of a given blog, either thru the control panel or thru updating a database table?


thank you

Tuesday, May 05, 2009  |  From The Migrator

How can I check for NULL when calling the rest api getusers??


 


I have


 



  User newCSUser;


            UserQuery query = new UserQuery();


            query.Usernames.Add(userName);           


            existingCSUser = NPWebSservice.GetUsers(query)[0];



 


I want to check for null on this

 The Migrator News Feed 

Last edited Dec 7, 2006 at 11:16 PM by codeplexadmin, version 1

Comments

No comments yet.