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


Top 5 Contributors of the Month
david stephan
Fauzul Azmi
Asad Ali
Post New Web Links

Problems with security trimmed BDC model

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :SharePoint
 
I've been trying to implement .NET assembly connector with security trimmer in SharePoint 2010. So far I've managed
to create a single wsp-package that implements a crawlable content source and ISecurityTrimmer2.CheckAccess-method
that gets called when objects from this external content source are being shown in search results (implemented as described
in http://msdn.microsoft.com/en-us/library/ee819923.aspx). Now I'm however facing a problem that the items in documentCrawlUrls
given in IList<String>-parameter of ISecurityTrimmer2.CheckAccess aren't of the same type as the identifiers passed e.g.
to ReadItem-method of the BDC model. Instead, they are something like the following:
bdc3://blahblah/default/00000000%252d0000%252d0000%252d0000%252d000000000000/5286/blah/5288?s_id=skaaaaa==uabpac4amaauadiamqawaduanaaxadyangazadia&s_ce=0484840004080g100020o007ufrrvftunn

when the identifier given to ReadItem is e.g. something like:
PO.0.1231235

So the question is, how can I convert the identifier given to CheckAccess into the same format that is used in the BDC model?



View Complete Post


More Related Resource Links

Design Patterns: Problems and Solutions with Model-View-ViewModel

  

The Model-View-ViewModel (MVVM) design pattern describes a popular approach for building Windows Presentation Foundation or Microsoft Silverlight applications. Robert McCarter shows you how the ViewModel works, and discuss some benefits and issues involved in implementing a ViewModel in your code.

Robert McCarter

MSDN Magazine July 2010


CLR Inside Out: Exploring the .NET Framework 4 Security Model

  

The .NET Framework 4 introduces many updates to the .NET security model that make it much easier to host, secure and provide services to partially trusted code. This article dives into the many features and benefits of the .NET security model.

Andrew Dai

MSDN Magazine November 2009


Scripting: Windows Script Host 5.6 Boasts Windows XP Integration, Security, New Object Model

  

Windows Script Host (WSH) 5.6, a major upgrade for the WSH environment, provides some significant improvements over previous versions. A brand new security model that is tightly integrated with security in Windows XP allows administrators to place fine-grained restrictions on scripts reducing the risk from malicious code. In addition, local scripts can now run on remote machines, and enhancements to the object model reduce the amount of boilerplate code needed when writing professional code. This overview of WSH 5.6 explains these changes and how .NET and scripting work together.

Dino Esposito

MSDN Magazine May 2002


Security trimmed URL throws an error if not logged in

  
On a Moss 2007 site, using FBA - I have an issue with security trimmed items within Lists.   There is not a problem with direct url links to non-list items.  
For list items - here is the problem, when a user is not logged in and follows a direct url link from an email or newsletter to security trimmed items within a list - it throws an error instead of offering a redirect to login?

More info:  This is only occurring for individually security trimmed list items that have had anonymous access removed.  When a whole list or library has had anonymous removed, the links work fine (login page appears, log in, taken to original link).



Why is that and is there a way to avoid the error?


If it is of help, this is the error. Thanks in advance.

------------------------
Object reference not set to an instance of an object.


Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not
set to an insta

Private Security Model Integration

  
Does anyone have any recommendations on tieing the Microsoft AS security model in with an independent security model. We are at the beginning process to discuss this with a very large international partner and are looking for recommendations form anyone who has done this before. Thanks in advance Alan

Membership as a security/administration model for upload/download of documents

  
Hi community, I'm working on a website where it should be possible for registered users to upload word documents. The administration of users is done through Membership and Profiles. When the documents have been uploaded, the following needs to be achieved: Non-registered users should not be allowed to download documents I should be able to control which users that has access to which documents I should be able to register which user downloads which documents I should be able to track how many times a document has been downloaded Can this be achieved be using Membership and Profiles? Thanks in advance Best regards Phecdaret

Security trimmed URLs of subsites

  
 I have a nice customized main page of a SharePoint 2010 site where I want to have links to various subsites - but I want the links to be security trimmed based on whether the user has access to the subsite.  I looked into using the SPSecurityTrimmedControl, but as far as I could tell, there was no way to trim based on the permissions of the subsite, only the current (ie main) site.  Is this correct? If not, what is the syntax for getting SPSecurityTrimmedControl to work? If so, how can I go about putting custom links on a page that are trimmed based on subsite access permissions? Thanks.

Microsoft.SharePoint.WebControls.Welcome Not security trimmed

  
https://my.sharepoint.com/_layouts/userdisp.aspx, displays access denied when User permission set to not display /_layout/... Application Pages, this redirect should have never been allowed. How can one report Microsoft.SharePoint.WebControls.Welcome control to the Connect web site?

Security trimmed links in sharepoint

  

Hello,

I was wondering how sharepoint implements this security trimmed links ie what is the architecture that supports it..i googled but could not find useful stuff..can someone please tell me or point me to some resource that shows how SP implements this functionailty.

 

Thanks


Problems adding AD Security Group to SP Group using PowerShell

  

I am trying to create a powershell script that will enumerate SharePoint 2010 permissions and groups from a .csv file. The script needs to

1) Create the SharePoint groups
2) Add an owner
3) Add an active directory doman security group
4) Add a permission level to the SharePoint group.

However, I can't seem to add active directory groups to the SharePoint groups even though the groups exist in SharePoint, as they have been imported through the UPS synch.  This is the code I have been using:


param (

 

    [string] $createspgroups = "SPGroupssh.csv"

 

)

$web = Get-SPWeb http://myserver

 

ipcsv $createspgroups | foreach {

$owner = $web.AllUsers[$_.Owner];

$adgroupname = $web.AllUsers[$_.ADGroupName]; 

$GroupName =$_.GroupName; 

$web.SiteGroups.Add($GroupName,$owner, $adgroupname, $GroupName) 

$memberGrp = $web.SiteGroups[$GroupName] 

$web.AssociatedMemberGroup = $memberGrp 

$memberRole=$_.Permissions

$memberAssignment = New-Object Microsoft.SharePoint.SPRoleAssignment($memberGrp)   

$memberRoleDefinition=$web.RoleDefinitions[$memberRole] 

$memberAssignment.RoleDefinitionBindings.Add($memberRoleDefin

Latest .NET 4 security update causes problems for ClientAuthenticationServices

  

Patch KB2416472 causes Membership.ValidateUser within Client Authentication Services to fail while decrypting the Forms Authentication token.  The Encrypted ticket is 272 bytes long and the Maximum allowed length is 256 bytes.

If you uninstall the patch, the problem is resolved. 

Bill


BDC Model / External Data Type Security - Getting a SqlException

  

Hello All :)

I have some BDC models setup and they're working great. A problem arises when anyone else tries to see the models on my virtual machine.
We're all on the same domain. I have created a number of web parts that have lists bound to the bdc models. When another user on the network attempts to view these webparts, I can see the following in the SP logs;

 

10/08/2010 14:50:42.57 	w3wp.exe (0x12E4)      	0x070C	SharePoint Foundation   	Web Parts      	89a1	High 	Error while executing web part: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.  at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)  at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)  at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)  at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)  at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)  at Sys...	fe8d9c74-fdf0-4d54-a47a-cc0855196b9c

10/08/2010 14:50:42.57*	w3wp.exe (0x12E4)     

HOW TO Extending ASP.NET Security Model to use RIGHTs and Permission?

  

Hi all,


I am new to ASP.NET security model, I need to perform a RIGHT-based security checking for every actions in my applications (e.g. CreateUser, UpdateUser, SearchUser....etc)

However, the built in ASP.NET security model only support ROLE-based security, and I would like to do something like that, but using RIGHTs.

Is there any idea, experience and post I can read and extends the ASP.NET Security Model to use RIGHT-based security to perform granular control.

e.g. How to I write my own HTTPModule, or make use of IPrincipal object.


If there any details steps/tutorial will be great, as I am very new to the ASP.NET.


Thank you so much!



Security trimmed URLs of subsites

  

 I have a nice customized main page of a SharePoint 2010 site where I want to have links to various subsites - but I want the links to be security trimmed based on whether the user has access to the subsite.

 I looked into using the SPSecurityTrimmedControl, but as far as I could tell, there was no way to trim based on the permissions of the subsite, only the current (ie main) site.

 Is this correct? If not, what is the syntax for getting SPSecurityTrimmedControl to work? If so, how can I go about putting custom links on a page that are trimmed based on subsite access permissions? Thanks.


Problems on WF4 Services, Security and Large Objects

  

Dears,

I have a big problem on using WF4 service. There are several questions I cannot find the answer yet.
Hope that anyone can share their experience to me on solving the following problems.

1. How to change the configuration for each WF4 services ?
    I have created several workflow services and once they build, I can find the service by adding a service reference on the client side.
    However, I need to pass a large object such as image or movie like >20MB file to the WF4 service.
    But I cannot find any configuration on the web.config file on the server side that allow me to change the settings like maxArrayLength,
    maxBufferPoolSize ... 

    For these large objects, is that using streaming mode is the best practice? 
    Actually, where can I find those configuration settings for a xamlx file ?
    And, how can I configure the WF4 service to use Streaming transfer mode on server side?
   
    In addition, I need to verify the user's identification inside the workflow rather than let them pass in a username and password
    for security reasons. If I need to do so, I might need to

Categories: 
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