.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to apply security trimming to Dataview

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :SharePoint


I have a publishing portal with several publishing sub-sites. These site make up many of my companies internal publications. However some of these publications are restricted to managers or supervisors only. I would like to have a single place on our main portal page that aggregates all of the publications together and performs security trimming based on weather the user has access to the sub-site. I have created a dataview that links all of the sources together, but if I try to restrict any one of the subsites I get the error "Access denied. You do not have permission to perform this action or access this resource." If a user has full permissions to see everything then the dataview works fine. Anyone know how I can security trim the dataview or perhaps security wrap multiple dataviews to restrict which one is shown based on security.

View Complete Post

More Related Resource Links

PortalSiteMapProvider and security trimming


Hi, all. I'm trying to use PortalSiteMapProvider to populate a TreeView on a custom control. Everything works fine but I have one problem that I can't find a solution yet. The way our sites are set up a user can have access to a node on a level 1 node, has no access to any of the direct children of level1 but has access to one of the grandchildren of level1 node:
     Site1.1 (user has access)
           Site1.1.1 (NO Access)
           Site1.1.2 (NO Access)
                 Site1.1.2.1 (has access)
           Site1.1.2 (NO Access)
As you can see the hierarchy of access breaks on 1.1.2 level. When I'm retrieving the SiteMapNodes I can't get Site1.1.2.1.
Is there a way to get to that node with security trimming enabled? Any help is greatly appreciated. I'll paste example code too.

    Public Class NavigationTest
        Inherits SPControl
        Implements INamingContainer
#Region "Private Fields"""
        Private _tree As TreeView

        Private _provider As PortalSiteMapProvider
        Private _siteMapProvider As Stri

File Share Crawl and Security Trimming

I have configured a file share to be indexed by SharePoint using the crawl domain account (which is a farm admin account as well). The crawl account has the necessary read permissions on the share and the crawl was successfull. However when an unauthorized user performs a search, the restricted files are still returned by SharePoint even though the user gets access denied message when clicking on the link. Can anyone please provide me with some information of why that may be happening?? I ensured that the user does not have any permissions on that share and any files in it. Thanks in adavace.

How to apply Web service security??

Dear All, I am new in web service, I want to know if is there any way to authenticate user to access web service, but  I don't want to use authentication process in each function in web service project. Please help..

TreeView with custom site map(security trimming enabled)


Hi all

I am really having tough time fixing this issue, Can anyone please guide me on this..

Here is my situation, I am developing a Portal having 2 xml sitemaps(one for visitors and one for registered users)

Web.sitemap (default) and Loggedin.sitemap(securitytrimming enabled)

I am binding sitemaps to Treeview.When i enable my security trimming  for loggedin.sitemap  i am having these issues.

1.Sitemappath is going blank 2.Selected Node color is not changing. 3.Selected node is not expanding.

 Here is th

is there a fix for Security Trimming on Top and Quick links yet?


If not, is this something thats fixed in 2010?

Bascially security trimming doesn't work on manually created URL's, reltive or otherwise.   Seems to be a common and known issue.  I'm hoping maybe its fixed in 2010 or someone has a way to put them back that I'm just not finding via google?

hopefull thinking



Apply dynamic security on hierarchy -help!


I have branch table where it has following columns .

BranchKey |  Branch  |   Region  | Zone




(this is no parent/child hierarchy )

Using this table i created DimBranch dimension.At the same time i want to implement dynamic security on this dimension. but in that case the bridge table must have user id and branch id. because the key attribute is BranchKey. my problem is how can i implement dynamic security on regions and zones?plz help me ...

Security trimming in SharePoint Search?


I have question related to search. let say there is a user who does'nt have the permission on particular document library but when user do a search, the documents should come on to the search result page from that document library  but when user try to open it from the search result page, user shouldnt or message should pop up saying user doesnt have the perminssion on this document?

Is it possible?


SharePoint Tutorial - Security

Security in SharePoint is comprised of users, groups and roles.

Users, Groups and Roles

A user account comes from the authentication system. For example, if Active Directory is used to authenticate then the user accounts will come from it.

There are two types of groups SharePoint uses: domain groups and SharePoint groups.

Asp.net web site security database


Hello all, I'm new to asp.net and I'm currently practising some few stuffs. I'm creating a hotel reservation system using ASP.net Web site in visual studio 2008 and I currently don't have an App_Data in my solution explorer unlike visual web developer.

1. I have planned to make users of the website login before making their reservations.

2. I have also planned to develop the website such that I will be able to know all reservations made by each user.

First and formost, I will like to know how I can access/View the security database?

Secondly, how do I link my custom made reservation database and the security database in order to achieve my second plan above.?

Someone help me.

Thank you.



hello i have the following problem

i have upload my content to hosting server but i get the following error

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SecurityException: Request for the permission of typ

System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPerm


Good Day all,

Having an issue with an outside user accessing my IIS7 box. I do not have this problem when running the website from my host machine. I found this post: Http://forums.asp.net/t/1371394.aspx. I assure you that this is not a solution because I am not storing any of my files on a network share. 

What do you think my approach should be. 

I already have read rights to IIS user to my BIN folder. 

Thanks for the help. 

XBAP Security


We have a small XBAP file upload app that we are having trouble deploying. We were getting security errors when we were pushing this application that we don't get when running in our development environments on our machines. We gave the XBAP app full permissions and still got errors. Then we created a personal certificate and were able to get this to work. But that means we have to load a client side certificate for each and every machine that wants to run this which is ridiculous. Does anyone have a solution for this?

Intranet Users Challenged When Using Windows Integrated Security


We've setup an intranet site using Windows Integrated Security. Its up and running and users can access it. However, they are being challenged with a login dialog for the server when they initially access the site.

Isn't is possible to configure the server so that the users aren't challenged AND are recognized as being already authenticated by Windows? We're trying to go with a seamless experience, whereby all they have to do is login to their machine like normal and then go from there.

Security Question Answer Retrieval


I know there is a method built in for retrieving the encrypted password, but how do I retrieve the encrypted security answer?

What I want to do is have a member profile update screen that the end user can update their password and security question and answer. However, when they get to this page, I want to already be showing the security question (the easy part) and its answer (the not so easy part).

I have updated web.config with passwordFormat=Encrypted and have added a machineKey with the generator (forgot the link, but located on eggheadcafe somewhere).

I haven't done ANYTHING yet, since I already have a user store with hashed information. I wanted to get some functionality done before publishing, wiping the store and recreating users (only a couple developers).


WCF The Security Support Provider Interface (SSPI) negotiation failed


I am using a wcf service that I created, when both hosting machine and the client machine are on the same domain everything works just fine. When I publish the client app to the webserver in the DMZ I am getting the following error:

SOAP security negotiation with '' for   
'' failed. See inner exception  
for more details.The Security Support Provider Interface (SSPI) negotiation failed.

Here is my service main where I set up the service


 Uri baseAddress = new Uri("Http://");
      ServiceHost selfHost = new ServiceHost(typeof(QBService), baseAddress);


Security negotiation failed because the remote party did not send back a reply in a timely manner. T



Dear All i have created one simple service

like this

namespace WcfService2
        public class Service1 : IService1
        public string ShowEmpName(string strFirstName, string strLastName)
            return strFirstName + strLastName;

after executing in .net command promt i got 2 files

service.cs & output.config

after that i create one class file like this

namespace WcfService2
    public class clientcs

        static void Main(string[] args)
            Service1Client client = new Service1Client();
            string strResult = client.ShowEmpName("Pradeep", "Deokar");

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend