Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to check Project web app settings using PSI in SharePoint

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 122
    Comment on it

    Whenever we create new site in SharePoint site collections its default settings is "SharePoint Permission Mode". But to create Groups, Categories, Security Templates,User Sync Settings,Delegates and so on we require "Project Permission Mode".
    So, we can find programmatically the Project web app settings.

    1. Add Project Server Interface (PSI)-Security web service reference in your code.
    2. Then add below given code

    using ProjectName.SecurityWebSvc;
    
    SecurityWebSvc.Security securityWebSvc;
    
      public void CheckProjectWebAppSettings()
    	{
    		switch (securityWebSvc.ReadPermissionMode())
    		{
    			case SecurityWebSvc.PermissionMode.ProjectServer:
    				// Permission mode is "Project Permission Mode"
    				break;
    			case SecurityWebSvc.PermissionMode.SharePoint:
    				// Permission mode is "SharePoint Permission Mode"
    				break;
    			case SecurityWebSvc.PermissionMode.UninitializedProjectServer:
    				// Permission mode is "UninitializedProjectServer Permission Mode"
    				break;
    			case SecurityWebSvc.PermissionMode.UninitializedSharePoint:
    				// Permission mode is "UninitializedSharePoint Permission Mode"
    				break;
    		}
    	}
    	

    I hope this code will help you.

    Thanks

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: