MCTS 70-542 SharePoint Study ( Learning ) Guide [ Developer ] - Part 1

31 December 2009 6:11 AM Posted by Mano Mangaldas

0




MCTS 70-542 SharePoint Server Developer Study ( Learning ) Guide


You are creating a SharePoint solution. You need to add a button to the Quick Access toolbar that will allow users to approve a document. You create an assembly named approvebtn.dll that implements the necessary functionality, and install it on the SharePoint server.

What additional steps must you take? (Each correct answer presents part of the solution. Choose two.)

  • In the CustomQuickAccess.xml file, add a <consolenode> element to the <references> element to identify the assembly and the class.
  • In the QuickAccess.xml file, add an element to the <references> element to identify the assembly.
  • In the CustomQuickAccess.xml file, add an element to the <references> element to identify the assembly.
  • In the QuickAccess.xml file, add an element to the <references> element to identify the assembly.
  • In the QuickAccess.xml file, add a <consolenode> element to the <structure> element to identify the assembly and the class.
  • In the CustomQuickAccess.xml file, add a <consolenode> element to the <structure> element to identify the class.

Explanation:
You should modify the CustomQuickAccess.xml file. You need to add a <reference> element to the <references> element to identify the assembly. You also need to add a <consolenode> element to the <structure> element to add the class.

You should not modify the QuickAccess.xml file. Although this file contains configuration settings for the default Quick Access toolbar, you should not modify it. Doing so could cause incompatibility issues with other areas of SharePoint. Instead, you should modify the CustomQuickAccess.xml file.

You should not add a <consolenode> element to the <references> section or a <reference> element to the <structure> section. The schema for the CustomQuickAccess.xml file is:

 
 
 
 
 
 
 
 

Reference:
http://msdn.microsoft.com/en-us/library/aa674506.aspx
Custom Quick Access Buttons video tutorial.





You are creating a workbook that shows sales data. The workbook includes a pivot table mapped to an Online Analytical Processing (OLAP) cube on SQL Server 2005. You create a report cell in the workbook to allow users to filter the results shown in the pivot table.

You perform the following steps:

Create an Office Data Connection file and import it into the trusted data connection list.
Copy the workbook into a trusted file location that supports linked data connections only.

You need to allow users to view and filter the pivot table in an Excel Web Access control.

What should you do?

  • Add a SQL Server Analysis Service Filter Web Part to the page.
  • Enable the trusted workbook location to support both embedded and linked data connections.
  • Add the report cell's dimension and hierarchy properties to a Key Performance Indicator (KPI) list.
  • Export the data connection information and import it to the Business Data Catalog (BDC).
Explanation :
You should add a SQL Server Analysis Service Filter Web Part to the page. The Excel Web Access Web Part cannot filter data directly using the report cell. Instead, you must add a SQL Server Analysis Service Filter Web Part to the page and configure it with the same dimension and hierarchy as the report cell.

You should not export the data connection information and import it to the Business Data Catalog (BDC). The BDC is used for line-of-business application data, not to allow a user to filter the results shown in a pivot table.

You should not add the report cell's dimension and hierarchy properties to a Key Performance Indicator (KPI) list. A KPI list should contain status indicators. They can be mapped to cells in an Excel spreadsheet, but not to the dimension and hierarchy values of a report cell.

You should not enable the trusted workbook location to support both embedded and linked data connections. Although you can do so to allow the connection to be stored in the workbook, doing so will not allow the data to be displayed and filtered in the Excel Web Access Web Part.

Reference:
http://office.microsoft.com/en-us/sharepointserver/HA101054751033.aspx
http://office.microsoft.com/en-us/sharepointserver/HA101054701033.aspx
http://office.microsoft.com/en-us/sharepointserver/HA102078901033.aspx



sharepoint global calendar (sharepoint calendar sharing)

25 November 2009 5:45 AM Posted by Mano Mangaldas
Labels: , ,

0

sharepoint calendar sharing - sharepoint global calendar


Recently, working with one of our clients who wanted a single calendar at the root site, to be shared among multiple sub-sites,with some filter.









Download:
Download entire code here


Ref:

Rename a standalone Sharepoint Server

20 November 2009 7:25 AM Posted by Mano Mangaldas

0

References:
  • http://technet.microsoft.com/en-us/library/cc261986.aspx

  • http://elczara.spaces.live.com/blog/cns!554EC06D366AC9D5!854.entry

  • http://vspug.com/nrdev/2008/07/15/tip-how-to-rename-a-sharepoint-server-machine-name/
  • Miscellaneous Admin Tasks

    11 October 2009 7:07 AM Posted by Mano Mangaldas

    0

    Disabling MySites and MyLinks

    • From Shared Service Administration site, choose "Personalization services permissions" under User Profiles and My Sites
    • Remove 'NT AUTHORITY\Authenticated Users'
    • Remove rights to 'Create personal sites' and 'Use personal features' from all other users ( service accounts ).

    Setup Search Settings

    • Go to Shared Services Administration site
    • Under Search, choose "Search Settings"
    • Select 'Content Sources and crawl schedules'

    • Edit the 'Local Office SharePoint Server Sites' content source by clicking on the 'Edit' context menu

    • Set the crawl schedules as
      • Full Crawl – weekly every Saturday
      • Incremental Crawl – every 4 hours

    Changing the Index location

    • The following stsadm commands will set the SharePoint Services index location

      stsadm -o spsearch -action list

      stsadm -o spsearch -indexlocation E:\SharePoint\Data\SEARCHINDEX

     

    • The following stsadm command will set the SSP index location ( use if SSP is configured )

      stsadm -o osearch -action list

      stsadm -o editssp -title [SSPNAME] -indexlocation E:\SharePoint\Data\OSEARCHINDEX

    Change service accounts and their passwords

    1. Open SharePoint Central Administration, click Operations.
    2. Under Security Configuration, click Service accounts.
    3. Click the radio button beside Web application pool. Select Windows SharePoint Services Web Application. Select the application pool where you want to change the identity, for example: Sharepoint - 80.
    4. Make a note of the existing settings in case you need to unwind your changes.
    5. Select the Configurable radio button. Provide the user name and password. It helps to be explicit here and use the domain\account format (e.g. mydomain\SPService). Also be sure to use a strong password. Click OK.
    6. To restart the application pool, either open IIS and recycle the application pool, or open a command prompt and type iisreset -noforce.
    7. Open your SharePoint site in a browser to confirm that the change was successful.  

    This change will be automatically propagated to all web front-ends.

    Re-direct using Content Editor Webpart

    04 August 2009 5:52 AM Posted by Mano Mangaldas
    Labels: , ,

    0

    Code to re-direct using Content Editor Webpart and Javascript based on a QueryString value
    
    

    How to set unique permissions to a document library

    12 May 2009 3:44 PM Posted by Mano Mangaldas

    0

    /// 
    /// Set Unique permissions to document Library
    /// 
    /// 
    /// 
    /// possible values 'Full Control', 'Read', 'Contribute' 
    public static void SetDocLibPermissions(SPWeb spWeb, SPGroup grpToGrantPermission, string roleDefinitionName)
    {
     string docLibName = "MyDocumentLib";
    
     SPList MyDocLibrary = spWeb.Lists[docLibName];
     if (MyDocLibrary != null)
     {
      MyDocLibrary.BreakRoleInheritance(false);
      if (roleDefinitionName != null)
      {
       SPRoleAssignment roleAssignment = new SPRoleAssignment(grpToGrantPermission);
       SPRoleDefinition roleDefinition = spWeb.RoleDefinitions[roleDefinitionName];
       roleAssignment.RoleDefinitionBindings.Add(roleDefinition);
       MyDocLibrary.RoleAssignments.Add(roleAssignment);
    
       MyDocLibrary.Update();
      }
     }
    }
    

    Display only documents in search results

    08 May 2009 11:10 AM Posted by Mano Mangaldas

    0

    In Shared Service Provider site > Search settings > metadata property mappings Find the managed property IsDocument and set “Use in Scope” property to true and Click Ok. In Shared Service Provider site > Search settings > View Scopes > Edit Properties and rules > New Rule Add a rule where the property IsDocument=1 and set the scope behavior to require as shown and click OK http://sharepointsearch.com/cs/blogs/sanjaya/archive/2009/04/23/display-only-documents-in-search-results.aspx

    programming user search using search webservice

    07 May 2009 6:19 PM Posted by Mano Mangaldas

    0

    After User Profiles are imported from AD , first thing is to make these profiles available for search. Check your Content Source and ensure that the mysite host is included as both:
    http://mysite.company.com and sps3://mysite.company.com , else your profiles will
    not be indexed. Run a full crawl after this.

    If you are getting this error on crawling
    "Access is denied. Verify that either the Default Content Access Account has access
    to this repository, or add a crawl rule to crawl this repository.
    "

    Do one of the below
    Creating a crawling rule with other Account Information solves the Problem.
    OR
    Follow these steps:
    1.Click Start, click Run, type regedit, and then click OK.
    2.In Registry Editor, locate and then click the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
    3.Right-click Lsa, point to New, and then click DWORD Value.
    4.Type DisableLoopbackCheck, and then press ENTER.
    5.Right-click DisableLoopbackCheck, and then click Modify.
    6.In the Value data box, type 1, and then click OK.
    7.Quit Registry Editor, and then restart your computer.


    Source: http://support.microsoft.com/kb/896861

    Next in you VS project ... you will want to add web reference to the webservice.
    If you not able to add the web-reference and get the following error...

    The document at the url http://mysspurl/_vti_bin/Search.asmx was not recognized as a known document type.
    The error message from each known type may help you fix the problem:
    - Report from http://mysspurl/_vti_bin/Search.asmx' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'.
    - Report from 'DISCO Document' is 'Root element is missing.'.
    - Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'.
    - Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'.



    In this case you need to use the full URL to your Sharepoint site. For example,
    http://mysspurl/sites/mysite/_vti_bin/Search.asmx. When you've received the list of
    services, click on "Service Description". This will change the URL to
    http://mysspurl/sites/mysite/_vti_bin/Search.asmx?WDSL. You'll now be able to add the
    service.

    Assuming that the web-reference name you set is 'PeopleSearch' Sample code:
    PeopleSearch.QueryService queryPeople = new PeopleSearch.QueryService();
    queryPeople.Url = "http://mysite.company.com/sites/mysite/_vti_bin/search.asmx";
    queryPeople.PreAuthenticate = true;
    queryPeople.Credentials = new System.Net.NetworkCredential(strUserName, strPassword, strDomain);
    
    
    StringBuilder query = new StringBuilder();
    query.Append("");
    query.Append("");
    query.Append("");
    query.Append("");
    query.Append("urn:Microsoft.Search.Response.Document.Document");
    query.Append("");
    query.Append("");
    query.Append("");
    query.Append("SELECT ");
    query.Append("Accountname, ");
    query.Append("preferredname, ");
    query.Append("FirstName, ");
    query.Append("LastName, ");
    query.Append("WorkEmail ");
    query.Append("FROM SCOPE() ");
    query.Append("WHERE ");
    query.Append("(\"DAV:contentclass\" = 'urn:content-class:SPSPeople') ");
    query.Append(" AND (\"preferredname\" LIKE '%" + "deployment" + "%')");
    query.Append(" OR (\"FirstName\" LIKE '%" + "deployment" + "%')");
    query.Append(" OR (\"LastName\" LIKE '%" + "deployment" + "%')");
    query.Append(" OR (\"WorkEmail\" LIKE '%" + "deployment" + "%')");
    query.Append("");
    query.Append("");
    query.Append("11000");
    query.Append("");
    query.Append("");
    
    ds = queryPeople.QueryEx(query.ToString());
    
    make sure .. the URL does not include '?wsdl' else it will give this error.. {"Possible SOAP version mismatch: Envelope namespace http://schemas.xmlsoap.org/wsdl/ was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/."}

    My experience on setting Reporting Services in SharePoint Integration Mode

    27 April 2009 8:03 AM Posted by Mano Mangaldas

    0

    References :
    http://blah.winsmarts.com/2007-12-SharePoint_and_SQL_Server_Reporting_Services_-_Installation_and_Setup.aspx
    http://mikewalsh.bilsimser.com/PermaLink,guid,3ff1194c-3b48-4f35-9797-a03327db8d00.aspx
    http://www.microsoft.com/downloads/details.aspx?FamilyID=ae7387c3-348c-4faa-8ae5-949fdfbe59c4&displaylang=en
    http://www.microsoft.com/downloads/details.aspx?familyid=1E53F882-0C16-4847-B331-132274AE8C84&displaylang=en
    http://blogs.msdn.com/sharepoint/archive/2007/02/19/microsoft-sql-server-2005-sp2-reporting-services-integration-with-wss-3-0-and-moss-2007.aspx
    http://technet.microsoft.com/en-us/library/ms159704.aspx
    http://blog.rafelo.com/2008/08/sharepoint-and-ssrs-deep-integration.html
    
    Points to remember:
    1. Install reporting services on MOSSReports ( Central Admin Box ?? ), and also have the Business Intelligence Development studio installed either on the same machine, or on a seperate developer box. Service Account Configuration while installing Reporting Service Domain user account -- System Account of the Central Admin should be good Use the same account throughout

    2. Install SQL Server SP3 on your SQL Server & MOSSReports.

    3. Before installing the add-in
    a. You access this page by "Reporting Services configuration"
    b. Setup Report server VIRTUAL Directory even if it shows green.. may not be used anywhere though :)
    c. When you do there is a question mark next to SharePoint Integration. This it says is because you haven't specified a Database for reports. You go to Database Setup and see that there is a database specified for Reports. You try just saving that. I can assure you it's not going to be enough. Instead what you need to do is to create a NEW Database for reports or amend the existing one (which SQL Server 2005 Reporting Services installed for you which the writer of the paper knows you have done ....) I created a new database just to be 100% sure.
    d. That new database needs to have "SharePoint Integration" selected (the same page where you create it - i.e. in the Database Setup part of the Configure Report server page).
    Now finally you have a tick next to SharePoint Integration and your own "Configure Report Server" page looks like the one in the Team Blog.

    4. log in as the user used to install MOSS 2007 and only then install the Add-In on the SharePoint 2007 web front ends.

    5. The next step is described in WinSmart.com (http://blah.winsmarts.com/2007-12-SharePoint_and_SQL_Server_Reporting_Services_-_Installation_and_Setup.aspx) as "you must set each of the options ... as follows" -- from the Central Admin Manage integration settings – To configure the Report Server Web Service URL and Authentication Mode (either Windows or other trusted account). Grant database access – To configure the name of the report server database server instance name. Set server defaults – To configure report server timeouts and other options.

    6. Execute the following command on all WFE's - stsadm.exe -o addwppack -filename "C:\Program Files\Microsoft SQL Server\90\Tools\Reporting Services\SharePoint\RSWebParts.cab"

    7. the Report Server Windows service account and the Report Server Web service account -- manually grant access to
    Add the accounts to the WSS_WPG Windows group on the Reporting Services computer.
    Add the SQL database login to the following database roles: db_owner role in the WSS Content database WSS_Content_Application_Pools role in the SharePoint_Config database

    8. The following step may be already packaged ..Go to Site collection features, and activate the "Report Server Integration Feature".Create two document librariesa) One a simple document library, call it "Reports" <-- this is where we will store our reports.b) One a data connection library, call it "DataConnections" <-- this is where we will store our data connections

    9. the Connection source.. user SQL Connection rather than Windows authentication

    Make your Sharepoint Job read values from web.config

    16 April 2009 5:29 AM Posted by Mano Mangaldas

    0

    // get the settings
    System.Configuration.Configuration myConfig;
    //myConfig = WebConfigurationManager.OpenWebConfiguration("/", "C1st_SharePoint_500");
    myConfig = WebConfigurationManager.OpenWebConfiguration("/", this.WebApplication.Name);
    
    if (!myConfig.Equals(null))
    {
        this.connStrFromAppSettings = myConfig.AppSettings.Settings["ConnectionString"].Value;
        this.CUSTOM_SITE_TEMPLATE_NAME = myConfig.AppSettings.Settings["CustomSiteTemplateName"].Value;
        this.SITECOLLECTION_URL = myConfig.AppSettings.Settings["SiteCollectionURL"].Value;
        this.BUFFER_SIZE = Convert.ToInt32(myConfig.AppSettings.Settings["BufferSize"].Value);
    }
    
    //Construct the complete URL
    SITECOLLECTION_URL = WebApplication.GetResponseUri(SPUrlZone.Default).ToString() + SITECOLLECTION_URL;