Wednesday 30 April 2008

Tips & Tricks for using STSADM command

To save the output of STSADM Command into a text file use the following :
eg:stsadm -o addsolution -filename MySoln.wsp >>output.txt 2>&1
(Dont remove 2>&1--these are standard dos error handlers.)

If we are using -immediate or -time or -local (Asynchronous commands) with STSADM command, then next STSADM command would fail. Like:
stsadm -o retractsolution -name Mysolution.wsp -immediate
stsadm -o deletesolution -name Mysolution.wsp
The second command should execute after the first command has executed completely. But here it would fail.In order to avoid that we have two solutions
Solution One:
  • echo some text pause

  • Solution Two:
  • Execadmsvcjobs command.But this should be used very carefully because it would execute all the administrative jobs immediately
  • Tuesday 29 April 2008

    STSADM Command Line Tool

    To use STSADM command line
    • You must be a member of the local Administrators group on the server. When you invoke Stsadm.
    • You supply an operation and a set of command-line parameters in the form: -operation OperationName -parameter value
    • For more additional Information : STSADM Operations

    For more tips and tricks with STSADM refer this link


    STSCOMMANDDescription
    Activatefeature Activates a feature in the feature collection.
    AddalternatedomainAdds an internal URL and maps it to one of the five URL zones of a Web application or external resource.
    AddcontentdbCreates a new content database or adds a database that needs to be upgraded when the url and databasename parameters are specified.
    AdddataconnectionfileAdds a new DataConnectionFile to the DataConnectionFiles collection for InfoPath Forms Services.
    Add-ecsfiletrustedlocationLets an administrator add a file to the trusted location list.
    Add-ecssafedataproviderLets an administrator add a supported provider type to the safe provider list.
    Add-ecstrusteddataconnectionlibraryAdds a trusted data connection to a library.
    Add-ecsuserdefinedfunctionAdds a user defined function.
    AddexemptuseragentAdds a user agent, which is typically in the form of a search bot, to receive the XML file that contains the data of the form for indexing instead of the HTML rendering of the form.
    AddpathAdds a managed path inclusion to a Web application.
    AddpermissionpolicyAdds a user to a policy role for the Web application based on the specified permission level name and corresponding zone.
    AddsolutionAdds a solution file to the solution store.
    AddtemplateAdds a site template to the template gallery.
    AdduserAdds a user account to the specified site collection and assigns it to the specified site group.
    AddwppackAdds a Web Part package to the server Web Part gallery.
    AddzoneurlConfigures the public URL and maps it to one of the five URL zones of a Web application or external resource.
    AllowuserformwebserviceproxyDetermines whether a user form template (that is, a non-administrator deployed form template published to a content type or a document library) can use the proxy.
    AllowwebserviceproxyTurns on or off the Web service proxy for the specified Web application.
    AuthenticationAuthentication provides the user identity input to the authorization process which determines what actions the current user is allowed to perform on a given object.
    BackupDescribes how to back up a site collection, an individual database, a Web application, or an entire farm.
    BackuphistoryDisplays a history of backup and restore operations that have been run.
    BinddrserviceRegisters a data retrieval service adapter.
    BlockedfilelistEnables an administrator to add or delete a file type to the blocked file types list for a Web application.
    ChangepermissionpolicyUpdates the Web application policy level for a user to enable a change to specific permission levels the user is assigned.
    CopyappbincontentCopies Web application–specific files, such as page resource (*.resx) files from their respective locations in the 12\CONFIG folder to the correct location in each Web application on the computer.
    CreateadminvsDisplays the port number to the SharePoint Central Administration Web site.
    CreatecmsmigrationprofileCreates a migration profile by providing a profile name, database server name, database name, and database user name.
    CreategroupLets site collection administrators create new groups from any site collection.
    CreatesiteCreates a site collection at the specified Uniform Resource Locator (URL) with the specified user as site collection owner and site collection administrator.
    CreatesiteinnewdbCreates a site at the specified Uniform Resource Locator (URL) and creates a new content database using the user name and password you specify.
    CreatesspCreates a new Shared Services Provider (SSP) in the farm.
    CreatewebCreates a subsite at the specified Uniform Resource Locator (URL).
    DatabaserepairDetects and removes orphaned items from content databases in Windows SharePoint Services.
    DeactivatefeatureDeactivates a feature in the feature collection.
    DeleteadminvsUnprovisions the SharePoint Central Administration Web site from the local machine.
    DeletealternatedomainDeletes an internal URL from a URL zone.
    DeletecmsmigrationprofileDeletes the named migration profile.
    DeleteconfigdbUnprovisions the local machine from the farm and deletes the configuration database (but does not drop the configuration database).
    DeletecontentdbDetaches a content database when the Web application, database name, and database server are specified.
    DeletegroupDeletes a group created in Microsoft Office SharePoint Server 2007.
    DeletepathRemoves an included path from the list of paths managed by Windows SharePoint Services.
    DeletepermissionpolicyDeletes a permission policy for a user from the site collection by specifiying the URL name and user login.
    DeletesiteDeletes the site collection with the specified URL from the Web application.
    DeletesolutionRemoves a Windows SharePoint Services Solution Package (*.wsp) from the solution store.
    DeletesspDeletes a Shared Services Provider (SSP) in a Web application when the title parameter is specified.
    DeletessptimerjobDeletes all of the timer jobs in the Shared Services Provider (SSP).
    DeletetemplateDeletes a specified site template from the site template gallery.
    DeleteuserDeletes a user account from the specified site collection and specified site.
    DeletewebDeletes a subsite using the specified Uniform Resource Locator (URL).
    DeletewppackRemoves the Web Parts in a Web Part package from a virtual server.
    DeletezoneurlDeletes a public URL and the zone to which it is mapped.
    DeploysolutionDeploys files related to a solution from the configuration database to individual front-end Web servers in the farm.
    DeploywppackDeploys a Web Part package.
    DisablesscDisables Self-Service Site Creation for the specified Web application.
    DisplaysolutionDisplays specific solution or Web Part information in a solution store.
    EditcmsmigrationprofileEdits a migration profile by providing a profile name, database server name, database name, and database user name.
    EditcontentdeploymentpathEdits and manages a content deployment path.
    EditsspAllows the site collection administrator for the Shared Services Administration site to perform the following functions:
    Change the databases that a Shared Services Provider (SSP) uses.
    Change the SQL credentials associated with the SSP databases.
    Modify the service account credentials.
    Rename an SSP.
    EnablecmsurlredirectActivates the Uniform Resource Locator (URL) redirection feature for URLs in Microsoft Content Management Server 2002.
    EnablesscEnables Self-Service Site Creation for the specified Web application.
    EnumalternatedomainsLists the internal URLs and specifies the URL zones and public URLs to which they are mapped.
    EnumcontentdbsEnumerates all content databases in the Web application.
    EnumdataconnectionfiledependantsEnumerates all form that are dependent on the specified data connection file.
    EnumdataconnectionfilesEnumerates all of the DataConnectionFiles in the collection in alphabetical order.
    EnumdeploymentsEnumerates all pending and active deployments in the farm.
    EnumexemptuseragentsReturns the rendering content of the form as an XML instead HTML.
    EnumformtemplatesLists the administrator-deployed form templates on the farm.
    EnumgroupsLists all the groups in Microsoft Office SharePoint Server 2007.
    EnumrolesLists the site groups that are available for use in a particular site or subsite.
    EnumservicesLists all the services in the Web application within a farm.
    EnumsitesDisplays a list of sites that are hosted in a Web application. To find the sites that need to be upgraded, use the redirectedsites parameter.
    EnumsolutionsEnumerates the list of Windows SharePoint Services Solution Package (*.wsp) and Web Part packages located in the solution store of the farm.
    EnumsspLists all the details of the Shared Services Providers (SSPs) in the farm or of a single SSP.
    EnumssptimerjobsEnumerates all of the timer jobs in the Shared Services Provider (SSP).
    EnumsubwebsLists the subsites that have been created immediately below a particular site.
    EnumtemplatesLists the site templates that have been submitted to the global site template catalog.
    EnumusersLists the users of a particular site collection or subsite.
    EnumwppacksLists the Web Part packages currently in the server Web Part gallery.
    EnumzoneurlsLists all of the public URL and the zones to which they are mapped.
    EmailSets the e-mail configuration settings for your server.
    ExecadmsvcjobsPermits a user to run any administrative service job in which the Windows SharePoint Services Administration (SPAdmin) service has been disabled.
    ExportExports site and subsite data from your Microsoft Office SharePoint Server 2007 installation.
    ExtendvsExtends a Windows SharePoint Services 3.0 Web application and creates a new content database.
    ExtendvsinwebfarmExtends a Windows SharePoint Services 3.0 Web application for use in a server farm
    ForcedeletelistAllows a user to delete a list that might appear to be in a corrupted state.
    FormtemplatequiescestatusDisplays the status of the quiesce process of a form template.
    GetadminportReturns the administration port for Windows SharePoint Services.
    GetdataconnectionfilepropertyDisplays the file property of each data connection file in the store of InfoPath Forms Services.
    GetformtemplatepropertyRetrieves properties on individual InfoPath Form Services templates.
    GetsitedirectoryscanscheduleDisplays the current schedule of all site directory links scan jobs to be run.
    GetsitelockRetrieves the lock status of a site.
    ImportImports site and subsite data from your Microsoft Office SharePoint Server 2007 installation.
    InstallfeatureInstalls a feature.
    ListlogginglevelsLists the current event log and trace log logging levels for each diagnostic logging category that is registered in a farm.
    ListregisteredsecuritytrimmersLists all registered security trimmers in the farm.
    LocalupgradestatusDisplays the farm and local server components that need to be upgraded.
    ManagepermissionpolicylevelEnables an administrator to manage the policy levels for a Web application.
    MergecontentdbsPermits a site collection to be moved from one content database to another when the souredatabasename and destinationdatabasename parameters are specified.
    MigrateuserMigrates a user account in Windows SharePoint Services 3.0 to a new user name and binary ID.
    OsearchManages the Office SharePoint Server Search service.
    OsearchdiacriticsensitiveEnables or disables the diacritic sensitivity setting.
    Peoplepicker-getsiteuseraccountdirectorypathRetrieves the user account directory path setting for the site collection.
    Peoplepicker-setsiteuseraccountdirectorypathSets the site user account directory path to a specific Organizational Unit (OU) in the same domain when the url and path parameters are specified.
    PreparetomovePrepares sites and content databases before moving to a new Web application by setting up the profile and membership synchronization service.
    ProfilechangelogMaintains a change log that records the changes made to the user profiles.
    ProfiledeletehandlerGives an administrator a chance to run a workflow when a user is about to be deleted.
    ProvisionserviceStarts or stops the SPService on the local computer or a custom service.
    QuiescefarmTemporartily suspends the farm’s ability to accept new sessions that are essential to rendering infopath forms on a server.
    QuiescefarmstatusDisplays the quiesce status of the server farm.
    QuiesceformtemplateTemporarily takes a form template offline.
    ReconvertallformtemplatesUpgrades the form template cached data to run on the upgraded server.
    RefreshdmsRefreshes the Directory Management Service if a database is restored or moved to a location where the incoming e-mail settings are not correct.
    RefreshsitedmsPerforms the same function as the Refreshdms operation but on a site collection level.
    RegistersecuritytrimmerEnterprise Search in Microsoft Office SharePoint Server 2007 performs security trimming of search results at query time.
    RegisterwsswriterEnables the Windows SharePoint Services VSS Writer service (known as WSS Writer service) on any front-end Web server.
    RemovedataconnectionfileRemoves all DataConnectionFiles from the DataConnectionFiles collection.
    RemovedrserviceRemoves a data retrieval service from the list of data retrieval services.
    Remove-ecsfiletrustedlocationLets an administrator remove a file from the trusted location list.
    Remove-ecssafedataproviderLets an administrator remove a supported provider type to the safe provider list.
    Remove-ecstrusteddataconnectionlibraryRemoves a trusted data connection from a library.
    Remove-ecsuserdefinedfunctionRemoves a user-defined function from Excel Calculation Services.
    RemoveexemptuseragentRemoves a user agent, which is typically in the form of a search bot, from the ExemptUserAgent collection.
    RemovesolutiondeploymentlockRemoves the solution deployment lock for the specified server or all servers from the back-end database.
    RenameserverChanges the name of the specified server in the configuration database.
    RenamesiteChanges a URL of a host-named site collection to a new URL.
    RenamewebChanges the URL of a subsite.
    RestoreExplains how a restoration of a site collection, an individual database, a Web application, or an entire farm is performed.
    RestoresspCreates a Shared Service Provider using a restored database.
    RetractsolutionRetracts the specified solution’s deployment, and removes files from the front-end Web server.
    RetractwppackRetracts the deployment of a specified Web Part package.
    RuncmsmigrationprofileRuns a named migration profile. The profile name is the only required parameter.
    RuncontentdeploymentjobRuns a named deployment job.
    ScanforfeaturesScans for new features in the file system, and if new features are present, installs them.
    SetadminportChanges the default zone Uniform Resource Locator (URL) and/or application pool located on the SharePoint Central Administration Web site.
    SetbulkworkflowtaskprocessingscheduleSets the schedule for when tasks are processed by using the Process all tasks option.
    SetconfigdbCreates a new configuration database in a farm or joins the local computer to an existing farm's configuration database.
    SetcontentdeploymentjobscheduleEnables the user to create an advanced schedule to run a deployment job.
    SetdataconnectionfilepropertySets a file property to a data connection file in the store of InfoPath Forms Services.
    SetdefaultsspSets a Shared Services Provider (SSP) as the default SSP in a farm.
    Set-ecsexternaldataLets an administrator set an external data connection to Excel Calculation Services.
    Set-ecsloadbalancingLets an administrator define load balancing for Excel Calculation Services.
    Set-ecsmemoryutilizationLets an administrator determine memory allocation for Excel Calculation Services.
    Set-ecssecurityLets an administrator set security settings for Excel Calculation Services.
    Set-ecssessionmanagementLets an administrator set session management settings for Excel Calculation Services.
    Set-ecsworkbookcacheLets an administrator set workbook cache settings on disk and in memory for Excel Calculation Services.
    SetformtemplatepropertySets the properties of an individual form template.
    SetholdscheduleSets the schedule to process all records that are on hold (records whose retention schedules are suspended).
    SetlogginglevelSets the Windows event log and trace log logging level for one or more diagnostic logging categories registered in the farm.
    SetpolicyscheduleSets the schedule for processing changes to a policy on the items that are impacted by that policy.
    SetrecordsrepositoryscheduleSets the schedule to process all records that have been submitted to Records Center sites in the farm.
    SetsearchandprocessscheduleSets the schedule for when the search and process timer job runs.
    SetsitedirectoryscanscheduleSets a schedule for a job to run the site directory links scan.
    SetsitelockSets a value that specifies whether the site collection is locked and unavailable for read or write access.
    SetsspportUpdates the port or ports for the shared Microsoft Internet Information Services (IIS) Web site, "Office Server Web Services", which used by Microsoft Office SharePoint Server 2007 Web services.
    SetworkflowconfigEnables or disables the workflow settings.
    SiteownerSets the primary or secondary administrator of a site collection.
    SyncConfigures the Windows SharePoint Services 3.0 synchronization job. Normally, this operation is used in conjunction with the preparetomove operation
    SyncsolutionPerforms a synchronization of the Windows SharePoint Services Solution Package (WSP) solutions stored in the configuration database with the files stored on disk.
    TzmoveAllows an administrator to update data that is affected by a change in the start and/or end of Daylight Saving time (DST).
    UnextendvsRemoves Windows SharePoint Services 3.0 from a particular Web application.
    UninstallfeatureRemoves the specified feature definition from the collection of feature definitions in the farm.
    UnquiescefarmResumes the farm’s ability to accept new sessions that are essential to rendering InfoPath forms on a server.
    UnquiesceformtemplateRestores a specific form template for use on the server.
    UnregistersecuritytrimmerUnregisters a custom security trimmer when the ssp and id parameters are specified.
    UnregisterwsswriterDisables the Windows SharePoint Services VSS Writer service (known as WSS Writer service) on any front-end Web server.
    UpdateaccountpasswordUpdates the Web application pool passwords.
    UpdatefarmcredentialUpdates the Web application pool for the SharePoint Central Administration Web site and the Windows SharePoint Services Timer service (SPTimer).
    UpgradeUpgrades the specified site collection during a gradual upgrade.
    UpgradesolutionUpgrades an existing solution. The solution to be upgraded could be either deployed or not deployed; however, the immediate or time parameters apply only if the solution has been deployed.
    UpgradetargetwebapplicationPrepares the environment for the gradual upgrade of a specific version 2.0 Web application by moving the existing version 2.0 Web application to a new URL and making a new version 3.0 Web application that is based on the existing version 2.0 Web application and associated settings.
    UserroleAdds or deletes permission levels to site groups.
    VerifyformtemplateVerifies that the form template can be browser-enabled.
    Properties
    Property nameDescription
    Alerts-enabledTurns alerts on or off.
    Alerts-limitedSpecifies the number of alerts to which a user can create.
    Alerts-maximumSpecifies the maximum number of alerts a user can create.
    AvallowdownloadSpecifies whether users can download infected documents to their local computers.
    AvcleaningenabledSpecifies whether antivirus cleaning is enabled or disabled.
    AvdownloadscanenabledSpecifies whether documents are scanned when they are downloaded.
    AvnumberofthreadsSpecifies the number of threads to use for antivirus processes.
    AvtimeoutSpecifies how long to wait before an antivirus process times out.
    AvuploadscanenabledSpecifies whether documents are scanned when they are uploaded.
    Change-log-expiration-enabledSpecifies whether change logs are deleted after the time span defined in the Change-log-retention-period: Stsadm property (Office SharePoint Server) property.
    Change-log-retention-periodSpecifies the amount of time to preserve change logs
    Command-line-upgrade-runningSpecifies whether the upgrade process has already been started.
    Data-retrieval-services-enabledTurns data retrieval services on or off.
    Data-retrieval-services-inheritSpecifies whether the Web application inherits data retrieval service settings that are located on the SharePoint Central Administration Web site.
    Data-retrieval-services-oledb-providersObsolete.
    Data-retrieval-services-response-sizeSpecifies the response size of the data source that is returned to the data retrieval service.
    Data-retrieval-services-timeoutSpecifies the request time out setting.
    Data-retrieval-services-updateTurns the support for update queries on or off.
    Data-source-controls-enabledTurns the data source controls on the server on or off.
    Database-command-timeoutRetrieves or sets the wait time before terminating the attempt to execute a command and generating an error.
    Database-connection-timeoutRetrieves an open connection or sets a connection to a Microsoft SQL Server database.
    Days-to-show-new-iconSpecifies the number of days to display the "New" icon for items added to a Web site.
    Dead-site-auto-deleteTurns on or off the setting to delete the site collection
    Dead-site-notify-afterSpecifies the number of days to wait before sending notifications
    Dead-site-num-notificationsSpecifies the number of notifications to send
    DefaultquotatemplateSpecifies the default quota template to be used when creating new site collection on a specified Web application.
    DefaulttimezoneSpecifies the time zone for sites that are created in a Web application.
    Delete-web-send-emailDeletes the site collection if use is not confirmed
    IrmaddinsenabledSpecifies a rights management platform other than Windows Rights Management Server.
    IrmrmscertserverSpecifies the location of the Windows Rights Management Services server.
    IrmrmsenabledControls whether the server should use the Windows RMS infrastructure instead of another rights management platform.
    IrmrmsuseadSpecifies that Microsoft Office SharePoint Server 2007 should use the location of the RMS server that is stored in Active Directory, rather than an administrator manually specifying the location of the Windows RMS.
    Job-ceip-datacollectionSpecifies the time schedule for when Customer Experience Improvement Program (CEIP) data is collected.
    Job-change-log-expirationSpecifies the time schedule when the change log timer job occurs.
    Job-config-refreshSpecifies the schedule for the configuration refresh job.
    Job-database-statisticsSpecifies the time schedule when database statistics are collected.
    Job-dead-site-deleteSpecifies the frequency interval and time range to delete unused Web sites automatically, for example, "Weekly at Sat 0:00:00".
    Job-immediate-alertsSpecifies the frequency to check for alerts that are to be sent immediately.
    Job-recycle-bin-cleanupSpecifies the time schedule for a cleanup of the Recycle Bin to occur.
    Job-usage-analysisLets an administrator set the time interval for usage processing.
    Job-watson-triggerDisplays the time schedule of the Windows SharePoint Services Watson Upload job.
    Job-workflowSends the workflow events that have been queued and delivers them to workflows.
    Job-workflow-autocleanSpecifies the time schedule for when a scan occurs to delete workflow instance data.
    Job-workflow-failoverSpecifies a schedule for restarting workflow operations that fail because of external reasons.
    Large-file-chunk-sizeSpecifies the amount of data that can be read from the server running Microsoft SQL Server at one time.
    Max-file-post-sizeSpecifies the maximum allowable size for a single upload of content to any site.
    Peoplepicker-activedirectorysearchtimeoutConfigures the timeout when a query is issued to Active Directory.
    Peoplepicker-distributionlistsearchdomainsRestricts the search of a distribution list to a specific subset of domains.
    Peoplepicker-nowindowsaccountsfornonwindowsauthenticationmodeSpecifies not to search Active Directory when the current port is using forms-based authentication.
    Peoplepicker-onlysearchwithinsitecollectionDisplays only users that are members of the site collection.
    Peoplepicker-searchadcustomfilterEnables a farm administrator to specify a unique search query.
    Peoplepicker-searchadcustomqueryPermits the administrator to set the custom query that is sent to Active Directory.
    Peoplepicker-searchadforestsPermits a user to search from a second one-way trusted forest or domain.
    Peoplepicker- serviceaccountdirectorypathsEnables a farm administrator to manage the site collection that has a specific organizational unit (OU) setting defined.
    PresenceenabledAllows users of a SharePoint site to see if other users are online and send instant messages to them.
    Recycle-bin-cleanup-enabledSpecifies whether a cleanup to the recycle bin occurs.
    Recycle-bin-enabledTurns the Recycle Bin on or off.
    Recycle-bin-retention-periodSpecifies the retention period, in days, of deleted items in the Recycle Bin.
    Second-stage-recycle-bin-quotaSpecifies how much hard disk space is available to a second stage Recycle Bin as a percentage of the quota allotted to the Web application.
    Token-timeoutSpecifies the amount of time before a user token times out.
    UsageprocessingenabledConfigures whether the usage analysis process is turned on or off.
    Workflow-cpu-throttleObsolete.
    Workflow-eventdelivery-batchsizeSpecifies the maximum number of work items that will be paged in to a processing timer job.
    Workflow-eventdelivery-throttleThe number of workflows that can be processed (that is, using the processor, not idle) at the same time across all Web front-end computers.
    Workflow-eventdelivery-timeoutThe time value a workflow job must run without the job timing out.
    Workflow-timerjob-cpu-throttleObsolete.
    Workitem-eventdelivery-batchsizeThe paging size for events delivered to a single workflow instance.
    Workitem-eventdelivery-throttleSpecifies the maximum number of work items that can be obtained on a given query for runnable work items

    How to Identify the SPFile.Properties hash table collection

    using Microsoft.Sharepoint;
    using System.Collections;


    SPSite _site = new SPSite("http://servername");
    SPFile _file = _site.OpenWeb().Folders("/Pages").File[1];
    Hashtable ht = _file.Properties;
    StringBuilder sb = new StringBuilder();
    sb.AppendLine("**The Properties of " + _file.Name.ToString()+" are as follows**");
    foreach(DictionaryEntry de in ht)
    {
    sb.Appendline("The key is " + de.Key.ToString() + " ; Value is " + de.Value.ToString() );

    }

    MessageBox.Show(sb.ToString());

    To Identify whether page is ghosted or not use SPFile.CustomizedPageStatus.

    Wednesday 23 April 2008

    How to avoid your MOSS WebSite Breaking - Part-2

    This time we will see how the contributors group work.
    -- (will continue this shortly,now am moved to SSRS integration with MOSS)


    These are some of the videos from Microsoft on usage of SharePointDesigner(SPD)


    Opening the Sharepoint designer via Command line with the required page.
    1. Go to windows--Run
    2. Type in "spdesign.exe /n http://servername/sitename/page.aspx".
    • This opens the sharepoint designer with a copy of page of our choice.
    ..
    Happy SPD'ing

    Tuesday 22 April 2008

    How to avoid your MOSS WebSite Breaking

    Very often we work with with various groups such as Web designers or content authors who are working on different aspects of a Web site. With so many groups working simultaneously, you are probably worried that somebody might inadvertently break a site — for example, by changing the design of the home page, modifying the style sheet, saving files in a wrong location, or breaking the site navigation or search functionality. If you are concerned, then I have a good news, We can avoid these scenarios by using Contributor Settings to turn on and configure Contributor mode in Microsoft Office SharePoint Designer 2007.

    Let us see what are these Contributor groups and how they are related to MOSS/SPD.
    1. Contributor mode is enabled by default, and there is no required setup for the site manager or administrator. Only an administrator can turn Contributor mode on or off.

    2.With Contributor Settings, a site manager can define Contributor groups in an organization, and then define exactly what tasks they can or cannot do in Office SharePoint Designer 2007.

    3.This means that you can use the Contributor Settings to set different editing restrictions for different groups.

    • For example, you can allow Web designers to create new styles but restrict content authors from doing the same.

    • Or you can allow content authors to create new pages from a master page but restrict the same for a different group.

    • Site managers can configure Contributor groups so that users have access to only those commands and features in Office SharePoint Designer 2007 that they need to complete their tasks.


    The features that you can access in Office SharePoint Designer 2007 depend on your role in the organization. See the following table for more details.
    The features that you can access in Office SharePoint Designer 2007 depend on
    your role in the organization.
    If you are a Site Manager
    If your SharePoint permission level gives you full control, you can:

    • Create Contributor groups and assign them editing restrictions.
      Insert content regions on a master page and specify the type of content that is allowed in that region.

    • Restrict areas outside of content regions on a master page from being edited.
      Control how and what types of pages are created and where content is saved.

    • Prevent users from modifying the default home page, master page, or any other page included in the site definition.

    • Allow full, unrestricted use of Office SharePoint Designer 2007 to only the groups you choose.


    If you are User such as a Web Designer or a Content Author (or any restricted user)
    Depending on the editing restrictions for your Contributor group, you can:

    • Create new pages

    • Apply styles and formatting to existing pages.

    • Insert images and media files

    • Work with SharePoint content such as Web Parts and Data Views



    Contributor Settings is not a security feature
    Important
    1)Contributor Settings is not a security feature. Contributor mode is a limited access mode for users who open and edit SharePoint sites in Office SharePoint Designer 2007.
    2)Contributor mode is designed to be used in an environment where site managers are confident of their users’ intentions.
    3)Contributor mode helps to guide users in a particular direction to carry out their tasks, and this guidance prevents accidental changes to the Web site.

    Understanding the Anatomy of MOSS

    I found a cute article which provides the dissected view of MOSS.
    Go through this link : MOSS Anatomy

    Friday 4 April 2008

    Using DataFormWebPart to render the List

    1. Open the page in Sharepoint Designer
    2. Insert the DataformWebpart
    3. Select the required list
    4. Switch to code pane of SPD.

    Replace the entire XSL
    <xsl>
    <?xml:namespace prefix = xsl />
    <xsl:stylesheet version="1.0" x="http://www.w3.org/2001/XMLSchema" d="http://schemas.microsoft.com/sharepoint/dsp" prefixes="xsl msxsl ddwrt" ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" asp="http://schemas.microsoft.com/ASPNET/20" __designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xsl="http://www.w3.org/1999/XSL/Transform" msxsl="urn:schemas-microsoft-com:xslt" sharepoint="Microsoft.SharePoint.WebControls" ddwrt2="urn:frontpage:internal">

    <xsl:output indent="no" method="html"></xsl:output>
    <xsl:decimal-format nan=""></xsl:decimal-format>
    <xsl:param name="dvt_apos">'</xsl:param>
    <xsl:variable name="dvt_1_automode">0</xsl:variable>
    <xsl:template match="/">
    <xsl:call-template name="dvt_1"></xsl:call-template>
    </xsl:template>
    <xsl:template name="dvt_1">
    <xsl:variable name="dvt_StyleName">Table</xsl:variable>
    <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"></xsl:variable>
    <table cellspacing="0" cellpadding="2" width="100%" border="0">
    <tbody><tr valign="top">
    <xsl:if test="$dvt_1_automode = '1'" cf_ignore="1">
    <th class="ms-vh" width="1%"></th>
    </xsl:if>
    <th class="ms-vh">Title</th>
    </tr>
    <xsl:call-template name="dvt_1.body">
    <xsl:with-param name="Rows" select="$Rows"></xsl:with-param>
    </xsl:call-template>
    </tbody></table>
    </xsl:template>
    <xsl:template name="dvt_1.body">
    <xsl:param name="Rows"></xsl:param>
    <xsl:for-each select="$Rows">
    <span class="ms-acclink">
    <xsl:text escaping="yes">&nbsp;</xsl:text>
    <xsl:text></xsl:text>
    <xsl:text escaping="yes">&nbsp;</xsl:text>
    </span>

    <a>
    <xsl:attribute name="href"><xsl:value-of select="@NavigateURL"></xsl:value-of></xsl:attribute>
    <xsl:attribute name="title"><xsl:value-of select="@Location"></xsl:value-of>-- <xsl:value-of select="@WorkCity"></xsl:value-of></xsl:attribute>
    <xsl:value-of select="@Title"></xsl:value-of>
    </a>

    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet></xsl>
    <parameterbindings>
    <parameterbinding name="ListName" defaultvalue="TopNavigation" location="None">
    <parameterbinding name="WebURL" defaultvalue="/" location="None">
    <parameterbinding name="dvt_apos" location="Postback;Connection">
    <parameterbinding name="UserID" defaultvalue="CurrentUserName" location="CAMLVariable">
    <parameterbinding name="Today" defaultvalue="CurrentDate" location="CAMLVariable">
    </parameterbindings>

    Wednesday 2 April 2008

    Getting user full name from Login information in MOSS

    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Administration;
    using Microsoft.Office.Server.UserProfiles;
    using Microsoft.Office.Server;





    SPSite _site = new SPSite("http://server/");
    ServerContext scontext = ServerContext.GetContext(_site);
    SPUser memb = _site.OpenWeb().CurrentUser;
    UserProfileManager upm = new UserProfileManager(scontext);
    UserProfile up = upm.GetUserProfile(memb.LoginName);
    MessageBox.Show(up["FirstName"].ToString() + up["LastName"].ToString());




    Hope this will help.

    we can get from Active directory also.

    In this we are accessing only sharepoint user profile store