Just add this to the End of your procedure
CODE
Literal ltrl = new Literal
{
Text =
"<script language='javascript'>window.location.href='/';</script>"
};
Controls.Add(ltrl);
private static SPWebTemplate GetTemplate(SPWeb web, string templateTitle)
{
SPWebTemplateCollection webTemplates = web.GetAvailableWebTemplates(1033, true);
SPWebTemplate webTemplate = (from SPWebTemplate t
in webTemplates
where t.Title == templateTitle
select t).FirstOrDefault();
return webTemplate;
}
First go to FILE – Add Account – See Image

The choose Manual Setup – Next – Exchange ActiveSync


OPTIONS
Your Hotmail Address
Mail Server: m.hotmail.com

FOR PREVIEW VERSION REPEAT PROCEDURE 2 TIMES.
AFTER ERROR HIT NEXT AGAIN
One of the limitations of side by side installations of Office in the same Machine was that Outlook only could be installed once for the version you choose.
Now Office 2010 and Office 2013 can be installed with full features, Outlook 2013 will assume you definitions from 2010 COOL!

Of course you can’t start both at same time.
string domain =
HttpContext.Current.Request.Url.Scheme + Uri.SchemeDelimiter +
HttpContext.Current.Request.Url.Host +
(HttpContext.Current.Request.Url.IsDefaultPort
? ""
: ":" + HttpContext.Current.Request.Url.Port);
private static string GetMyFbaUserProperty
{
get
{
string fbaUser = HttpContext.Current.User.Identity.Name;
int lastIndex = fbaUser.LastIndexOf("|");
return fbaUser = fbaUser.Substring(lastIndex + 1,
(fbaUser.Length - lastIndex - 1));
}
}
The Microsoft Online Services Diagnostics and Logging (MOSDAL) Support Toolkit performs network diagnostics and collects system configuration, network configuration, and logging information for applications that are used to connect to Microsoft Business Productivity Online Standard Suite (BPOS-S) or to Microsoft Office 365. The logs and diagnostic information that the tool generates provide data that helps technical support professionals troubleshoot configuration, network, installation, and other service-related issues. The MOSDAL Support Toolkit collects log files, registry keys, and configuration settings that would otherwise require time-consuming and labor-intensive collection by using separate tools.
CLICK, DON´T MISS

ARTICLES
English
SharePoint
SharePoint n-tier architecture Projects (Only My Point of View)
Introduction to Property Bags in SharePoint
SharePoint 2010 with OCR
Installing and Configuring SharePoint 2010 (Farm) + Language Pack + SP1
Create a Metadata (Taxonomy) Service Application SharePoint 2010 – INTRO
Convert a MOSS WspBuilder Project to SharePoint 2010 (Part I)
Exchange Server Managed API and Office 365
What is the Service Binding in the Exchange Web Services Managed API
Office 365 Install & Deploy
Exchange Server Binding
Code Project
Excel VSTO SQL Server Browser
Portuguese
SharePoint
Converter um projecto publishing WspBuilder para SharePoint 2010
Criar um Sistema RSS Através de uma Lista de Páginas
SharePoint 2010 com OCR (Optical Character Recognition)
Introdução aos Property Bags no Sharepoint
My Gallery Projects for Download (TechNet)
VSTO Access 2010 Template target to VB.NET
This file have a project configured in order to use a Access Template that allow choose a Access Add-in like other templates included by default in Visual Studio 2010. In this case you will be able to build a Application Level Add-in for Microsoft AccessBe aware that maybe Micro
Grab data from SQL Server into Excel using VSTO
Sometimes it is necessary use Excel automation in order to grab some information from a specific data source and put it in Excel directly. The objective is to get more control about what you need to do to pull and create automatic processes to the end-user.This project is a Docum
Microsoft Access Interop API Extensions to VBA (Samples)
This is a Visual Studio Project that allow use of a Interop API Extensions tool found in the .NET Framework 2.0. Wraps the Access object model providing a more productive environment for the VBA developer. Specifically, it employs extension methods, functions, properties and a mo
Windows Forms Simple Application that Convert RPT Files to CSV
This is a Windows Forms Simple Application that Convert RPT Files to CSV. I'm Using Visual Studio 2010 and Framework 3.5. You can choose your RPT File, and a Output Directory. Based in the Max Lines per File, a new file will be created in the Directory
choosed.I made this utili
My TechNet Wiki Articles (TechNet)
What is the EWS Managed API and Exchange Server Binding?
Overview / Survival Guide What is the Microsoft Exchange Server Managed API? The EWS Managed API provides a managed interface for developing client applications...
on Fri, Jun 29 2012 2:18 PM SharePoint 2010: Installing and Configuring your Farm with Language Pack and SP1
(Level 100) Task List SharePoint 2010 Language Pack pt-PT SharePoint 2010 SP1 Language Pack pt-PT SP1 Configure FARM INSTALLING First...
on Fri, Jun 29 2012 12:40 PM Simple Way to Get Images from SharePoint and Process OCR
Table of Contents Overview / Survival Guide Media Type/Task References Overview / Survival Guide In this article I will address a simple way to get images from...
on Tue, Jun 5 2012 5:36 AM SharePoint List Redirect to Login Page When Clicking Some Document Types
Table of Contents Troubleshooting Actions Required Resolve the "How-To" Troubleshooting In a FBA (Forms Based Authentication) scenario, for some document...
on Tue, Jun 5 2012 5:33 AM SharePoint N-Tier, N-Layer Architecture Projects, a Point of View
Table of Contents Overview / Survival Guide Media Type/Task CONCLUSION Overview / Survival Guide N-tier application architecture provides a model for developers...
Good news, the Exchange Web Services Managed API 1.2.1 was released and it’s available for download
The EWS Managed API 1.2 introduces the following important changes that might affect your client applications:
Microsoft Exchange Server 2010 Service Pack 2 (SP2) is now the targeted version.
- The following new functionality is exposed:
- Getting password expiration date
- Updates to the contact type
- Store entry identifiers returned on items
- Asynchronous notifications
- DateTime object precision values
Documentation
http://msdn.microsoft.com/en-us/library/dd633709(v=exchg.80).aspx
Download
http://www.microsoft.com/en-us/download/details.aspx?id=28952
Migração: Soluções WCM 2007 para SharePoint 2010
(WSPBuilder,Web Applications, Content Databases)
(12 May) At: www.sharepointpt.org (Microsoft Portugal)
Link LiveMeeting:
a anunciar

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;

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
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)

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
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; }
}
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

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
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

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
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;
}
}
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 |
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

More Posts
Next page »