Tag Info

Hot answers tagged

5

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 ...


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

No, audiences are not supported in the SharePoint client object model. Its only supported in the Server Object Model. In the past I created a Web Service in SharePoint that could take a user name and return the audiences for that user, leveraging the Server Object Model...but that approach probably doesn't work in your scenario.


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

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 ...


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.


2

Are you trying to hide/show links in top navigation bar ? If so, you can assign group level permissions to page which you want to hide . i.e. click edit page in site action menu select page tab in command bar and click on Page permissions from ribbon it will redirect you to permissions page and click on stop inheriting permissions and select the group ...


1

The audiences are not taken into account on the search results page (web part). Managing the security would be the easiest way to implement this. If you really needed to perform audience targeting, consider what it is you are trying to do. Do you simply want to filter the content by audience post-page load. If this is the case then a custom web part that ...


1

First of all: imho I wouldn't use the code sample you have included in your question. That would only allow you to cycle on the collection of web parts available on a page, and then hide the target webpart based on the name. Unless you add some other logic it won't help you, and even then it seems a "cannon to hunt a rabbit" approach (you would modify the ...


1

See my previous answer on the exact same issue here SP Group not for Navigation audience but there it is in the Browse! Yargh! It is a known bug with Target Audience not recognizing groups and can be fixed by providing unique names of SP groups per site collection.


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

Is the active directory group a nested group or are all members added directly to the group. Nested groups as far as i know are not supported by the audiences. If you have a custom audience make sure that the audience is compiled, otherwise SharePoint didn't know who is in the audience. You will find more information on audience here ...


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

Audience targeting will not work with an Active Directory group directly inside of a SharePoint group. If you want to use an active directory group with audience targeting, you'll need to set up an audience in your SSP.


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

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 ...



Only top voted, non community-wiki answers of a minimum length are eligible