|create|it| wins the Best Public Website award

I´m proud to annunciate that create|it| (the company where i work) is the winner of the European SharePoint Community Awards 2012 in the “Best Puplic Website” category.

So many months of hard team work to make the better for the Pestana Websites using SharePoint 2010 environment.

I’m a member of the fantastic team that work in this project and I want to congratulate everyone (my colleagues, my company, the client stakeholders, the design company).

For more information about this award:

http://sharepointeurope.com/content/award-winners-2012.aspx

Pestana Websites:

http://www.pestana.com

http://www.pousadas.pt

http://www.pestanapriority.com

Using Application library caching

If you have a Silverlight application (framework 3.0 or superior) which the XAP file is sizable and the application has performance problems, you should put the project references in separate files using application library caching.

You can follow this MSDN article that explains all that you need to implement Silverlight application library caching.

Basically, the Silverlight packages specifies assemblies as external parts of the application package (a zip file that contains the assembly dll). Then, it will download all of the required package parts specified on application manifest.

To do this, you just need to create a xml file named <assembly name without extension>.extmap.xml. It must have content similar like this:

<?xml version="1.0"?>

<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

          xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <assembly>

    <name>System.Json</name>

    <version>2.0.5.0</version>

    <publickeytoken>31bf3856ad364e35</publickeytoken>

    <relpath>System.Json.dll</relpath>

    <extension downloadUri="System.Json.zip" />

  </assembly>

</manifest>

File Elements Description:

  • name – Assembly name
  • version – Assembly version
  • publickeytoken – Key token which you used to sign the assembly.
  • relpath – Assembly file name.
  • extension – Uri where it’s possible to download the assembly package.

Note: You cannot use the application library caching on out-of-browser applications.

Silverlight tips for designers

If you're doing a Silverlight-based project that are involving a web design team, don’t forget to tell to designer to ensure the following tips:

  • Only use images with 92 dpi (the designers are habituated to use images with 72 dpi, and they should only use images with 92 dpi because Silverlight always use this resolution).
  • To import the design mockup to Expression Blend, the designer should use the RGB as the color model.

Customizing a page on SharePoint 2010

In the last week, I needed to customize a native page on SharePoint 2010 for a specified project. After I’ve done some searches on my feeds, I found a great article which it explains how to customize some parts of the SharePoint page.

This article focuses to customize the ribbon positioning in SharePoint 2010 master pages, but it explains all that i needed to known.

Followed (and tested on my dev environment) by the article, you must to ensure that you have the following containers on your SharePoint master page:

  • Ribbon container – Div which the control id is s4-ribbonrow. You need it to put the SharePoint ribbon.
  • Body container – Div which the control id is s4-workspace and an inner div which the control id is s4-bodyContainer. You need it to put your page content.

I'd a webpart zone on my page content (inside the page layout), and the only problem was when I tried to change the webpart settings, because I didn’t saw the settings control (the SharePoint rendered the control outside the body container).

To fix that (I spent a lot of time debugging), you need to ensure that you’ve a div (which control id is MSO_ContentDiv) on you page content. It’s necessary, because when you want to change the webpart settings the SharePoint will render the settings control inside this div.

The Taxonomy feature has not been activated

If you’re trying to create a managed metadata site column type on SharePoint Server 2010 Beta and it’s returning the following error:

The Taxonomy feature (Feature ID "73EF14B1-13A9-416b-A9B5-ECECA2B0604C") has not been activated.

Check this post.

Basically, you need to run the following command in the Command Prompt:

STSADM -o activatefeature -id 73EF14B1-13A9-416b-A9B5-ECECA2B0604C -url http://<server> –force

Don’t forget to change <server> to the name of your SharePoint server.

Using Deployment setting on Production Environment

When i studied for the Microsoft exam (70-562, Microsoft .NET Framework 3.5, ASP.NET Application Development) i found an interesting setting that i didn’t known, the Deployment.

This configuration setting ensures that your application will override important application level settings used when you developed your web application. It will ensure that the following configurations are done:

  • debug is set to false
  • page output tracing is disabled
  • force customErrors to be shown to remote users (it will ensure that the end user only see friendly error messages)

If you want to activate this setting, you need to put the following configuration on the machine.config:

<configuration>

      <system.web>

            <deployment retail="true"/>

      </system.web>

</configuration>

Some references:

Visual Studio Build Error (HRESULT 0x80131515)

Today I’ve tested the Silverlight Validation Framework  in the Visual Studio 2010 beta 2.

I downloaded the assemblies, then i added the assembly references on the project, and then i tried to compile the project. But the compiler found the following error message:

I found solution to fix this on the Rob’s blog.

To fix this you need to open the Properties for each assembly (via file system) and then click Unlock as you can see in the following screenshot:

Reset Identity value

Today, i needed to reset the Identity value for one column in the SQL Server database.

I used the following commando to view the current identity value:

DBCC CHECKIDENT ('TableName1', NORESEED)

and then, it returned the following message:

Checking identity information: current identity value '53', current column value '53'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Finally, after I've checked the current identity value, i needed to reset this value and I've used the following command:

DBCC CHECKIDENT (TableName1, RESEED, 0)

and then, it returned the following message: 

Checking identity information: current identity value '53', current column value '0'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Excel Services: Using REST to get data

Now with SharePoint 2010 we are be able to use REST to getting excel file data using Excel Services.

The syntax is very simple and quickly to understand. I will leave here some samples of how you can use REST to get data.

To access to your Excel file, you can use the following link:

http://<site>/_vti_bin/ExcelRest.aspx/<library>/<file>/Model

  • <site> – SharePoint site (such as createit:8080)
  • <library> – SharePoint document library that contains the excel file (such as Profits)
  • <file> – The Excel file that you want to getting data (such as ProfitsV2.xlsx)

And then you will be able to get some different type of data as the following samples:

Used Excel file screenshot (to compare with data results using REST):

 

  • Get workbook (ATOM format)

http://createbox/devplatform/_vti_bin/ExcelRest.aspx/Simulators/WorldMarkets.xlsx/Model

 

  • Get a range (HTML format)

http://createbox/devplatform/_vti_bin/ExcelRest.aspx/Simulators/WorldMarkets.xlsx/Model/Ranges('WorldMarkets')

  • Get a range (ATOM format)

http://createbox/devplatform/_vti_bin/ExcelRest.aspx/Simulators/WorldMarkets.xlsx/Model/Ranges('WorldMarkets')?$format=atom

 

  • Get a graphic (Image format)

http://createbox/devplatform/_vti_bin/ExcelRest.aspx/Simulators/WorldMarkets.xlsx/Model/Charts('Chart%201')?$format=image

SharePoint and Office Tips