4 Responses to “MySite Redirect Update”

  1. Nick Hadlee Says:

    Hi, Fantastic idea, unfortunately I havent been able to get this to work. The wsp was added/deployed fine, I even checked to make sure the dll was deployed to the GAC etc. I confirmed the feature was activated but the same userdisp.aspx page is displayed. Is there another step or should this just work once deployed?


  2. Keith Dahlby Says:

    Hey Nick ~

    In theory it should “just work” once the feature is activated, assuming the other necessary pieces are in place (SSP with user profiles, My Site for the user, etc). Any evidence of foul play in the ULS Logs? Beyond that, you might try changing the Sequence value in Elements.xml to something lower. In a development environment you can always attach to the process and see if a breakpoint at OnFormInit gets hit. Or build a version that logs exceptions instead of just ignoring them. Let me know if you figure it out!

  3. Nick Hadlee Says:

    Hi Keith, Took a little bit of digging and some quick trial and error. In the end I created a new control with your logic and attached the debugger as suggested.

    Looks like it was this line RedirectIfNecessary(user.Title);. When the final redirect string was created it would pass the users display name, and appear to do nothing as I’m guessing it must redirect back to originating page if the profile lookup fails. For it to work for me it wanted the account name so I changed that line to
    RedirectIfNecessary(user["Account"].ToString()); to pass the account name instead. Starting working fine after that…?!

  4. Keith Dahlby Says:

    Thanks for reporting back! I’ve confirmed the behavior you report and will be releasing a new version shortly. That’s what I get for superficial testing. :)

    I hate hard-coding field names and am paranoid about null reference exceptions, so this is the code I’m using:
    RedirectIfNecessary(user[SPBuiltInFieldId.Name] as string);

    Thanks ~

Comments are closed.

%d bloggers like this: