Archive

Archive for the ‘SharePoint’ Category

SharePoint Important Security Update April 2015

April 21, 2015 Leave a comment

Microsoft released few days ago the Security bulletin MS15-36 rated as « Important ». This bulletin mention several breaches on Sharepoint 2013 and SharePoint 2010 that could lead to an elevation of privilege. Even if, so far, this breach seems to be not exploited, I recommend to patch your systems with the following updates :

 

Advertisements

Using ContentTypeId in CAML Query

June 28, 2013 Leave a comment

You can specify a Content Type Id in a CAML Query using the <FieldRef Name=’ContentTypeId’ /> clause. But to make this query works, you have to specify the right Value Type. Using “Text” or “Computed” mays works on some environments but fails on others…

It seems that the best choice is to use the “ContentTypeId” value type. This value type works pretty well with the Equals, or BeginsWith Condition.

Example:

           using (SPSite site = new SPSite(SiteURL))
            {
                using (SPWeb web = site.OpenWeb())
                {
                    SPList list = web.Lists[ListName];
                    SPQuery qry = new SPQuery();
                    qry.Query=String.Format(@"
                       <Where>
                            <And>
                                <Eq>
                                    <FieldRef Name='Title'/>
                                    <Value Type='Text'>{0}</Value>
                                </Eq>
                                <BeginsWith>
                                    <FieldRef Name='ContentTypeId'/>
                                    <Value Type='ContentTypeId'>{1}</Value>
                                </BeginsWith>
                            </And>  
                        </Where>",myDocumentTitle,myContentTypeID);
                    var myItem=list.GetItems(qry);

This article mention main value types, but the ContentTypeId is missing there.

Thanks Pierre

Bing Federated Search for SharePoint 2010

August 7, 2012 Leave a comment

SharePoint search offer federated search to external Search engines. There even a gallery where you can download a Federated search connector to Bing.

Unfortunately, this connector do not works: the query template target a http://api.bing.com/rss.aspx page, that do not exist anymore :

To make it work, you have to update this location to a funtionnal URL, http://www.bing.com:

Go to Central Administration/Manage Service Applications/<Your Search Service Application>

Then open Federated Locations and Edit the Bing Location :

Go to “Location Information Section” and set “Query Template” to http://www.bing.com/search?q={searchTerms}&format=rss&market={language}&web.count={count}&web.offset={startIndex}

Then go to “Display Information” and use Default Formatting for Federated Search Results, Core Search Results, and Top Federated Results

If you feel lazy, you can download a corrected connector (OSDX) on my skydrive: http://sdrv.ms/Qcuu9B

I don’t know when Bing Updated it’s RSS endpoint, but this federated connector really needs an update….

Blog is moving on WordPress

April 12, 2012 Leave a comment

Hi, after trying for months I have to give up: I’m moving my blog from SharePoint to WordPress.

I have to admit that SharePoint is really a great platform, we can do many amazing thing. But from my experience, getting a fully functional, nice and mobile-compatible is a long process that requires lot of energy and smartness. I’d rather to preserve this energy for our customers!

Many drawbacks I’ve experienced came from anonymous mode on Blog site template. I had 4 major issues:

  1. LockDown Feature involve Authentication (Guys Really? http://www.sharepointblues.com/2010/12/22/blog-site-in-anonymous-use/)
  2. Custom Xsl for anonymous user and ListViewWebpart do not works (http://social.technet.microsoft.com/Forums/en-us/sharepoint2010customization/thread/3d95f279-91c0-47be-b7b9-3a0f83ff4f8c )
  3. Managing anonymous comments aprovement is far to be easy. many others move comments on disqus.com
  4. You have to be well css-skilled to get a pretty design. And realllly, I’m a kind of CSS-Phobic

So I gave up. I’m moving to wordpress. From there I can easily manage my posts, comments,site theming etc…

Categories: SharePoint