Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Pete Naylor 21 posts 39 karma points
    Apr 27, 2012 @ 16:23
    Pete Naylor
    0

    Help implementing Forum.Businesslogic.Services.IMemberIdConverter

    I'm using a custom membership provider and I'm getting the following exception when creating a new topic.:

    Thread information:
    Thread ID: 58
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False
    Stack trace: at uForum.Configuration.ConverterFactory.GetProviderKeyConverter()
    at uForum.Businesslogic.Services.AuthorizationService.GetUserId()
    at uForum.Businesslogic.Services.PostingService.NewTopic(Int32 forumId, String title, String body)
    at uForum.usercontrols.uForum.NewForumTopic.create_Click(Object sender, EventArgs e)
    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    The front page of this site states 'Forum basics uses ASP.NET membership, and should be able to support and membership provider that your site uses. You just need to implement a small interface (uForum.Businesslogic.Services.IMemberIdConverter) in order to convert the membership providers member ID (which is an Object) to and from a string.'

    Do you have an example of this or further instructions anywhere?

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Apr 30, 2012 @ 11:29
    Morten Bock
    0

    The source uses this method itself for the umbraco membership provider, so take a look at that converter:

    http://uforum.codeplex.com/SourceControl/changeset/view/52608#760793

    As long as you implement that interface, it should be picked up by uForum

  • Pete Naylor 21 posts 39 karma points
    May 08, 2012 @ 13:02
    Pete Naylor
    0

    So I need to write a similar converter, but for my specific membership provider?

    Do I need to compile the code and place the dll in the bin folder, or add the code to the app_code folder to add this? 

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    May 08, 2012 @ 15:50
    Morten Bock
    0

    I have not tried with the app_code folder, but I'm using umbracos own TypeFinder, so if that supports it, then it should work. Let me know how it goes :)

  • Pete Naylor 21 posts 39 karma points
    May 08, 2012 @ 17:07
    Pete Naylor
    0

    Thanks.

    I've got this working now. I copied the code for UmbracoMemberIdConverter.cs and changed the CanHandle method to point to my membership provider and placed the code in my app_code folder.

     

Please Sign in or register to post replies

Write your reply to:

Draft