SharePoint, XBOX, .NET, Technology - What I am reading

    [Home] [Recent] [Site Map] [SharePoint] [XBOX]

   

SharePoint Blogs

5/31/2007 UK SharePoint User Group: June 2007 meetings

Wow, Nick and Steve are really stepping things up! I"m seriously looking at how I might get along to all these meetings...

  1. Tuesday 12th June - Midlands User Group meeting being held in Telford, covering InfoPath, Forms Services and also developing Access 2007 solutions with WSS v3/MOSS 2007. A nice buffet has also been promised! To sign up post your name in the forum thread.
  2. Thursday 21st June - User Group EVO community day. Fancy spending a day at Microsoft in Reading learning about the new Exchange, Vista and Office products? The various user groups that cover these subjects are putting on a day at Thames Valley Park where all this stuff will be covered from a non-marketing viewpoint. The SharePoint content will be aimed at people just getting started with the product, so for SUGUK members you would get the most out of the sessions on Exchange, Vista, Office Communication Server, Powershell, Groove and everything else! There will also be breakout sessions that dig a little deeper into each technology. Click here for more information and to sign up.
  3. Thursday 28th June - Reading User Group meeting back at Thames Valley Park again. This time an attempt to rid the myths and misunderstandings around Groove 2007. Firstly, what is Groove is and how can it be used as a standalone application? Then, a look at how SharePoint 2007 and Groove 2007 can work together! Visit the SUGUK site for the full agenda and to sign up.
5/31/2007 SharePoint 2007: Upload a Document with Its Meta-Data

Recently, I had to build the following application: pdf documents were generated automatically from an external application and associated with a set of text files containing their meta-data. The main goal was to upload those documents into a SharePoint document list, with there meta-data extracted from the text file. Then a workflow is invoked for approbation with several parameters depending on meta-data.
In this article I"ll focus on importing files into the list with their meta-data.

The first thought that came to my mind was about uploading one document into the list, then adding meta-data one by one to their corresponding columns. But because I have to manage versions for this list, this solution seems not adequate: one update for the document and one update for the meta-data means two versions instead of one.
But I"ve found one overloading really interesting.

First, let"s consider the list like a folder. And inside this folder we have a collection of files. If I add a file to this collection, this is the same as uploading a file, no ?
The folder name is the internal name of the list. The internal name is the name you first set for the list. For instance, if you have created a Purchase Order list with the name PurchaseOrder, then you have modified the name to Purchase Order, the folder name will be PurchaseOrder. You can check it with the url, i.e. http://dcmoss:50010/testgy/PurchaseOrder/ where PurchaseOrder is the name of the folder.

SPFolder folder = _web.GetFolder("internal list name");
SPFileCollection files = folder.Files;

Then I get the file itself, storing it in a memory stream

FileStream fStream = File.OpenRead("fileName");

And, at last, I create the URL of the file, with the file name

string url = "url web site" + "internal list name" + "/" + Path.GetFileName("fileName");

Meta-data have to be stored into a Hashtable

HashTable MetaDataTable = new HashTable();
MetaDataTable.Add("column name", "value");

In fact, I have a class which parse the text file and send me back a Hashtable. Then I add everything to the file collection

SPFile currentFile = files.Add(url, fStream, MetaDataTable, true);

The boolean value allow you to replace a file if it is already existing
In one line, we add the file with its meta-data ! Not bad.

Here is an example of code for adding a document with its meta-data

//Using required, especially System.IO;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using Microsoft.SharePoint;
using System.IO;

namespace DocImport
{
public class DocManagement {
//Some variables
private string _DestUrlPath = string.Empty;
private string _DestFolder = string.Empty;

private SPSite _site = null;
private SPWeb _web = null;

public DocManagment(string DestUrl, string DestFolder) {
_DestUrlPath = DestUrl;
_DestFolder = DestFolder;
_site = new SPSite(_DestUrlPath);
_web = _site.OpenWeb();
}


private bool _uploadDocument(string pdfFile, string txtFile) {
try {
//This is mandatory for avoiding an error
_web.AllowUnsafeUpdates = true;
//Use the list as a folder
SPFolder folder = _web.GetFolder(_DestFolder);
SPFileCollection files = folder.Files;
//Get the file
FileStream fStream = File.OpenRead(pdfFile);
HashTable MetaDataTable = new HashTable();
MetaDataTable.Add("nom de colonne", "valeur");

//Set the destination url for SharePoint
string url = _DestUrlPath + _DestFolder + "/" + Path.GetFileName(pdfFile);
//Add document to the list with metadata, and overwrite an existing document
with the same name
SPFile currentFile = files.Add(url, fStream, MetaDataTable, true);
fStream.Close();
return true;
} catch (Exception x) {
throw new Exception(x.Message);
}
}
}

5/31/2007 Managed Property names

Just discovered a little annoyance in naming managed properties for search scopes that was not immediately obvious as to its cause.

If you get the error 

"The settings could not be saved because of an internal error: name"

after you try to name a new managed property, you probably have named it using an underscore or space in the name. Remove all underscores and spaces and it will be happy. (there may well be other special characters it does not like either)

5/31/2007 New Stuff
It"s been quite awhile since I posted anything. I just started a new position, and I"m pretty sure I"m going to be heading up their SharePoint 2003 to 2007 migration. I"ve been doing a lot of research and reading as much as I can. For the most part, I"m using the "Office SharePoint Server 2007 Administrator"s Companion" By Bill English. Bill also wrote the "SharePoint Products and Technologies Resource Kit" Which I"ve refered to quite a lot in regards to the 2003 portal I set up at my previous job. Bill English. I"ve been quite confused in regards to creating the Service Accounts used to setup SharePoint 2007 (MOSS 2007), so I"ve decided to set up a few VM"s, install SQL 2005, a Domain Controller and a SharePoint 2007 portal server. I"ll document the process from beginning to end, and hopefully it will help someone else obtain a better understanding of the process. By all means, comment on the article, make suggestions, post your experiences, etc. I"d like it to be a living article that changes with our collective experiences. In addition, I"d like to create several scenerios. Single server install, Small, Medium and Large farm installs as well. With that said, I will begin setting up my initial environment. 
5/31/2007 Welcome to anchorPoint"s blog

Hi,

Welcome to my new blog. This blog will mainly be concerned around SharePoint-related stuff, quirks and findings :-)

So without further ado I bid you welcome.

Kind regards

anchorPoint

5/31/2007 Tab highlighting in Top Navigation Bar

In a solution I"m building I was met with the task of creating a web site programmaticly and no sweat I thought. The site creation itself was a breeze, but I wsa met a bit of a challange when trying to create navigation tabs.

The parent web site would have a tab on the top navigation bar pointing to the new web site, and the newly created web site would have a tab as well that was highlighted in the top navigation when the user was visiting the site.

No problem I thought again. So I happily went and created the tab to the new site on the parent web site and told the newly created website to just inherit navigation. But to my surprise the tab on the newly created site was not highlighted when I was visiting it. This kinda puzzled me.

I had told the top navigation bar of the parent web site to use this node:

SPNavigationNode navigationNode = new SPNavigationNode("My Web Site", "/MyWebSite");

But apparently that wasn"t enough to highlight the tab.

After some more efford I finally figured out that it had to be:

SPNavigationNode navigationNode = new SPNavigationNode("My Web Site", "/MyWebSite/default.aspx");

Yeah .. you have to remember default.aspx. Anyway the code to create a child web site with parent top navigation and tab highlighting would be:

using (SPSite site = new SPSite(siteUrl))

{

using (SPWeb web = site.AllWebs.Add("/MyWebSite", "My Web Site", "", 1033, "STS#1", false, false))

{

SPNavigationNode navigationNode = new SPNavigationNode("My Web Site", "/MyWebSite/default.aspx");

SPNavigation navigation = web.ParentWeb.Navigation;

SPNavigationNodeCollection topNavigationNodeCollection = navigation.TopNavigationBar;

topNavigationNodeCollection.AddAsLast(navigationNode);

web.Navigation.UseShared = true;

web.Update();

}

}

Happy SharePoint hacking.

5/31/2007 Microsoft Office Interactive Developer Map

Very cool map to explore the Microsoft office features and it is a WPF application ;)

you can download it from "Microsoft Office Interactive Developer Map"

 

The Microsoft Office Interactive Developer Map is a Windows Presentation Foundation (WPF) application that helps developers visualize the different programs, servers, services, and tools that will help them build solutions. It allows them to drill down to each product and technology and learn about new features, objects, Web services, namespaces, and schemas required to extend Microsoft Office and build custom Office Business Applications (OBAs).

Office Interactive Developer Map image

 

 

 

 

 

 

 

 

 

 

 

 

Note: I have used Windows live writer beta 2 for writing this post and it is very cool

5/31/2007 MOSS 2007 passes DoD 5015.2 certification !
Well, I"m extremely pleased to announce that we have indeed passed the test ! So, MOSS 2007 is now officially DoD 5015.2 certified! http://blogs.msdn.com/sharepoint/archive/2007/05/30/dod-5015-2-certification-for-moss-2007-we-ve-passed-the-test.aspx This is definitely a heads up for all parties !...(read more)
5/31/2007 Microsoft Office SharePoint 2007 Logo
Wow, it took me quite a few searches to find one... So I am posting it here Hope it saves someone some time......(read more)
5/31/2007 Starting Point for OpenDocuments ActiveX Control

Here is some reference material available for the OpenDocuments ActiveX control

   

Here is the OpenDocuments ActiveX Control documentation available on msdn, which was barely updated for wssv3, see my comments under Community Content. This documentation explains how to connect your OpenDocuments Control to SharePoint.

   

For wss v2, there was the SharePad Reference Application for SharePoint Products and Technologies which Mike Fitzmaurice [MSFT] talked about it here. It is on GotDotNet which is currently being phased out, so this link may break in the near future.

   

But for wss v3, this application was not been updated. Not sure why. One would think that Microsoft would want third parties to integrate these files w/ the SharePoint environment, especially moving forward with SharePoint 2007.

   

--Tom

   

上一页 1 2 3 4 5 6 7 8 9 10 下一页

   

Site List:
>>Xbox Live_s Major Nelson
>>Xbox 360 & SharePoint 2007 Weblog
>>Carsten Keutmann_s Blog
>>Mohamed Zaki_s Blog [Sharepoint MVP]
>>The Mit_s Blog
>>Mart Muller_s Sharepoint Weblog
>>Microsoft SharePoint Products and Technologies Team Blog
>>SharePoint Solutions Blog
>>4GuysFromRolla.com Headlines
>>ASP.NET Blogs
>>SharePoint Blogs
>>SharePoint Blogs
>>Joel on Software
>>ADO Guy_s Rants and Raves
>>Microsoft Live Labs
>>GadgetNews
>>Windows Vista Team Blog
>>VoIP & Gadgets Blog
>>schrankmonster blog
>>Via Virtual Earth Blog
>>Feed
>>MSDN Blogs
>>Mashable!

Links:
Jack's Readings

Month Archives:
Oct 2007
Sep 2007

Top Tags:
social software social networking .NET mashable Sharepoint ASP.NET Web 2.0 Web2.0 Startups Community News Search Marketplace General Software Development AJAX Windows Vista Visual Studio Microsoft myspace Silverlight People Powered! YouTube Vista MOSS Featured News C# Events MOSS 2007 Google WPF Office 2007 Web Community Security General Personal Xbox 360 facebook Tools development SharePoint 2007 Fun Atlas Architecture ASP.NET AJAX myspace codes TheLongTail IIS SQL Server Developers Revenue Sharing Video Pictures WCF Mobile 2.0 Announcements Orcas MIX07 Arcade Team System JavaScript News



@2007 All rights Reserved