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

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

Webpart and AddPSSnapin - grant permission

Posted By:      Posted Date: September 09, 2010    Points: 0   Category :SharePoint
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) { /

View Complete Post

More Related Resource Links

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

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

Can't find a link about Grant permission programmatically


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?




Webpart Headline has different css styles depending on permission user group



I have created a new enterprise search center with some subsites for every tab I created with the search box. On each subsite I placed a content query webpart to display some preconfigured search strings.

Depending on in which permission group (owner, member, visitor) a user is, the headline of the webpart is shown in different styles.
With the developer tool from IE8 I can see that for an user in the owner/member group the corev4.css and the minimalv4.css is choosen.

For users in the visitor group only the minimalv4.css is choosen and the headlines are in a bigger font, different color etc.
I have checked the check in/out status of the pages and if they are published, but this seems not to be the issue.

Can anybody explain me how to solve this issue so that the headlines are shown equal for all usergroups?

Thanks in advance,

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?

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.


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. 

UpdatePanel in a Webpart


I'm exploring the usage of UpdatePanels in WebParts for MOSS 2007. The code I have so far for adding a test update panel is this:

                LinkButton goButton;
                goButton = new LinkButton();
                goButton.ID = "butGo";
                goButton.Text = "Go";
                goButton.Command += new CommandEventHandler(goButton_Command);
                goButton.Click += new EventHandler(goButton_Click);

Error "user does not have permission to perform this operation" with User Instance = True.


I setup SQL Server 2005 / SQL Express. All works fine in SQL Server 2005.

I am connecting to a SQL Database from VS 2005,  Tools/Connect to Database. I set the Data Source to "Microsoft SQL Server Database File (SqlClient)" (meaning SQL Server Express) and User Instance = True, and Integrated Security = True.

The above is working successfully on all machines except my Laptop. On my Laptop, I am getting this error "user does not have permission to perform this operation". On my Laptop, if I change User Instance = False, it works fine. Also, If I connect to SQL Server 2005 it works fine only if User Instance = False.

I tried all kind of security changes, nothing worked. For example, I setup Everyone as Full Control for the Folder and the MDF File of SQL Server. I gave my user ID as sysadmin role in SQL Server Express. Also, I enabled creating User Instance form SQL Server Express, Nothing is working.

Appreciate your help.


Rowlimit and PageFirstRow properties of listview as parameters to Listview Webpart


Hi ,

 I need to set the  Rowlimit  and PageFirstRow properties  of  listview  as  parameters to Listview Webpart

 And these parameters  will be passed from the custom provider webpart


name of the list will be provided in custom webpart's toolpane.

and i need to save this as list content type of list defs


Please provide me the guidance on this.



Error in / Application after adding employee search in webpart


Hello everyone,

I am working on sharepoint 2007 and I was editing the webpart of the software and after adding the predefined employee search table, the server has crashed while trying to access the server remotely with the following error message:

Error in / Application

However, while trying to login locally I have no problem and can easily login.

What will be the course of action in fixing this error.

Also the site is complaining of an invalid certificate even after adding an exception.

Any help would be greatly appreciated.

Thank You,

Chris Stanko

What is the best practice to manage permission for confidential documents



My company have 10 types of claim forms: travel claim, business trip claim, etc

I got job to create e-form from sharepoint using infopath but the thing is how to prevent someone else to not view our claim form since it's confidential.

Im thinking to create folder like this way:

1. Claim

1.1. Travel Claim

      all staff will submit their form over here.

1.2. Business Trip Claim

      all staff will submit their form over here.

1.3. etc


a. How to prevent other people to see our own claim form

b. How to restrict only the creator, supervisor and HR can see & approve their form

Is this something that need to do with Information Right System?

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