Welcome to Comunidade Bloggers |create|it| Sign in | Join | Help

António Vargas - SharePoint 2010


.Net
SharePoint
Silverlight
|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:

How to create a Text Box control in Multiline mode

If you need to create a Tex Box control in Multiline mode as you can do in the ASP.NET, check this tip.

You just need to add the AcceptReturn property on your Text Box control as the following sample:

<TextBox x:Name="textBox1" AcceptsReturn="True"></TextBox>

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

PDC09: Silverlight videos

Yesterday, i finally had time to watch some PDC09 session videos and i found some interesting Silverlight videos on my point of view.

Here are the links to the videos that I recommend you to see:

  • How to get data to Silverlight control (What should i use?)

Networking and Web Services in Silverlight

  • Silverlight on SharePoint:

Developer Patterns to Integrate Microsoft Silverlight 3.0 with Microsoft SharePoint 2010

  • RIA Services:

Mastering Microsoft .NET RIA Services

Building Amazing Business Applications with Microsoft Silverlight and Microsoft .NET RIA Services

  • Expression Blend:

Microsoft Expression Blend 3 for Developers: Tips, Tricks and Best Practices

SharePoint 2010: Failed to register SharePoint Services on configuration wizard

When i try to run SharePoint configuration wizard after install SharePoint 2010 beta, the wizard application throw a timeout exception and the SharePoint configuration steps aren’t done.

To resolve this problem you need to go to the Registry Editor and delete SPSearchService entry.

Steps:

  1. Go to the Start Menu and then click Run.
  2. Write regedit on Run box.
  3. Navigate to the SharePoint registry entries on HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web ServerExtensions\14.0\WSS\Services.
  4. Delete SPSearchService entry.
  5. Run the SharePoint Configuration wizard again.
Silverlight 4 announced

It was announced the release of Silverlight 4 at PDC, two weeks ago.

The beta version is now available here.

This framework version will include the following new interesting features:

  • Print support
  • Webcam and microphone support
  • Audio and video local recording capabilities capture RAW video without requiring server interaction.
  • Google Chrome support
  • Rich Text Editing
  • Performance optimizations mean Silverlight 4 applications start quicker and run 200% faster than the equivalent Silverlight 3 application.
  • Read and write files to the user’s MyDocuments, MyMusic, MyPictures and MyVideos folder.
  • Enhancements to networking allow cross-domain access without a security policy file.
  • Right Click events

 

Some interesting links to learn more about Silverlight 4:

What’s New in Silverlight 4 Beta?

Getting Started with Silverlight 4 Beta

Microsoft Silverlight 4 Overview

Five Silverlight 4.0 features you cannot do without

Silverlight 4 Beta – A guide to the new features

Some interesting Silverlight controls on CodePlex

I found some Silverlight controls on CodePlex that i think that are important to share:

Silverlight Timeline control:

http://timeline.codeplex.com/

Silverlight DataFilter control:

http://riadatafilter.codeplex.com

Silverlight Cover Flow:

http://silverlightcoverflow.codeplex.com/

Add Silverlight control to SharePoint

One of the problems using Silverlight on SharePoint 2007 is how can we add a Silverlight control in the SharePoint site?

A quickly and simple solution that i found to do it is the SPSilverlight web part, a web part that allows you to add a Silverlight control to SharePoint.

The only configuration that you need to known is the path where the XAP file is stored in SharePoint (on the layout’s folder, on the library…).

To use this web part you need to install the following package:

http://spilverlight.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=35120

More Posts Next page »