Welcome to MSDN Blogs Sign in | Join | Help

Vi har meddelat att SharePoint Designer från och med nu övergår till att bli en produkt som får laddas ner och användas utan kostnad, den är alltså GRATIS från och med idag! Du kan ladda ner den via produktsidan för Microsoft Office SharePoint Designer.

SharePoint Designer används för att på ett enkelt sätt anpassa av SharePoint utan att behöva skriva kod, exempelvis kan man modifera rapporter, arbetsflöden och olika vyer. Målgruppen för SharePoint Designer är IT-proffs som vill kunna göra ändringar i sin miljö utan att behöva skriva kod i Visual Studio och skapa features och WSP-paket.

Detta är såklart bra för många att SharePoint Designer blir mer tillgängligt och det kommer göra det lättare för icke-utvecklare att modifera sina SharePoint siter så att de passar dem bättre. Men det är även värt att påpeka att ändringar av en site layout som görs direkt i SharePoint Designer inte är en kontrollerad IT-process, det jag menar är att du inte kommer kunna dra nytta av ändringarna på andra siter eller i andra miljöer utan att manuellt göra om dem.

Ett sätt att använda SharePoint Designer i ett större projekt är att prototypa och skapa en basdesign med hjälp av SharePoint Designer. Men när man ska göra leverans till andra delar av projektet (systemtest, acceptanstest, produktion) så skapar man mer strukturerade packeteringar.

På Microsoft har vi ett antal resurser på extranet-siter men väldigt mycket är fortfarande enbart tillgängligt när man är uppkopplad på kontoret eller via VPN. Själv har jag bara synkat några listor i Outlook och vet att en del kollegor har jobbar med Groove, men jag funderade på vad för- och nackdelar är med olika lösningar? Därför satt jag och letade efter information om hur man bäst kan arbeta med SharePoint i ett offline-läge.

Jag hittade en artikel kallade Taking SharePoint Files Offline – What are the options? som sammanfattade för- och nackdelar med olika lösningar på ett bra sätt. Groove verkar stödja många scenarios (vilket kanske inte är så förvåndande eftersom det är en produkt var främst syfte är just att synkronisera information) men Outlook har i princip samma stöd.

Att man inte kan skriva bloggar från Groove känns knappast som en begränsning (det finns ju Windows Live Writer :-) och på samma vis är RSS läsning knappast någor som Groove bör fokusera på. Däremot är jag lite förvånad att uppgifter (tasks) inte verkar synkroniseras i Groove.

I framtiden kommer behovet av offline-funktionalitet minska genom att vi får full tillgång till funktionen Direct Access i Windows 7. Direct Access är beroende av ny funktionalitet i Windows Server 2008 R2 och eftersom vi inte har rullat ut den i alla länder ännu så har jag möjlighet att köra det. Men Windows 7 Beta har jag kört i två månader…

Sitter på TechDays och lyssnar på keynote med Daniel Akenine när han pratar kort om vad som händer när multi-core anläder på bred front, och Johan Lindfors gjorde även en kort demo av Parallel Extension for .NET (numera del av .NET 4.0). Eftersom jag för några dagar sedan skrev ett inlägg (delvis inspirerat av Daniel) om just multi-core utan att skicka upp det så är det väl dags att göra det nu!

---

Jag kollade på Daniel Akenines blog och när jag såg hans inlägg om vad som blir viktigt när antalet processorkärnor ökar kom jag att tänka på en Channel 9 intervju med Pat Helland som jag tittade på för ett tag sedan. Pat jobbar idag i SQL Server teamet men var på 90-talet en av huvudpersonerna bakom Microsoft Transaction Server (MTS) för er som minns den (föregångaren till COM+).

I ARCast.TV - Pat Helland on the Drive to Many-Core Processors beskriver Pat varför vi kommer se en utveckling mot fler kärnor i våra processorer. Det går inte att bara öka GHz hela tiden utan begränsningar finns bl.a. i den värmeutveckling som snabbare processorer (mätt i GHz) utstrålar samt i hur snabbt minne kan accessas. Lösningen är då att lägga ihop flera lite långsammare kärnor i en processor och därmed få ut mer prestanda. Idag är två kärnor standard och nyare datorer börjar komma med fyra kärnor. Pats slutsats är att det om några år inte kommer vara konstigt om en processor har 256 kärnor och kopplat till det kan man konstatera att Windows Server 2008 R2 kommer stödja upp till 256 kärnor.

Frågan jag ställer mig är hur mycket av detta som kommer påverka utvecklarna. Optimalt vore såklart om kompilatorerna eller run-time miljön gjorde automatiska omstruktureringar och optimeringar av den kod utvecklaren skriver.

Om det inte sköts automatiskt måste utvecklarna själva vara medvetna om både HUR man skriver parallell kod och NÄR man ska använda parallella funktioner. Jag tror att detta inte är något som den typiska utvecklaren kommer ha kompetens att utföra.

Troligen blir utvecklingen liknande det som har skett med programmering mot trådar. Genom Win32 API finns idag möjligheter att fullt utnyttja Windows trådmodell men det utnyttjas av ytterst få utvecklare. Då är det nog vanligare att man i t.ex. ett användargränssnitt använder .NET för att starta en aktivitet i bakgrunden, men egentligen så behöver man inte veta något om trådar utan trådhanteringen sker helt dolt under ytan.

Under 2000-talet har jag själv mestadels jobbat med BizTalk och SharePoint och då har trådproblematiken i den kod som utvecklaren själv skriver inte varit någon stor fråga (om man bortser från användning av global statiska data). Däremot har det vid flera tillfällen varit diskussioner kring hur många och när trådar allokeras i COM+, BizTalk och SharePoint. För det är nämligen viktigt att att ta hänsyn till trådhanteringen hos underliggande system för att få en korrekt lösning, men det betyder inte att du själv måste hantera trådarna när du programmerar.

I vår TechDays sessions (SharePoint Workflows - experiences from the field) kommer vi att komma in på hur man bör ta hänsyn till egenskaper hos SharePoint tråd-pool för workflows när man designar sin lösning, men man behöver inte komma i direkt kontakt med trådprogrammering när man kodar lösningen mot SharePoint.

Så sammanfattningsvis är min förhoppning att man i framtiden inte kommer behöva bry sig så mycket om det finns 1 eller 256 kärnor utan det kan skötas av de underliggande systemet, precis som hanteringen av trådar fungerar idag.

/Mattias

Under våra TechDays förberedelser har Daniel och jag använt oss av en publik VPC image från MSDN. Den innehåller Windows SharePoint Services 3.0 SP1 och Visual Studio 2008, det enda vi har lagt på för att skapa våra demos är VSeWSS 1.3 CTP.

Här är länken till den VPC image vi använde: Windows SharePoint Services 3.0 SP1 Developer Evaluation VPC Image. Det är 1,8 GB att ladda ner och expanderad blir den ca 5,5 GB.

Vore det bättre om den  var en installation av Microsoft Office SharePoint Server 2007 Enterprise Edition? Kanske eller kanske inte! En av de bästa sakerna med denna image är just att den är liten och snabb, och om du drar in hela MOSS så kommer fler tjänster vara startade och mer minne krävas. Jag är nöjd med den som den är!

En brist i denna image är att den är installerad som en workgroup och inte som en egen domän. Det gör att man får problem med vissa saker, tex. att använda DirectorySearcher och mail-attribut i AD.

Använder du ljudinspelningsfunktionen i din Windows-telefon? Har du svårt att hitta bland dina inspelningar? Då är (kanske) svaret Microsoft Recite!

Microsoft Recite är en add-on applikation till Windows Mobile 6 som låter dig spela in meddelanden och sedan söka på dem med hjälp av röstigenkänning.

Efter att ha testat detta lite måste jag säga att sökningen funkar väldigt bra!

Steg 1 – Spela in Steg 2 – Spela upp dina inspelningar Steg 3 – Sök efter inspelning
Klicka på Remember så börjar inspelningen. Skärmen animerar så vackert under inspelningen :-)


clip_image004
En lista med alla inspelningar visas, med datum och längd.




clip_image008
Klicka på Search, säg en eller ett par nyckelord och klicka på Finish.

Microsoft Recite söker efter ljud i dina inspelningarna som liknar nyckelorden och visar en resultatlista.

clip_image006clip_image008 

På deras blog finns två demos: Demo (2 min) och Demo (6 min). Den korta visar är en snabb översikt medan den längre är lite mer komplett, men de visar samma funktioner!

Jag har tidigare varit en ganska flitig användare av inspelningsfunktionen på min telefon men eftersom allt bara heter Inspelning1, Inspelning2, …, Inspelning 123 (och Inspelning123 visas mellan Inspelning1 och Inspelning2 i listan :-) så slutade jag använda det. Med Microsoft Recite får man i alla fall datum, tid och längd

Den största bristen jag hittills har hittat är att jag inte kan använda touch-gränssnittet när listan över alla inspelningar visas, dvs. jag kan inte byta vald inspelning, klicka på Play eller Delete på skärmen utan måste använda knapparna på telefonen för detta. Förhoppningsvis är detta något som de skulle kunna fixa, för det är väldigt irriterande när man ALDRIG annars använder knapparna utan bara klickar på skärmen.

Jag tycker att Du ska testa detta, om inte annat så är det lite cool teknologi.

/Mattias

På TechDays kommer jag och Daniel Karlsson från Connecta att köra en session som heter SharePoint Workflows – experiences from the field.  Som rubriken antyder så handlar det om att bygga arbetsflöden i SharePoint och vi pratar om hur vi tror att man ska utnyttja de funktioner som finns i SharePoint och Visual Studio.

Vår session hålls onsdagen den 18 mars kl 10.45, välkommen!

image 

/Mattias

I admit it, I'm not at the front of the technology curve. Why? I just recently learned about Live Mesh and I got really impressed (have I been hiding under a rock?, no I've been on paternal leave for six months :-). When SkyDrive (part of the Live offering) was launched I tried it with a few files but didn't really see what I would use it for. It was storage on the web without a simple interface; to edit a file I needed to download it, edit it and upload it.

The experience with Live Mesh is completely different from SkyDrive, at least when you install the software client on your device. Live Mesh folders appear on my Desktop as normal folders and files in them can be edited just like any other file on my disk. And when a change is made to a file that change is synchronized across all connected devices as well as being available through the web client. In the future I will even be able to synchronize files with my smartphone running Windows Mobile, cool!

Tonight my wife and I spent an hour trying to figure out how we should use Live Mesh to collaborate. We installed the client on her laptop and I gave her access to one of my mesh folders and then we tried creating and updating a few files to see how the changes were synchronized. Our test document was a shopping list, as good as any test...

In the near future I see us using Live Mesh when we create an application for a building permit, we want to extend our house some. As the application for this building permit is completely web based (e-government you know) we need to collect drawings and other documents before submitting the application, and what better place than Live Mesh to do this? We will both have access to the same files and we can both contribute to the application.

If I like Live Mesh so much why have I mentioned Groove in the title? Groove is also a network-based disk drive used to share folders and files, which it has in common with Live Mesh. However, Groove differs from Live Mesh in that its purpose being much more focused on collaboration between a number of people within the same company. To me the two biggest advantages of using Groove over Live Mesh are: automatic synchronization of updates in Office documents if several people have updated the same document and ability to synchronize the content of SharePoint document libraries.

I see Live Mesh an an important part of Microsoft’s vision for cloud computing; data stored on a local device is (almost) simultaneous accessible on other device and in the cloud. To me this represents a case where the vision of "software plus services" shows its strength. The service are the folders and files in the mesh and the software is the application on the device. The service can be accessed through a web interface but the software part enhances the experience beyond the simple collaboration scenarios of SkyDrive and enables much better and cooler scenarios. So the software is not a requirement for accessing the service, but it provides a richer experience.

Currently Live Mesh is only supported in a selected number of countries and it has the status of being a Tech Preview.

Microsoft Research has released a tool that analyze all the pictures in a folder, picks the "most interesting" ones and makes a blended collage. You can download a trial version at http://research.microsoft.com/AutoCollage/ that runs for 30 days, then you have to buy a license from the online store.

I have tried this tool for an hour and I think AutoCollage does a great job of creating a collage which can be used to share highlights from an event; wedding, vacation, weekend in Stockholm, etc. I don't primarily see these collages as something you print and put in an album (but perhaps it could be used as a cover page to an album), more probably it will be useful for digitally sharing your experience with friends and family. But perhaps printing them big and use as banners is one possible usage.

AutoCollage is a first release and may not have every feature you wish for but it does a good enough job for me.

Below is an example of a collage created using some images from my hobby (bird photography), an MS event and some private pictures. Note that AutoCollage takes into consideration the shapes of flower and makes an irregular crop. It also blends the lighter parts of the boys head and the wedding ring.

image

The roadmap for BizTalk Server has been updated with details about BizTalk Server 2009 (previously known as BizTalk Server 2006 R3). Some highlight are:

  • Support for the latest and greatest development platform; Windows Server 2008, Visual Studio 2008 SP1, SQL Server 2008 and the .NET Framework 3.5 SP1. It also adds support form virtualization through Hyper-V.
  • Extends the developer experience by adding support for Team Foundation Server (TFS).
  • Enhanced support for SOA and Web Services; UDDI 3.0 registry, ESB Guidance 2.0, WCF support for WebSphere MQ
  • New LOB adapters for Oracle E-Business Suites and SQL Server and updates for existing adapters.
  • EDI and AS2 support will be enhanced along with updates to the SWIF. RFID support will also be extended.

Even though future versions of BizTalk (after the 2009 version) will add support for Windows Workflow Foundation (WF) it is clearly stated that Microsoft is "committed to continued support for BizTalk Server’s XLANG orchestration technology".

Follow this link to go directly to news about the future releases: http://www.microsoft.com/biztalk/en/us/roadmap.aspx#WhereWereGoing

I'm using the SharePoint PeopleEditor to select a user and when the user is selected I want to populate a few fields with information about that user, I retrieve the data from AD. The problem I had was how do I make the PeopleEditor send a signal to my code that a value has been set?! There is no event on the PeopleEditor control which is fired when a value is set.

I first asked myself this question about a month ago, but as I have been unable to find an answer I added a button to my form which says "Retrieve Userinformation". This is not the normal way of UI design and during a demo for the customer today they made a remark about it, so I decided to take another look at this problem.

It took me almost an hour to realize that there is a property called AutoPostBack on some server controls. When you set this property a Postback will be generated when a value is set in the control. As you may understand from my lack of knowledge in this area ASP.NET UI design is not my primary competence, but in most cases I know enough to get the job done.

<SharePoint:PeopleEditor AutoPostBack="true" ID="peUser" runat="server" />

In the case of the PeopleEditor this means that when you type a username and click Check names (or hit enter) or use the Addressbook to select a user you will receive a generic postback, no specific event i raised by the page is reloaded. Therefore you can have code in your Page_Load which checks if a value has been selected and take some action.

string accountName = null;
if (peUser.ResolvedEntities.Count > 0)
{
    PickerEntity entity = (PickerEntity)peUser.ResolvedEntities[0];

    accountName = entity.Key;
    int pos = accountName.IndexOf('\\');
    accountName = accountName.Substring(pos + 1);

    // take some action based on accountName

}

In essence the AutoPostBack acts as an event generator which lets you perform an action when the value of the control is set. A discussion about AutoPostBack can be found at http://www.dotnetspider.com/kb/Article195.aspx, this is not PeopleEditor specific.

In my previous post I made a walkthrough of mail enabling your development environment. What I did not include in this was how you should configure SharePoint, but I'll address that in this post!

What you need to do in SharePoint is to set the SMTP server, fróm address and reply-to address. You do this by opening SharePoint 3.0 Central Administration, click on Application Management and then select Web application outgoing e-mail settings. The page below will be displayed.

Enter the name of the SMTP host so SharePoint knows where to send the mail it generates. You can also specify the From address which will be used for all SharePoint mails.

Optionally you may also specify a Reply-to address if you which replies to go to a different address than the From address.

image

As specified on the page these settings will be used for alerts and similar things. For those built-in functions I think it is just fine to use a single global address for all mail. However, when you build an application in SharePoint you may want to personalize out-going mails a bit more than simply using a generic used-by-all-other-functions mail address.

In my next post I will look at ways to send mail from an application built within SharePoint.

I use a separate VPC image for each customer I work with as it makes sense to isolate customer from each other, otherwise you may end up with doing a demo for one customer and suddently the branding for the other customer suddently appear on the Settings page (it has happened :-).

Every time when I get to the point where I’m supposed to start sending mail to notify users of events, e.g. a task has been assigned as part of a workflow, I always ask myself "how do I do this?". As I always have to try to remember how to do this I thought that I would document it here, and perhaps also help some people who needs to do the same thing.

I don't use Exchange for handling mails in my development environment, the reasons for this are (a) it's an overkill when all I want to do is to send/receive mail locally and (b) I've never tried to install it so I don't know how to do it. Instead I use the built-in SMTP/POP3 services, which are just fine for my purposes! In this walkthrough I assume that you have a MSDN Subscription which has Office included as I used Outlook in this example, but I guess Outlook Express can be cofigured similarily.

Install SMTP/POP3 services

To install the SMTP and POP3 services you need access to the DVD/image for your server OS, as you will be prompted to provide installation files for these services. Start the Start > Administrative Tools > Configure Your Server Wizard and choose to add a new role. Select the POP3/SMTP option and complete the wizard.

I have had problems installing the new role, I solved this by installed the SMTP service separately using Add/Remove Windows Components from the Control Panel > Add or Remove Programs, select Application Server > Internet Information Services (IIS) > SMTP Service. When the services were successfully installed there were no problems adding the role.

Add mail accounts

To use the mail you need at least one mail account. Open the POP3 Service admin UI using Administrative Tools > POP3 Service. Here you can easily add a new mailbox for an existing users or create both a new mailbox and a new user at the same time.

image

When you click Add Mailbox you get prompted to enter the new mailbox name, you can also optionally create a new user in your directory which saves you a bit of time. If you are creating a mailbox for an already existing user (e.g. administrator) you simply uncheck the option.

image

Connect Outlook to the POP3 Service

To enable Outlook to read one or more mailboxes you start Outlook and then click Tools > Account Settings. My account settings currently looks like the picture below, I have five mailboxes in my Outlook. This is great during development as you can have mails sent to people in different roles which makes it easier to understand the flow of events, if the user administrator is the creator, approver and executer of a request it is hard to distinguish when he acts in which role.

image

To add a new mailbox perform these steps:

  1. Click New...
  2. Click Next in the Wizard (keeping the default option Microsoft Exchange, POP3, IMAP or HTTP).
  3. In the next dialog do not enter information in the fields! Instead you should check the Manually configure server settings or additional server types checkbox and then click Next.
  4. Keep the default option Internet E-Mail and click Next.
  5. In the next dialog you should enter data in all fields, see sample below, and then click Next. You can also click Text Account Settings to make sure you have typed everything correctly.
  6. Finally click Finish to complete your action.

image

 

Activate Outlook (and Office in general)

I will end with a warning, remember to activate Office during the early installation phase of the VPC. When I did my last VPC I forgot this and after making the VPC a DC and DHCP server with static IP I had some trouble activating Office…

This may be a bit too simple for most SharePoint developers but as I struggled to find the correct code I'll drop it here, perhaps someone will get a hit if they search for the same thing...

What I wanted to achieve was to have a DropDownList which automatically retrieved its value from a SharePoint list. I wanted to I could have written a foreach loop to solve this but I knew data binding was the way to go. Include the code below in your Page_Load method and the list will be populated.

using (SPSite site = new SPSite("http://devserver/somesite"))
{
    using (SPWeb web = site.OpenWeb())
    {
        SPList list = web.Lists["Departments"];
        cboDepartment.DataSource = list.Items;
        cboDepartment.DataValueField = "Title"; // List field holding value
        cboDepartment.DataTextField = "Title"; // List field holding name to be displayed on page
        cboDepartment.DataBind();
    }
}

Did you know that you can find south by drawing a line across the shadow on the moon and then locate the point where the line intersects the ground. My beautiful illustration below hopefully makes it clear how this works.

image

I read this in a Swedish historical magazine (Världens Historia) a few days ago but was not convinced, so I have tested the theory for a few days by observing the moon and following the line to the ground. And to my amazement it seems to work!

Looking for confirmation I also found this text at Scouting Ireland: "Because it reflects the sun's light, the moon always points towards the sun, and thus even at night indicates the direction of the sun. Whether the moon is waxing or waning, an imaginary line through the horns of a crescent moon will always give you, approximately, a north-south line." I'm not 100% sure this is identical with what I say above, but it's close enough!

Feel free to impress friends and family during the holiday season with your deep knowledge of how to navigate at night without a compass.

I needed to select a user while building a form in SharePoint. I hadn't done that before so I searched the web and looked in some books I have and found what I needed, almost...

The samples I found didn't quite work, when I moved the code into my own page and browsed to it SharePoint gave a generic error. There was no indication of what was wrong so I created a minimal test page and modified it until it worked, I think the problem was lack of Import statement for Microsoft.SharePoint.WebControls.

To help others who are facing the same problem I publish the minimal application page below. Take the code and paste it in an ASPX file (e.g. pe.aspx), then save the file into C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS. Finally browse to http://yourservername/_layouts/pe.aspx to check if the control renders properly.

<%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" %>

<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Import Namespace="Microsoft.SharePoint.WebControls" %>

<asp:Content ID="PageTitle" runat="server" contentplaceholderid="PlaceHolderPageTitle" >
   Browser title
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" runat="server" contentplaceholderid="PlaceHolderPageTitleInTitleArea" >
   SharePoint Page Title
</asp:Content>

<asp:Content ID="Main" runat="server" contentplaceholderid="PlaceHolderMain" >
    <SharePoint:PeopleEditor
        ID="peApprover"
        runat="server"
        AllowEmpty="false" 
        SelectionSet="User"
        MultiSelect="false"
        AllowTypeIn="true"
        PlaceButtonsUnderEntityEditor="false"
        />
</asp:Content>

Detailed information about properties and methods on the PeopleEditor control can be found at http://msdn2.microsoft.com/en-us/library/ms468579.aspx. There you can read all about how you can customize the control to fit your needs.

More Posts Next page »
 
Page view tracker