in

didierdanse.net

Site personnel de Didier Danse
Didier Danse's Personnal Website
Microsoft Most Valuable Professional SharePoint

didierdanse.net - Development News

  • SharePoint: How to run a long running operation?

    Sometimes, we need to run long operations using a synchronous mode. As SharePoint is based on a web technology, performing a long operation can be complex without having timeouts and so on. In SharePoint, we have the possibility to declare an operation as a long running operation.

    During the operation (or a set of operations), page is displayed with the classic loading logo with your own message (in the following screenshot, values are default ones) :

    This can be done using this simple code:

    using (SPLongOperation operation = new SPLongOperation(this.Page))
    {
        operation.LeadingHTML = "Performing operations ...";
        operation.TrailingHTML = "Please wait while the operations are performed.<br/><br/> This can last a few minutes.";
        operation.Begin();
                        
        // Operations that have to be performed
          
        operation.End(http://yourserver/destinationpage.aspx);
    }

    That’s all for today!

    ____

    Didier Danse – http://didierdanse.net

    Microsoft Most Valuable Professional SharePoint
    Devoteam LuxembourgDevoteam Group

  • SharePoint 2010: Farm, web application, sites collection, sites and subsites, how to know what to use?

    Original post: SharePoint: Farm, web application, sites collection, sites and subsites, how to know what to use?

    Because of the scalability of SharePoint, each one who has to organize a SharePoint infrastructure is quickly set against an important question: What to use and at what time? There isn’t only one answer to this. Each element that composes an complete Infrastrcutre has typical properties and objectives. So we have to use the best container according to objectives and content.

    There is some kind of containers. The most important are:

    • 1a) SharePoint Farm (SPFarm from a SharePoint point of view)
    • 1b) Services applications
    • 2) Web Application (SPWebApplication)
    • 3) Sites Collection (SPSite)
    • 4) Sites (SPWeb)
    • 4) Sub sites (SPWeb)

    Mainly the first four elements (in blue) are used for technical reasons while the two other ones are used to structure sites and data from a logical point of view.

    So have a quick look through elements that are used in a SharePoint infrastructure. For more details, please use the best tool in the developers’ world: Internet.

    1.A) SharePoint Farm

    A SharePoint farm is a group of front-end servers, applicative servers (Shared Services), indexing servers and database servers. A SharePoint farm can be deployed to a particular location according to objectives (Internet access, geographical localization, …).

    image

    1.B) Service applications

    This is a set of services that are available at farm level. Because of this, it is shared between the different web applications and site collections.

    These services are responsible of:

    • User Profile (profile properties, synch parameters)
    • Search (scopes, properties mappings, content sources, …)
    • Excel Services
    • Business Data Catalog

    image_thumb7

    Each service can be enabled or disabled on each SharePoint servers. This allows SharePoint infrastructure to be the most efficient and met security and availability requirements.

    2) Web Application

    There is nothing new for ITs or developers that already worked with sites or applications powered by ASP.NET, PHP or all server-side technologies. A web application characteristics are:

    • A site in IIS
    • A particular url
    • A authentication method associated with this web application

    image

    We can notice that a web application uses its own database in a SharePoint context (to be more precise, it is the case for new application. There is the possibility to create Web Applications extensions. These extensions can use different parameters that the main web application. We will use this when we want to share data between web applications and use different authentication modes for example).

    Furthermore, SharePoint is an ASP.NET application so it uses Web.config files. We will be able to add differents entries according to the objectives of the web application. We will remove some features if the web application is used by partners for example.

    Finally, a web application is always associated with a SSP.

    3) Sites Collection

    A sites collection is a virtual container (there is no physical file as it is the case for previously described elements) and sites collection structure is stored in a configuration database.

    Form an IT point of view, sites collection has some advantages. The main advantages are:

    • Content quota templates
    • Ease of maintenance (backup / restore is performed by site collection by default)

    image_thumb15

    From a content manager point of view, we will notice that an administrator is defined each site collection. This administrator can manage:

    • Second level Recycle bin
    • Customized search
    • Users of the site collection

    Lastly, site collections is used to bring customized elements together and shared them with a audience that will access data across this sites collection (per example a department):

    • Master Pages
    • Images
    • Sites and lists Templates
    • Web parts

    There is always a root site in a site collection.

    image_thumb22

    4) Sites and subsites

    In the beginning of this post, we told a lot of time of IT guys, a little bit about developers but I didn’t told about about end users even though they are the driving force of SharePoint content.

    At this level, everything is related to content management. According to the users permissions, they can:

    • Create sites
    • Create lists
    • Attach workflow to lists
    • Grant permissions
    • Restore deleted content
    • A lot of others operations!

    At this level, there is only one important thing to manage and organize data: company best practices and rules. It doesn’t matter where data are logically based, it will be physically stored in the same database. However, data should be spread all around sites and sub-sites. Do not hesitate to use important feature as permissions inheritance. It will help to organize data efficiently.

    image

    It is possible to add some code or reporting tools but the most important thing is the end-user and power-user training.

    Here is a SharePoint structure example:

    • Farm
      • Web Application 1
        • Sites collection A (with top-level site)
          • Site A.1
            • Site A.1.1
            • Site A.1.2
          • Site A.2
        • Sites collection B (with top-level site)
          • Site B.1
            • Site B.1.1
              • Site B.1.1.1
          • Site B.2
      • Web Application 2
        • Sites collection C (with top-level site)
          • […]
        • Sites collection D (with top-level site)
          • […]

    There is a lot things to write about this topic. I hope that you will have an understandable overview of SharePoint infrastructure and also the reasons of getting information from Internet or specialist.

    ____

    Didier Danse – http://didierdanse.net

    Microsoft Most Valuable Professional SharePoint
    Devoteam LuxembourgDevoteam Group

  • SharePoint: How to display simple external page, a folder or a web application integrated in SharePoint

    Displaying an external is quite often required by the users. To do this, here is a small procedure to perform this operation:

    In the page you want to display the embedded page, click on “Edit Page” if you have the update permission for this page. Add a web part and select Content Editor.

    image

    After this, you will have to indicate the corresponding page.

    image

    For example, fill the information with www.google.be. The page is now visible as an embedded page.

    .image

    You can do the same and display a Shared Folder. Logon user permissions will still be applied.

    image

    ____

    Didier Danse – http://didierdanse.net

    Microsoft Most Valuable Professional SharePoint
    Devoteam LuxembourgDevoteam Group

  • SharePoint Health Analyzer: “Built-in accounts are used as application pool or service identities” but I don’t find the service in the services list. What can I do?

    If your service account is not in the services list (i.e. SPTraceV4), you will not be able to manage the service through the central administration user interface. As you should use SharePoint to perform this operation, you will have to use PowerShell. You can use the following script:

    $servicename = "SPTraceV4"
    $managedaccountname = "DOMAIN\sp_admin"
     
    $farm = Get-SPFarm
    $SPTimerv4 = $farm.Services | Where {$_.Name -eq $servicename}
    $SPTimerV4NewAccount = Get-SPManagedAccount $managedaccountname
    $SPTimerv4.ProcessIdentity.CurrentIdentityType = "SpecificUser"
    $SPTimerv4.ProcessIdentity.ManagedAccount = $SPTimerv4NewAccount
    $SPTimerv4.ProcessIdentity.Update()
    As you can see, you will have to use a managed account. If your account is not yet registered as a managed account, you will have to register it before performing this operation.

    ____

    Didier Danse
    Devoteam LuxembourgDevoteam Group

  • SharePoint: How to activate anonymous access

    The following screenshots are based on SharePoint 2010 but the way to do the operation is the same with SharePoint 2007.

    SharePoint can be used for Public Internet facing web sites. Internet web sites are mostly available for anonymous users. By default, SharePoint ask for credentials, which is not the expected behavior for these Internet sites.

    SharePoint can be easily opened to anonymous users. Just follow these steps:

    Enable anonymous access for the web application

    As authentication settings are active at web application level, you have to go to the Central Administration > Application Management

    image

    Select the Web Application you want to use and click on Authentication Providers

    image

    The default authentication provider is Windows. Click on default and you will be able to manage some settings for this provider.

    image

    One of them is Anonymous access. Check the corresponding check box and now you can set some permissions for anonymous users.

    image

    Global permissions for anonymous users

    Back to the Web applications list. Click on Anonymous Policy.

    image

    You can now set global permissions for anonymous users.

    image

    Allow anonymous users to access your site

    Go to your public web site.

    Depending on your architecture, login prompt is display or not. When you are authenticated with an account that has access to site settings, click on Site Permissions.

    image

    Because you have activated the anonymous access at Web application level, you have a button in the ribbon named Anonymous access.

    image

    Select the permissions for the anonymous access

    image

    That’s all! Now anonymous users can access your SharePoint site! That’s the first step in implementing Web Content Management using SharePoint.

    ____

    Didier Danse
    Devoteam Luxembourg – Devoteam Group

  • SharePoint: How to create a site collection and store data in a specific database

    Databases management is important. As SharePoint use a lot of databases, databases management is an important element. Because of this, a specific database is used for storing some specific group of data. Generally, the group of data is the site collection scope.

    By default, user interface doesn’t allow to create a site collection and use a specific database.

    There is different ways to perform the operation depending on your needs:

    • Use of STSADM createsiteinnewdb command;
    • Use of New-SPSite Powershell command;
    • Use of user interface to change databases status.

    STSADM createsiteinnewdb command

    The createsiteinnewdb has the same objective than createsite command but there are some extra parameters. 4 of them concern database settings:

    • databaseuser;
    • databasepassword;
    • databaseserver;
    • databasename.

    So you create a new database and use it to store your site collection data.

    For more information about createsiteinnewdb, visit the following site: http://technet.microsoft.com/en-us/library/cc262407(office.12).aspx

    New-SPSite Powershell command

    Powershell is powerful in the SharePoint context. New-SPSite command can be used to create your site collection and store data in a specific existing database (ContentDatabase parameter). So if you want to create a new DB, you have to perform the operation before using New-SPSite.

    Here is a sample of this command:

    New-SPSite http://<sitecollectionUrl> -OwnerAlias “<domain>\<user>” -ContentDatabase <DB_Name> -Name “Demo”

    For more information about New-SPSite, visit the following site: http://technet.microsoft.com/en-us/library/ff607937.aspx

    User interface and database status

    SharePoint databases have two statuses:

    • Ready ;
    • Offline.

    Offline seems to be “Not available” but exact meaning is “when the database status is set to Ready, the database is available for hosting new Site Collections. When the database status is set to Offline, no new Site Collections can be created”. Offline DBs can still be used for the existing site collections.

    So you can manage available databases. To perform this operation, go to the central administration and follow this path:

    Central Administration > Application Management > Manage content databases

    This last link points to: http://<SharePointCentralAdminUrl>/_admin/CNTDBADM.aspx

    Set all databases statuses to Offline except for the one you want to use.

    image

    If all databases are set to Offline, you will receive the following error message when trying to create a new site collection:

    clip_image004

    The operation that you are attempting to perform cannot be completed successfully. No content databases in the web application were available to store your site collection. The existing content databases may have reached the maximum number of site collections, or be set to read-only, or be offline, or may already contain a copy of this site collection. Create another content database for the Web application and then try the operation again.

    Go back to content databases management page and set a database as Ready.

    Now you can plan backup for databases easily.

  • An existing SharePoint web application “cannot be found”, why?

    When you develop with SharePoint, sometimes you have some confusing errors. Here is one of them…

    image

    The complete error message is

    The Web application at http://<servername>/<sitename> could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

    It is not complex to succeed having this code working. Just look at the following screenshot:

    image

    Now it is running. So, what’s the difference?

    Have a look to the toolbar and you will see the only difference…

    image

    Yes, this message is not clear but the main cause is that you are developing a application targeting x86 (32 bits) environment and running it on a 64 bits environment… Be careful about this. Do not forget to use development, test and production environments with similar configurations.

  • Print as PDF option with Office 2010

    Because Microsoft released a Print as PDF addin for Office 2007, a lot of people have the same reaction: go to the Internet and search for Print as PDF addin for Office 2010 but they don’t find any download.

    With Office 2010, we should call this feature Save as PDF. Let’s have a look to the save as file type options:

    image

    You will find PDF (*.pdf) option. That’s all…

  • Enter the real interoperability ECM World with Content Management Interoperability Services (CMIS)

    How many times did you hear “This product is better for this part and this product is better for all the rest”? I am pretty sure that you are not able to answer this exactly. Most of you will say “a lot of time”. Every time there is this question, we heard “We will integrate both solutions”. But what does “integrate” mean? Most part of time, the answer is “develop custom features that will meet the other solution web services specifications”. It works… until any change!

    More ways two solutions can communicate more issues you will face out. Because of this, ECM leaders (Microsoft, IBM, EMC, Alfresco, OpenText, SAP and Oracle) worked on interoperability specifications for a lot of months (about two years!) and proposed a standard way to implement communication points in the major ECM solutions. This standard is called Content Management Interoperability Services (CMIS). CMIS will reduce difficulties about interoperability in a heterogeneous environment.

    This specification has been proposed to Oasis consortium. After public vote, CMIS specifications have been approved.

    Read the complete announcement from Oasis : http://www.oasis-open.org/news/oasis-news-2010-05-04.php

    Normally, CMIS Connector will be available in the beginning of July through the SharePoint Administrator Toolkit. We hope that all vendors will implement and deploy CMIS soon.

  • Software Development Kits and Training Kits available for developers

    A few days ago, someone ask me where he was able to find some information about SharePoint and Office development. Here are some interesting links:

    SharePoint 2010: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=f0c9daf3-4c54-45ed-9bde-7b4d83a8f26f

    SQL Server 208 R2: http://www.microsoft.com/downloads/details.aspx?familyid=FFFAAD6A-0153-4D41-B289-A3ED1D637C0D&displaylang=en

    Office 2010: http://www.microsoft.com/downloads/details.aspx?FamilyID=b90fadab-f4f9-4452-aa61-ed7bd5d8111e&displaylang=en

    Identity: http://www.microsoft.com/downloads/details.aspx?familyid=C3E315FA-94E2-4028-99CB-904369F177C0&displaylang=en

    There are others SDK and Training Kits that are available. Do not hesitate to do have a deeper look to.

  • Windows Server 2008 Server doesn’t detect any wireless, what can I do?

    You installed your wireless network adapter and you feel happy until you see that Windows Server 2008 (R2) is not able to find any network. Does your adapter is not compatible with Windows Server 2008? Maybe… But before buying another one, be sure that Windows Server has the Windows LAN Service feature is active.

    Go to the server Configuration tasks. Click on Add features.

    Untitled 2

    Check Wireless LAN Service

    Untitled 1

    and enjoy!

    Thanks a lot to Marc Donnay for the tip!

  • SharePoint 2010 Certifications

    New SharePoint certifications are (nearly) here. By reading the content of these certifications, it seems that they are a little bit difficult compared to previous SharePoint certifications.

    You will find more information by following the links:

    Exam 70-667: TS: Microsoft SharePoint 2010, Configuring http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-667&locale=en-us

    Exam 70-668: PRO: Microsoft SharePoint 2010, Administrator http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-668&locale=en-us

    Exam 70-573: TS: Microsoft SharePoint 2010, Application Development http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-573&locale=en-us

    Exam 70-576: PRO: Designing and Developing Microsoft SharePoint 2010 Applications http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-576&locale=en-us

  • How to show Developer tab in Office 2010

    Because there is some changes in Office 2010 about the way to display the developer tab in Microsoft Office 2010, here is a quick update about how to do this with Office 2010.

    The following screenshots come from Microsoft Word.

    • Go to File tab;

    image

    • In the Customize Ribbon zone, check Developer menu item.

    image

    • Go back to your application. The developer tab is there.

    image

  • SharePoint 2010: All about Document Set

    There is a lot of situations that requires the use of multiple files. These files are grouped and has to be considered as an unique item.

    With SharePoint 2007, the only way to group documents together were to use folders. Now we have a way to manage, edit and shared metadata between each element of a group of files directly in the user interface without any custom development. This feature is named Document Set.

    Document set is new in SharePoint 2010 and is really an interesting concept that we were waiting for a long time. So let have a global overview of this new content type available as a site collection feature.

    Quick overview

    When adding a new document set, this screen pops up:

    image

    After saving the new document set, it is available as an item in a SharePoint document library.

    image

    Document set is displayed as a web page with some metadata about the document set and a list with contained documents.

    image

    As you may know, ribbon is new in SharePoint 2010 and is available on each page. When a document set is loaded, the following ribbon items are available. We will discuss each of these features in the next paragraphs.

    image image 

    Versioning 

    There is the possibility to create version of a document set and also versions for the documents in the document set. So you can create a lot of documents versions before creating a document set version.

    Document versioning is performed as usual. According to your settings, new version is created when uploading the document or modify it. Version history is similar to the feature that was available in SharePoint 2007.

    image

    Because Document Set is a content type, we can use versioning and so on. Document set version is a snapshot of related documents with the latest versions captured when clicking on Capture Version in the ribbon.

    image 

    Because minor versions can be considered as draft, we can check which documents versions should be used:

    • Latest major versions only;
    • Latest major or minor versions.

    We also have the possibility to add a comment to the document set version.

    image

    Document set version history will display versions of the document set itself but also the captured versions of the documents in the document set.

    image

    Metadatas

    Metadatas can be shared (applied) across the different documents in the document set. So you just have to add the metas to the document set and every document in the document set will use the same metadatas.

    It is a very simple feature but it is really something that was missing before. Now you can perform more efficient searches as every file has the metadata on it.

    Workflows

    Version capture and content changes can happened on document sets. These events can be used to run workflows. Really useful for global approve on a set of documents.

    image

    Because documents contained in the document set are group of unique documents, workflow can be attached to each document as we did with SharePoint 2007.

    image

    By using both workflow levels, we can run a lot of scenarios. Approval can be applied to individual documents and to a set of documents.

    Permissions

    Permissions set at document level are, by default, inherited from the document set itself.

     image

    You can configure permissions on each individual document within the document set. Sometimes it is necessary to grant access to a document to a particular user but not all the other documents. That’s the same way to manage permissions within a document library.

    Because there is a lot of other possibilities, we will just tell that every feature available at document level is available for document set level. Just remember that document set is considered as an item.

    Download

    Unfortunately, there is no way to download all the files in the document set.

    Document Set Welcome page

    Document set have welcome page that can be customized. As you can see on the following screen, there is the possibility to add some web part on the welcome page of a document set.

    It can really be useful for displaying information about the document set itself as the document set is can be considered as an single item or a set of different files that are related each other.

    image 

    How to set up document set?

    Document set is a content type. Content type will be available as soon as Document Sets feature will be activated. You need to have permissions at site collection level before activating this feature.

    To enable this content type, go through the following screens:

    • Click on Site Settings

    image

    • Go to Site collection features

    image

    • Activate the Document Sets feature

    image

    The new content type is now available but need to be activated at document library level.

    • Click on Library Settings for the library that will contains Document Sets

    image

    • You have to go to the advanced settings page…

    image

    • … and then check the allow management of content types box.

    image

    • On the Settings page, click on Add a new content type

    image

    • Now, Document Set is available in your document library

    image

    Have a great day!

  • Microsoft License Advisor

    Do you need to have information about Microsoft licensing? There is a website that is available from Microsoft. You can configure products and calculate costs.

    image

    http://www.microsoft.com/licensing/mla/default.aspx

    According to first tests, it should be interesting that the tool select automatically requirements. Merging information on product description with information in the tool will permit to have a global overview of cost.

More Posts Next page »
L'auteur du site ne peut être tenu responsable des dommages que les informations fournies pourraient entraîner. Tout est cependant mis en oeuvre pour éviter tout désagrément.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems