Joao Livio { MIX ~ UP on Europe}

Join me on my Session of WCM Migration SharePoint

Migração: Soluções WCM 2007 para SharePoint 2010
(WSPBuilder,Web Applications, Content Databases)


(12 May) At: www.sharepointpt.org (Microsoft Portugal)

pt-PT 

Inscrições:

http://spugptmeeting20.eventbrite.com

Link LiveMeeting:

a anunciar

image010

Agenda

09:30: Recepção dos participantes

10:00: Abertura

10:15: Sessão: “Out-of-band solutions for feature gaps and value-add guidance for the ALM community" com Rui Melo, Microsoft

11:00: Coffee-break

11:15: Sessão:“Migração: Soluções WCM 2007 para SharePoint 2010 (WSPBuilder,Web Applications, Content Databases)”com João Lívio

12:00: Painel de discussão

13:00: Final da Reunião & Lunch

( Almoço em grupo para convívio. A participação no almoço é opcional.)

Aquele abraço, com muitos disposes à mistura !

Rodrigo Pinto, SharePoint MVP, Specialist, Evangelist

SharePointPt Founder

SharePointPT- Comunidade Portuguesa de SharePoint

SharePointPt Site: http://www.sharepointpt.org

SharePointPt no FaceBook: http://www.facebook.com/profile.php?id=100000660657466&ref=mf

SharePointPt no Twitter: http://twitter.com/spugpt

SharePointPt Email Account : spugpt@gmail.com;

image010

Como chegar:

O local do evento é no Auditório da Microsoft na Expo (perto do Oceanário)

Morada:
MSFT, Software para Microcomputadores, Lda.
(Subsidiária da Microsoft Corporation)
Rua do Fogo de Santelmo, Lote 2.07.02
1990 – 110 Lisboa

Mapa: http://bit.ly/JYRt9a

Cross-Posted from http://msmvps.com/blogs/officept/default.aspx
Get WebApplication Sites and Structure with T-SQL

Hi!

Today i had the need to get an Intranet Structure using a SharePoint Content DB. Because i don’t want to run in Production or Quality i restored the Content DB Backup to my Developer Laptop.

This procedure return all List in Web also

T-SQL

 SELECT     
   
Webs.FullUrl as 'URL',

   
Webs.Title as 'Web Title',

   
WEBS.Description as 'Web Description',

   
AllLists.tp_Title as 'List Description',

   
AllLists.tp_Version as
'List Version'
FROM
         
   
Webs INNER JOIN
 
   
Sites ON Webs.SiteId = Sites.Id
 
   
INNER JOIN AllLists ON Webs.Id = AllLists.tp_WebId

ORDER BY

   
Webs.FullUrl
 

If you want to run in Production use:

with (nolock)

Cross-Posted from http://msmvps.com/blogs/officept/default.aspx
My Last Microsoft Adventure

DM

Cross-Posted from http://msmvps.com/blogs/officept/default.aspx
Posted: 28-3-2012 16:07 por jlivio | with no comments
Filed under:
Microsoft Online Services Diagnostics and Logging

image

Overview

MOSDAL Support Toolkit collects system configuration, network configuration, service-based applications' configuration and logging data along with performing network diagnostics. MOSDAL Support Toolkit can be used by anyone having issues with the Microsoft Online services. A KB article about the tool can be found over here: http://support.microsoft.com/kb/960625

Download: Here

Cross-Posted from http://msmvps.com/blogs/officept/default.aspx
Create a WebPart Dynamically thru a DWP (XML File Exported)

This method will create a WebPart within a XML File DWP that is an exported WebPart file when you export by clicking his option.

  • webSite = SPSite
  • wpId = ZoneID
  • wpZi = ZoneID
  • wpPage = Page Name
  • wpDwp = DWP File

By my tests the ZoneID sometimes is not assumed, I presume it is a bug in the ObjectModel, or not

/// </summary>
/// <param name="webSite"></param>
/// <param name="wpId"></param>
/// <param name="wpZi"></param>
/// <param name="wpPage"></param>
/// <param name="wpDwp"></param>
/// <returns></returns>
public static bool CreateWebPart(string webSite, string wpId, string wpZi,
 
   
string wpPage, string wpDwp)

{
   
try
   
{
       
// Get a reference to a web and a list
        using (var site = new SPSite(webSite))

       
{
           
var web = site.OpenWeb();
           
// Get the web part collection
            var coll = web.GetLimitedWebPartManager(String.Format("{0}/Pages/{1}", webSite, wpPage), PersonalizationScope.Shared);

           
using (var reader = new XmlTextReader(wpDwp))
           
{
               
// import the web part from the stream
                string errorMessage;

               
var newWp = (WebPart)coll.ImportWebPart(reader, out errorMessage);
               
reader.Close();
               
newWp.ZoneID = wpId;
               
// check for import errors
                if (!string.IsNullOrEmpty(errorMessage))

                   
return false;
               
// add the web part to the page
                coll.AddWebPart(newWp, newWp.ZoneID, Convert.ToInt32(wpZi));

           
}
       
}
       
return true;
   
}
   
catch (Exception ex) {return false; }
 
}

Cross-Posted from http://msmvps.com/blogs/officept/default.aspx
Posted: 22-12-2011 22:21 por jlivio | with no comments
SharePoint n-tier architecture Projects (Only My Point of View)

N-tier application architecture provides a model for developers to create a flexible and reusable application. By breaking up an application into tiers, developers only have to modify or add a specific layer, rather than have to rewrite the entire application over.

In SharePoint this makes sense no? I have seen MOSS and Foundation projects where everything it’s mixed so all point’s of failure are in the same place and it’s more confuse, to not say a mess, understanding the business logic, N-Tier Architectures make application more robust because there is no single point of failure. Tiers function with relative independence, and this in SharePoint makes the difference.

N-Tier Architecture helps developers build web applications because it allows developers to apply their specific skill to that part of the program that best suits their skill set. Graphic artists can focus on the presentation tier, while developers can focus on the code tier.

Let’s see this example diagram, this is only a very simple example 

image

The important concept to note here is that if the interfaces between an n-tiered application's layers remain constant, the implementation of each layer can be easily upgraded or changed. This is also a fundamental concept of good object oriented design. Another advantage is that you can reuse some parts of this project, like the Claims Signin Page.

CONCLUSION

There are almost an infinite number of architectural variations you can use when developing SharePoint applications. The best ones are both easy to create and maintain

Joao Livio
SharePoint Consultant, Project Manager
www.primesoft.pt
Microsoft Most Valuable Professional Office Systems since2002

Cross-Posted from http://msmvps.com/blogs/officept/default.aspx
Posted: 22-12-2011 18:30 por jlivio | with no comments
Introduction to Property Bags in SharePoint

Original Article in www.sharepointpt.org Portuguese Format written by me

DEFINITIONS

For those not familiar with the Property Bags, what are they?

A place to store metadata or properties of your SharePoint sites. The Property Bags are implemented as an hash table consisting of property names and values ​​to Level Site Collection etc ... On the other hand we can store in the web.config parameters, but these parameters are not the same level that we want (see levels) which in itself is a disadvantage.

LEVELS

Property Bags can be defined in the following levels:

Farm (SPFarm class)
Web application (SPWebApplication class)
Site collection (SPSite class)
Site (SPWeb class)
List (SPList class)

EXAMPLE

Analyzing a real example, imagine that we have our application divided by areas, each area is bound and a Site Collection, from the start would be good to know in which area we are, good? .. On the other hand we can persist a Customer ID of a LOB Application at the Site level, so we just have to set it and invoke it without having to always make requests to the database. Consider the diagram below

image

In this case we can persist the information from the area where and know when the ribbon is visible or not. In the 3rd example we can persist the Customer ID and Company simply by using small methods or properties to get information as we see below.

CODE

SET

SPSite siteCollection = new SPSite("http://site");
SPWeb site = siteCollection.RootWeb;
site.Properties.Add("SiteKey", "SiteValue");
site.Properties.Update();

READ

SPWeb.AllProperties["SiteKey"].ToString()

REMOVE

SPWeb.AllProperties.Remove("SiteKey");
SPWeb.Properties["SiteKey"] = null;
SPWeb.Update();
SPWeb.Properties.Update();

CONCLUSION


This is a perfect solution when you have to store settings for a specific site while SPWeb is valid.


There are other ways to do what we can see in detail:

Six Ways to store settings in SharePoint


Joao Livio
SharePoint Consultant, Project Manager
www.primesoft.pt
Microsoft Most Valuable Professional Office Systems since2002

Cross-Posted from http://msmvps.com/blogs/officept/default.aspx
How to Get File Extension from Document in List and Render

SPListItemCollection coll = SPWeb.Lists["Documents"].GetItems(query);

foreach (SPListItem item in coll)
{ 
   
string ext = Path.GetExtension(item["FileLeafRef"].ToString());
   
switch (ext)
   
{
       
case ".pdf":
           
break;

       
case ".doc":
       
case ".docx":
           
break;

       
case ".xls":
       
case ".xlsx":
           
break;

       
case ".ppt":
       
case ".pptx":
           
break;

       
default:
           
break;

   
}
} 

Cross-Posted from http://msmvps.com/blogs/officept/default.aspx
SharePoint 2010 with OCR

Original Article in www.sharepointpt.org Portuguese Format written by me

In this article I will address a simple way to get images from SharePoint and process OCR  using the Tessnet2 OCR. NET 2.0 assembly OCR.


OCR is an English acronym for Optical Character Recognition, a technology to recognize characters from an image file, or bitmap. Through the OCR is able to scan a sheet of printed text and get an editable text file.


The Tessnet2 need a folder to Core Processing Libraries in this case I have English and Portuguese. We also have to add the 64-bit DLL to project, since I'm using SharePoint 2010

In the first part of this article will render a SharePoint Document List and I will put them on the hard drive in"c:\temp images"


The SharePoint Process


I call your attention because I’m processing the information immediately after the foreach but if we want to control whether the document is online or not we have to use the switch included in the procedure.

 

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using System.IO;

try
{
    string ImagePath = @"c:\temp\images\";
      
   
SPSite mysite = new SPSite(“SPSite”);
   
SPWeb myweb = mysite.OpenWeb();
   
SPFolder mylibrary = myweb.Folders[“SPList”];
   
SPFileCollection files = mylibrary.Files;
   
foreach (SPFile item in files)
   
{
       
byte[] binfile2 = item.OpenBinary();
       
FileStream fstream = new FileStream(ImagePath + item.Name,
                   
FileMode.Create,
                       
FileAccess.ReadWrite);
       
fstream.Write(binfile2, 0, binfile2.Length);
       
fstream.Close();  

       
switch (item.CheckOutType)
       
{
           
case SPFile.SPCheckOutType.None:                              
               
break;

           
case SPFile.SPCheckOutType.Offline:
               
break;
           
case SPFile.SPCheckOutType.Online:                            
               
break;

           
default:
               
break;
       
}
   
}
}
catch (Exception ex)
{
   
//Whatever;
}
 
 

I am using a method that returns a StringBuilder because it is much faster than an Array [] String and pass the path to the image.


The method takes word by word to a StringBuilder that I add a "space" after each word.


The method removes some garbage RemoveDiacriticals (diacritics) OCR

  

General method for OCR processing

  

private StringBuilder ProcessOcr(string imagePath)
{
   
StringBuilder sb = new StringBuilder();
   
using (Bitmap image = new Bitmap(imagePath))
   
{
       
using (tessnet2.Tesseract tessocr = new tessnet2.Tesseract())
       
{
           
tessocr.Init(@"c:\temp\tessdata", "por", false);

           
List<tessnet2.Word> result = tessocr.DoOCR(image, Rectangle.Empty);
           
foreach (tessnet2.Word word in result)
           
{
               
sb.Append(RemoveDiacriticals(word.Text) + " ");
           
}
           
return sb;
       
}
   
}
}

private string RemoveDiacriticals(string txt)
{
   
string nfd = txt.Normalize(NormalizationForm.FormD);
   
StringBuilder retval = new StringBuilder(nfd.Length);
   
foreach (char ch in nfd)
   
{
       
if (ch >= '\u0300' && ch <= '\u036f') continue;
       
if (ch >= '\u1dc0' && ch <= '\u1de6') continue;
       
if (ch >= '\ufe20' && ch <= '\ufe26') continue;
       
if (ch >= '\u20d0' && ch <= '\u20f0') continue;
       
retval.Append(ch);
   
}
   
return retval.ToString();
}

Now go to the directory where I put the pictures taken from SharePoint, in this example I'm just processing. Jpg and remove the OCR text
 
Use GC.Collect() in order to release memory
 
private string VamosNessa()
{
   
DirectoryInfo di = new DirectoryInfo(ImagePath);
   
FileInfo[] rgFiles = di.GetFiles("*.jpg");
    foreach (FileInfo fi in rgFiles)
   
{
              GC.Collect();
       
return ProcessOcr(fi.FullName).ToString();
       
       
   
}
}   

If you want to upload the OCR to a field in a list we need to know the document link in SharePoint, we can keep him in one of the previous methods, then I will checkout (), Update and CheckIn (), be sure to check your SPCheckOutType, because we do not want to touch anything that is not approved or not is up to you.

We will use two fields, a Bool that tells me if the OCR is processed and a MultiText to put the OCR. 

item.File.CheckOut();
item["OCR"] = VamosNessa();
item["BOOL"] = "1";
item.Update();
item.File.CheckIn("Ok");
 

Example Link Clik

CONCLUSION

This method works best with LETTER image Formats, also suggest creating a service that processes this information, as this process is synchronous

João Tito Lívio
SharePoint Consultant
www.primesoft.pt

Microsoft Most Valuable Professional Office Systems desde 2002
Cross-Posted from http://msmvps.com/blogs/officept/default.aspx
Exchange Web Services API Autodiscover Troubleshooting free Utility

Autodiscover Troubleshooting free Utility will try resolve your Exchange Web Service and advise what is the best for you but can inform also for connection issues.

DOWNLOAD

image

Cross-Posted from http://msmvps.com/blogs/officept/default.aspx
Creating a Enterprise Fast Search Service Application VIDEO
Joao Livio
Cross-Posted from http://msmvps.com/blogs/officept/default.aspx
Configure Metadata (Taxonomy) Service Application SharePoint 2010–INTRO

LEVEL 100

Taxonomy is the practice and science of classification.In addition, the word is also used as a count noun: a taxonomy, or taxonomic scheme, is a particular classification.

First think go to Central Administration and Application Management, then Manage Service Applications

image

Let’s Create a Managed Metadata Service for our Taxonomy

image

Fill the required information for the Service Application

image

SEE:

Managed metadata service application overview (SharePoint Server 2010)

Create, update, publish, or delete a managed metadata service application (SharePoint Server 2010)

Now Let’s click our Service Application, in this case TAXONOMY TEST

image

You will get all configurations to go and you can now create a TREE LABEL System in order to use in your application

image

Cross-Posted from http://msmvps.com/blogs/officept/default.aspx
Create a Metadata (Taxonomy) Service Application SharePoint 2010 – INTRO

LEVEL 100

Taxonomy is the practice and science of classification.In addition, the word is also used as a count noun: a taxonomy, or taxonomic scheme, is a particular classification.

First think go to Central Administration and Application Management, then Manage Service Applications

image

Let’s Create a Managed Metadata Service for our Taxonomy

image

Fill the required information for the Service Application

image

SEE:

Managed metadata service application overview (SharePoint Server 2010)

Create, update, publish, or delete a managed metadata service application (SharePoint Server 2010)

Now Let’s click our Service Application, in this case TAXONOMY TEST

image

You will get all configurations to go and you can now create a TREE LABEL System in order to use in your application

image

Cross-Posted from http://msmvps.com/blogs/officept/default.aspx
Installing and Configuring SharePoint 2010 (Farm) + Language Pack + SP1

Task List

  • SharePoint 2010
  • Language Pack pt-PT
  • SharePoint 2010 SP1
  • Language Pack pt-PT SP1
  • Configure FARM

INSTALLING

First of all you have to configure your Windows 2008 R2 System as you want e.g implement NLB etc…

1 – Run SharePoint Installer and install Prerequisites

clip_image001

If you don’t see the bellow Prerequisite (SQL 2008 R2 Services SharePoint Add-in) you will have to run the Prerequisite Installer 2 Times, I don’t know why this happen in some Farms

Full List

Application Server Role, Web Server (IIS) Role
Microsoft SQL Server 2008 Native Client
Hotfix for Microsoft Windows (KB976462)
Windows Identity Foundation (KB974405)
Microsoft Sync Framework Runtime v1.0 (x64)
Microsoft Chart Controls for Microsoft .NET Framework 3.5
Microsoft Filter Pack 2.0
Microsoft SQL Server 2008 Analysis Services ADOMD.NET
Microsoft Server Speech Platform Runtime (x64)
Microsoft Server Speech Recognition Language - TELE(en-US)
SQL 2008 R2 Reporting Services SharePoint 2010 Add-in

Installing SharePoint Server

1 – Provide you CAL and Choose Locations for setup files
2 – Installation Process Dialog

clip_image002

3 – Don’t run “SharePoint 2010 Products Configuration Wizard”, unmark that option and close

4 – Install your Language Pack, in my case Portuguese; once again don’t run the Wizard

clip_image004

5 – Install SharePoint 2010 SP1

clip_image006

6 – Install your Language Pack SP1

clip_image008

7 – Run the “SharePoint 2010 Products Configuration Wizard”

clip_image010

8 – Provide your information bellow

You can’t use LOCAL Windows Account’s bellow; you must provide an AD Account with permissions over SharePoint and SQL Server. In order to use local account’s see this workaround, GO

clip_image012

9 – Chose you farm passkey

It’s very important that you keep it because if not you will not be able to add servers to the FARM

clip_image002

10 – Finally choose PORT for the Central Administration Application and authentication provider, if you have a small farm leave NTLM

NTLM

NT LAN Manager (NTLM) is the default protocol type when Integrated Windows authentication is selected. This protocol takes advantage of a three-part challenge-response sequence to authenticate clients. For more information about NTLM, see Microsoft NTLM (http://go.microsoft.com/fwlink/?LinkId=196643).

Kerberos protocol

The Kerberos protocol is a more secure protocol that supports ticketing authentication. A Kerberos authentication server grants a ticket in response to a client computer authentication request, if the request contains valid user credentials and a valid Service Principal Name (SPN). The client computer then uses the ticket to access network resources. To enable Kerberos authentication, the client and server computers must have a trusted connection to the domain Key Distribution Center (KDC). The KDC distributes shared secret keys to enable encryption. The client and server computers must also be able to access Active Directory directory services. For Active Directory, the forest root domain is the center of Kerberos authentication referrals. For more information about the Kerberos protocol, see How the Kerberos Version 5 Authentication Protocol Works (http://go.microsoft.com/fwlink/?LinkId=196644) and Microsoft Kerberos. (http://go.microsoft.com/fwlink/?LinkId=196645)

clip_image004[1]

Cross-Posted from http://msmvps.com/blogs/officept/default.aspx
Certificações MOS Beta (OneNote 2010) Gratuitas
TENHO 5 VOUCHERS PARA OFERECER

CITEM O MEU NOME E DE QUE LINK VIERAM
 
A CICLO - Formação e Consultoria é um Centro de Testes Autorizado CERTIPORT e está a participar no programa BETA do Exame de Certificação Microsoft 77-853: OneNote 2010.
Durante a duração deste programa (12/09 a 04/10/2011), oferecemos a oportunidade de realizar este exame gratuitamente em nossas instalações, e ao passar neste exame irá alcançar a certificaçãoMicrosoft Office Specialist (MOS): OneNote 2010.

Se estiver interessado em participar contacte-nos e agende o seu exame:
Envie um e-mail para
beta-onenote2010@ciclo.pt ou utilize o nosso formulário de contacto, com o seu Nome completo, Número do B.I., Data/Hora do exame (consulte os horários disponiveis), e Número de telefone.
Certiport

Exame de Certificação Microsoft 77-853: OneNote 2010 (BETA)

Participar neste exame beta é uma oportunidade de experienciar e dar a sua opinião sobre um exame de certificação Microsoft Office.
Mais informações sobre este exame OneNote 2010 BETA:

É um exame on-line;

Tem 50 questões (quer práticas através de um simulador da aplicação, quer teóricas de escolha múltipla);

Tempo máximo para concluir: 105 minutos (1 hora e 45 minutos);

Idioma de realização do exame: Inglês.


Para informações da matéria avaliada neste exame, consulte o guia de preparação para o exame 77-853: OneNote 2010 no site da Microsoft Learning: http://ciclo.me/77-853-onenote-2010-msl

OneNote 2010

 

.

Posted: 22-9-2011 10:43 por jlivio | with no comments
Filed under:
Mais Entradas Página seguinte »