.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

Can't find a link about Grant permission programmatically

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :ASP.Net

Hi guys,


two weeks ago I read a MSDN(?) article how to grant/revoke permission for some users/roles/groups on a specific page or holder temporarily or with condion. The article shows how to do it Form_Load() in c#. But I can't find the link with googling or in MSDN library.

Please let me know if you know the url?

What I want to do is:

There is a folder called employeePDFs.

The folder will have 1000s employees' sub folder ({lastname}{firstname}{employeeID}). Each folder will have very personal indivual PDF files which are manually uploaded.

If an employee logs on, then the logon employee can view a page which has a list of PDF files in his own folder only.

Those PDF files can be assessed only by the user.

or better solution?




View Complete Post

More Related Resource Links

Find and replace link source

I want to replace links href in the source code using regular expression in Find/Replace dialog box from http://www.abc.com/car-news/13PX5S/News1.aspx, http://www.abc.com/car-news/27JXW5/News2.aspx to http://www.abc.com/car-news/news1/13px5s/, http://www.abc.com/car-news/news2/27jxw5/   - in the resultant URL there will be no Capital letters.    

How to link SharePoint List with MS Access 2007 programmatically

Hi, can anybody tell me how to link SharePoint List with MS Access 2007 without opening Access environment. I want to do it programmatically through C#/VB.net doesn't matter. Your help will very much appreciated. Thank you so much! -Jarexs

Webpart and AddPSSnapin - grant permission

Hello, I'm developing webpart, that will give some users option to create mailboxes in Exchange 2007. I have two machines in use (third - DC): 1) Windows 2003 R2 x86, MOSS 2007 SP1, Windows Powershell 1.0, Exchange 2007 Management Tools 1) Windows 2003 R2 x86, Exchange 2007, Windows Powershell 1.0 On my MOSS machine I maded two applications - webpart and console application. MOSS (app pool) is working on domain admin account. Console application I'm running on the same account. Both are using the same code with modified parameters: public static void CreateUserMailbox(string domain, string ou, string database, string alias, string name, string displayName, SecureString password) { string upn = string.Format("{0}@{1}", alias, domain); ICollection<PSObject> results; // Create a runspace. We can't use the RunspaceInvoke class this time // because we need to get at the underlying runspace to explicitly // add the commands. RunspaceConfiguration rc = RunspaceConfiguration.Create(); PSSnapInException snapEx = null; PSSnapInInfo info = rc.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.Admin", out snapEx); Runspace myRunSpace = RunspaceFactory.CreateRunspace(rc); myRunSpace.Open(); // Create a pipeline... Pipeline pipeLine = myRunSpace.CreatePipeline(); using (pipeLine) { /

Find SharedService Provider Programmatically

Hello,     When we deploy to testSP I do not know the name of the SSP so this code: FullTextSqlQuery kwQuery = new FullTextSqlQuery(ServerContext.GetContext("My SSP"))) {} no longer works because it is not called "MY SSP".  How can I loop through the Web Applications to find the SSP? Thanks  

error: "The application-specific permission settings do not grant Local Activation "

Log Name:      System Source:        Microsoft-Windows-DistributedCOM Date:          9/14/2010 11:55:35 AM Event ID:      10016 Task Category: None Level:         Error Keywords:      Classic User:         XXXXX\spadm Computer:      XXXX.XXXXX.com Description: The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID {61738644-F196-11D0-9953-00C04FD919C1}  and APPID {61738644-F196-11D0-9953-00C04FD919C1}  to the user XXXXX\spadm SID (S-1-5-21-6236335-3733969977-3477648964-5701) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool. Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">   <System>     <Provider Name="Microsoft-Windows-DistributedCOM" Guid="{1B562E86-B7AA-4131-BADC-B6F3A001407E}" EventSourceName="DCOM" />     <EventID Qualifiers="49152">10016</EventID>     <Version>0</Version>  &nb

Display this site on the top link bar of the parent site, programmatically

Hi, Using the GUI to create a subsite you can configure ‘Display this site on the top link bar of the parent site’. How to do the same thing programmatically? PS. Can anyone confirm that the default behavior regarding this has changed from MOSS 2007 (true) to SP 2010 (false)?

GRANT permission on schema to user in SQL 2000

Hi,I am using following statement to grant specified permissions on schema to a user in SQL Server 2005. GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE on ::[Schema Name] to [My DB User]I need to perform the same in SQL 2000. However, this does not work in SQL Server 2000. Is there any equivalent syntax which can be used in both (SQL 2000 & 2005).Thanks in advance...

"Failed to grant minimum permission requests" when building release mode dll

Hi there,I have started to receive a  release mode build failure for which I  would appreciate some advice. The build works fine in debug but sgen fails in release when a dll that contains a web-reference is linking to a c++\cli dll on the network. The debug build links to the same (release mode) c++\cli dll without this problem.I believe this has started since adding the web-reference. Any idea what the work around is?Many thanks.Duncan4>C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin\sgen.exe /assembly:"C:\Projects\Forecaster\Source 2.0\GH.Forecaster.IO\obj\Release\GH.Forecaster.IO.dll" /proxytypes /reference:S:\SoftwareUtils\Release\GH.Common\Release\Latest\GH.Common.Unmanaged.dll /reference:S:\SoftwareUtils\Release\GH.Common\Release\Latest\GH.Common.Util.dll /reference:"C:\Projects\Forecaster\Source 2.0\Release\GH.Forecaster.Data.dll" /reference:"C:\Projects\Forecaster\Source 2.0\Release\GH.Forecaster.Util.dll" /reference:S:\External\log4net-1.2.10\bin\net\2.0\release\log4net.dll /reference:"C:\Program Files\NUnit-Net-2.0 2.2.8\bin\nunit.framework.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2

Execute permission denied on with the grant and with grant permission enabled. HELP PLEASE. Grantin


Here is the code that Im running.  The user Tester has the both Grant and With Grant checked.

IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'AAAtestOW')


DROP Procedure dbo.AAAtestOW



CREATE Procedure dbo.AAAtestOW





If i add the grant execute command for me I get
"Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself."

If I try

Programmatically remove link from lookup field

I've found this link describing an approach to remove the link from a lookup field via javascript. Is there an other way except adding a content editor webpart to every site with lookup fields? Like setting a property for the lookup field? Thanks

Grant permission to BCS External entities via PowerShell



We're using an assembly connector with BCS. When the solution is deployed, we have to manually grant permissions to the entities by going to Central Administration -> Manage Service Applications -> Business Connectivity Services -> then select our entities and grant permissions.

I'm looking for ways to automate this - can someone please give me some pointers?


SP installed in DomainA, how to grant permission for users in DomainB ?



SP Foundation 2010 installed in Win2008R2 as Single Server Farm. It is located in DomainA. Users logged on into DomainB are denied access. I would like to add these DomainB users into the page permission. But the GUI seems not to be able to resolve anything outside of its DomainA. Outside of Sharepoint, the DomainA trust DomainB. I can log into a DomainA computer using my DomainB account.

Question : is it possible for Sharepoint to accept users from multiple domains? If yes, can you please hint me the solution or documentation?

Thanks in advance


Grant Unique Permission to columns


In SharePoint; How can I grant edit permission to a column to a list of people and to the same column grant veiw only to another list of people?

Cannot find "Modify Shared Page" link



Im a web designer for our unit's team site (SharePoint 2003).  Before, I was able to modify the home page using the "modify shared page" link located on the upper-right corner but now, I only see "modify my page" option.

I tried going to Site Settings --> Customize Home Page and it opened the home page in shared view but when I click the "modify shared page", it only gave me 2 options: Shared View and Personal View. I dont have the option to design the shared page.

Has anyone encountered this and can share the solution? I elevated this to our SP admin but she doesnt seem to know why I can't modify the shared page. 

Thank you,


How can I create link table in an Access DB for a group permission in SharePoint?



I move all the tables to SharePoint site using "Move To SharePoint" button.  When it finished, access create additional link table called "User Information List"  However, I need a site owner permission list in my access table link(Not User Information List-it has too many list).

Can anyone help me, please?


SQL Server 2005 Grant User Permission to Create Stored Procedure and Grant Execute Access to another


I'm trying to determine the minimal amount of access I can give my developers to be able to run create stored procedure scripts with an inclusion of the grant execute to the application user group.

We have been developing some interesting work arounds, but I think there must be an easier way to grant the access.

Grant Create Stored Procedure to user1 on a specific database

Grant Permission to Grant Execute permission for Stored Procedures on a specific Database to user1 for any user.


My profile -- grant permission to other to edit the information



I would like to know if one can grant permission to another person to edit "My Profile" or "My Site"? That is certain people will be able to edit my profile and do various things as if the person iteself.

Thanks in advance.


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