Hot answers tagged audience-targeting
4
No matter how you do it it's going to be a major headache when you're only limited to SharePoint Foundation. You don't have any advanced out of the box user/audience control with SharePoint Foundation.
When you insert webparts, to avoid heavy load on the page, set them to hidden right after you insert them on the page. That way they are already hidden and ...
4
Possibly the most common approach for dealing with this is to use the ASP.net LoginView control. In your master page/page layout/whatever, simply wrap the markup/controls you wish to display to authenticated/anonymous users in a LoginView control - this will allow you to easily specify who should see what.
Effectively you don't need to do anything ...
3
AudienceID is an internal field set by SharePoint. You can't set it, but you can retrieve it if it has been saved to the db.
What is your requirement that means you have to control the audience ID? Typically you would retrieve Audience by name. If you need to you can then access the AudienceID value.
Hope that helps.
3
Step 1
The AudienceLoader class is just a cache of the user's audience information and so it can sometimes give some misleading results. Try using the Audience.IsMember function instead:
Audience audience = audienceManager.GetAudience("Testing");
SPUser currentUser = SPControl.GetContextWeb(Context).CurrentUser;
if ...
2
As Kishork noted, this particular issue was related to a custom audience filter. Just wanted to add that we've seen this same issue several times in our Sharepoint 2010 environment after using Metalogix to move content, or running various jobs. The initial symptom is the same - the target audience property isn't visible when editing a web part.
Running ...
2
Solved
By mistake we had a "-" char in the word "Culture" in web.config
Long version:
We were implementing custom audience Runtime Filter to enable targetting for Anonymous users and we replace the OOTB "Microsoft.Office.Server.Audience.AudienceManager" runtime filter with our custom audience Runtime Filter
When making the entry into the web.config ...
2
You may get some errors while running this script but you will find that its worked too :)
URL FIX
$hubUrl = "NEW_NAME_OF_WEBAPP"
$find = "OLD_NAME_OF_WEBAPP"
"Installing..."
Add-PSSnapIn Microsoft.SharePoint.PowerShell
if ([Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") -eq $null) { throw "Unable to load Microsoft.SharePoint.dll!"; ...
2
AudienceLoader objAudLoader = AudienceLoader.GetAudienceLoader();
AudienceManager.IsCurrentUserInAudienceOf(objAudLoader, audience, false)
The AudienceLoader belongs to Microsoft.Office.Server.Audience namespace and documented here: http://msdn.microsoft.com/en-us/library/microsoft.office.server.audience.audiencemanager.iscurrentuserinaudienceof.aspx
...
2
To my knowledge you do not add User to an Audience, but rather build rules that would include the respective user to an audience.
Creating rule based Audiences is available here http://msdn.microsoft.com/en-us/library/ms498178
Then you could check is user is part of an Audience in a particular Web, see here http://msdn.microsoft.com/en-us/library/ms500775
2
Please refer link below link Mr. Raju
http://social.technet.microsoft.com/Forums/da/sharepoint2010programming/thread/181fdb91-b16d-4e51-a9a4-454c8ad1c374
You will find that it is not possible because SharePoint manages GUID internally. so you can not assign it. in some cases it is possible but in your case it is not possible.
1
I would have your code that you have above within all the webparts!
if (boolThisTypeOfUser) // needs particular webparts
{
//createchildcontrols as normal
}
can you see where im getting to? this way it knows to show the webpart by carrying on with the code within the createchildcontrols! otherwise dont do anything!
Your also getting rid of the ...
1
Actually the best option is to use the Security Trimming controls, as in http://fusionovation.com/post/2008/09/18/security-trimmed-controls-in-sharepoint.aspx
As you would immediately realize is they do not support SPGroups, so find here a solution doing exactly this http://www.dhirendrayadav.com/2011/08/extending-sharepoint-security-trimmed.html
I find it ...
1
Design the ascx carefully, the portion you want to show/hide declare the part as runat="server", example -
<table>
<tr id="trShowHide1" runat="server">
//some content
</tr>
<tr id="trShowHide2" runat="server">
//some content
</tr>
</table>
and in CreateChildControls() event (or if you think any other event ...
1
I was able to do this. I created a custom stored procedure (by copying and modifying the one used by the API to create audiences) to create the audience with the GUID I needed. Look at the ORGLE procs inside the Profile DB to see how this is done.
Anyways, once I created the audiences with the proc. I used central admin to configure the rules.
In general, ...
1
Using Audiences would not give you the security that is otherwise enforced by the Permissions. Anyone knowing the item's address would be able still to access it.
Audiences are mostly used in scenarios such as content targeting, but does not change permissions access based on these rules, e.g. it only hides/shows web parts or records, depending on which ...
1
It seems even with complex programming (http://msdn.microsoft.com/en-us/library/ms578007.aspx) does not allow you to create the rule because with membership, the only operator I know of is "Member of". See if following helps:
Create three group names and put people in right groups:
Coders (Set A)
Managers (Set B)
Managers who can write code ...
1
Verify that these two checkboxes are checked in your CQWP properties:
Apply Audience Filtering
Include items that are not targeted
I believe that you need the "Apply Audience Filtering" for the item level targeting to work. "Include items that are not targeted" is needed to show things that have no targeting.
1
I love how "This doesn't quite seem complicated enough to me." is the typical response from most SharePoint folks when presented with a 5 step process to get some basic out of the box thing to work. I'm constantly astonished by the sheer amount of unnecessary complexity in this product. Anyway...
Not that this will be that helpful but; I ran into a similar ...
1
It is a common misconception to think that target audience has to do with permissions. Target audiences are ment to push out information to certain audiences, but there are no security involved.
Target audience can be used to determine conditional rendering of OOB webparts, rendering of list items in list view webparts (if audience is enabled on list ...
1
It seems as this was an Alternate Access Mappings issue. In the logs I found errors along the lines of:
A request was made for a URL, https://domain.com:449, which has not been configured in Alternate Access Mappings.
I added this mapping, and the audience targeting is now back.
1
I know Gary Lapointe did some STSADM extensions for this in SP2007. Audiences isnt changed from what i know in SP2010 so its worth a try http://blog.falchionconsulting.com/index.php/2009/04/exporting-audiences-using-stsadm/
1
We use audiences alot, both for targeting web part content on pages, and for targeting list items like publishing pages to specific targets.
You can also use them to target navigation links on my sites.
Both me and my colleagues use audiences quite alot. They do have some teeth that can bite you, if you want to move your content as they contain guids that ...
1
There are a few steps. Here is a nice checklist:
http://office.microsoft.com/en-us/sharepoint-server-help/target-content-to-specific-audiences-HA010169053.aspx
I'll add that the Target Audience concept in SharePoint is a difficult thing to understand. It is almost easier to describe what it is not, rather than what it is. What it is not: a security ...
1
This is critical to understanding how SharePoint collects information, from AD, about group membership. SharePoint does NOT import the membership of groups by directly querying those groups. Rather, SharePoint determines what groups a user belongs to by reading the user’s memberOf property. But the memberOf property will not show a user’s membership in local ...
1
I didn't answer when this was first posted because I wasn't sure of the specific details, but my understanding is that When members of Domain_Two belong to a group in Domain_One the reference or link is not the same as it is for the local users so it doesn't make the match.
I had the same issue a few years ago when I had multiple domains and Security groups ...
1
Global audiences are created by utilizing the user profile information that is imported into user profiles. An administrator will create an audience rule or rules that will review the profiles currently imported by the user profile import and either include the person in the audience or remove them from the audience based on whether or not they meet the ...
1
By turning on audience targeting you are essentially saying that the contents of this pages library are going to be targeted at specific users/groups.
If your expecting most people to be accessing the site via anonymous access then how can you target any individual users or groups? So what is the benefit to having audience targeting turned on?
If there is ...
Only top voted, non community-wiki answers of a minimum length are eligible

