Blog Stats
  • Posts - 160
  • Articles - 0
  • Comments - 48
  • Trackbacks - 3

 

Thursday, February 25, 2010

Accessing Built In SharePoint fields

When you’re accessing built in SharePoint fields (such as Title) from code, do you go:

	listItem["Title"] = xVar;
	listItem[0] = xVar;

Don’t! Have a look at SPBuiltInFieldId that keeps tracks of the Id’s for the built in fields for you:

	string title = myListItem[SPBuiltInFieldIds.Title];

Wednesday, January 13, 2010

Dumping SPList Items to a Feature

I’ve been working for a while on a project and filled up the Site Collection Images list with a lot of images get the user experience going in my virtual dev environment. When we got access to the customer environment I wasn't in the mode to manually upload all the images again. So I wrote the following little console application that dumps out the content from the Site Collections Images list. The output from the app is:

  • Feature.xml - file containing the feature def and all elements
  • images.xml – file containing the Module with the images
  • Images folder – folder containing all the image files from the list

Feature_Structure

Then I copied the generated artifacts to my solution and built the wsp package. This code might not be very useful as is but will perhaps make a point on how this technique can be used.

Before going in to the code one note is worth making is that everything is hard coded, including the guid ID. I know it beforehand so I could do that, if you’re adopting this to something more generic you probably want to generate the ID during runtime.

 

The code otherwise is pretty simple. Open the list, loop over it and generate a Feature.xml and an elements.xml file and dump all the files into a folder.

 

Here’s the code:

 

using System; 
using System.IO; 
using System.Text; 
using Microsoft.SharePoint; 
namespace ReverseSiteCollectionImages { 
    internal class Program { 
        private static void Main(string[] args) { 
            using (var site = new SPSite("http://stockholm:666")) { 
                SPList siteCollectionImagesList = site.RootWeb.Lists["Site Collection Images"]; 
                var featureBuilder = new StringBuilder(); 
                var imagesBuilder = new StringBuilder(); 
                
                //Init feature XML 
                featureBuilder.AppendLine(" "); 
                featureBuilder.AppendLine(" "); 
                featureBuilder.AppendLine(" "); 
                featureBuilder.AppendLine(" "); 
                
                //Init Elements XML 
                imagesBuilder.AppendLine(""); 
                imagesBuilder.AppendLine( " "); 
                
                //Itterate over images in list 
                foreach (SPListItem item in siteCollectionImagesList.Items) { 
                    //Write xml to feature.xml and elements.xml 
                    featureBuilder.AppendLine(""); 
                    imagesBuilder.AppendLine(""); 
                    
                    //Get the file... 
                    SPFile file = item.File; 
                    Stream stream = file.OpenBinaryStream(); 
                    
                    if (Directory.Exists(".\\Images") == false) { 
                        Directory.CreateDirectory(".\\Images"); 
                    } 
                    
                    //... and persist it to disk 
                    using (var fileStream = new FileStream(".\\Images\\" + item.Name, FileMode.Create, FileAccess.Write)) { 
                        int Length = 256; 
                        var buffer = new Byte[Length]; 
                        int bytesRead = stream.Read(buffer, 0, Length); 
                        
                        while (bytesRead > 0) { 
                            fileStream.Write(buffer, 0, bytesRead); 
                            bytesRead = stream.Read(buffer, 0, Length); 
                        } 
                    } 
                } 
                
                //Finish up xml 
                imagesBuilder.AppendLine("  "); 
                imagesBuilder.AppendLine(""); 
                featureBuilder.Append(" "); 
                featureBuilder.Append(" "); 
                
                //Flush xml files to disk 
                using (var featureWriter = new StreamWriter(".\\Feature.xml", false)) { 
                    featureWriter.Write(featureBuilder.ToString()); 
                    featureWriter.Flush(); 
                } 
                
                using (var imagesWriter = new StreamWriter(".\\images.xml", false)) { 
                    imagesWriter.Write(imagesBuilder.ToString()); 
                    imagesWriter.Flush(); 
                } 
            } 
        } 
    } 
}

Tuesday, January 12, 2010

Good Write-up on ULS Viewer

Every now and then I get a gig where I go in to a customer to help sort out an exiting problem with their SharePoint environment (get us engaged early in the projects folks, that eliminates quite a bunch of these panic engagements). When trying to get a grip on a existing environment I use a couple of tools, one of which is ULS Viewer. (Then name says it all :)).

Jie Li has a good write-up on using ULS Viewer for trouble shooting over on his blog, check it out.

 

(And of course it’s the official documentation available at http://code.msdn.microsoft.com/ULSViewer)

Saturday, October 17, 2009

Neat Trace Writer Trick

This is one that my colleague Mattias showed me. When I code SharePoint solutions I’m always to put in some diagnostics logging just so that I can turn it on and se what happens. There is (as always) a couple of options here. Write to the ULS logs, which I guess is the preferred way to do it and then use event throttling to turn it on and off. However sometimes its just a bit to much work. So, here’s the trick.

Sprinkle Trace.Writer's in your code where it makes sense. So for example i might want do put the following code somewhere:

 

System.Diagnostics.Trace.Write("Feature myAwsomeFeature is installed");

 

Running normally this don’t generate any output. The way I was aware of before to get at this output was to hook up a Trace Listener in the config file.

Now to the trick, at least in my book since I didn’t know about it.

Download DebugView from TechNet. Unpack and fire it up. I had to enable Global Win32 Capturing:

DebugViewCaptureOptions

Then it’s just to lean back and watch your eminent Trace Writes roll by:

DebugView

 

It’s probably like most things in my life. Everybody else already know about it, but I think it is neat! And by the way, this is of course not tied to SharePoint in any way.

Sunday, September 06, 2009

Multiple Exchange Servers in Outlook 2010

In my role as a consultant I’ve many a times been at a customer for months in a row. What happens then (at least for me) is I get a Exchange account at the customer, I have one at my employer and after a while I’m starting to get skitsofrentic. Either I run one in Outlook and the other in Outlook Web Access and forwarding meetings across to keep the calendars in sync. Another option is to have multiple mail-profiles for outlook to use. Doesn’t matter how you twist and turn it, you’ll always end up with a mess… Until soon.

It really warmed my heart when I read this post at the Office Outlook Team blog. In Outlook 2010 you can have multiple Exchange servers simultaneously!

MultiExchangeInOutlook

Just pure awesomeness!

Sunday, June 14, 2009

Potential Issues Installing SharePoint 2007 Service Pack 2

A while back Service Pack 2 for SharePoint was released. That’s all good. But unfortunately you might run into some snags installing it. This post is an attempt at doing a write-up of the issues I've seen on blogs, in support kb’s and that myself and my colleagues at Microsoft Services Sweden have encountered, being out there in the field close to the metal. I’ll come back and update the list if necessary.

Before we get to the lists, be sure to do your homework. Read:

  • Deploy upgrade instructions for MOSS 2007 and WSS 3.0
  • Check out Stefan Gossner’s blog post for links to fix-lists and more

 

Here we go:

Use the right accounts

This is a simple one, just read the docs (link above) and make sure the account running SP2 has permissions such as db_owner on the databases. I ran into this when we tried to rush the installations, which of course resulted in rollback and we had to do it all over again.

 

Product Key issues

This one you probably heard about, it has made its way trough the blogosphere big time. Seems the installer sets the trail period to 180 days for MOSS servers when installing SP2. This does not affect WSS! A hotfix in the works, and a workaround is available.

UPDATE 2009-06-29: Product group issued fixes for this, read more at: http://blogs.msdn.com/sharepoint/archive/2009/06/25/service-pack-2-update.aspx 

 

Disappearing host file

It looks like MOSS Search drops the hosts file and recreates it. So if the Service Account is not in the Admin group, it does not have the right to create it.

 

No SharePoint Server 2007 Service Pack 2 .msp files are installed if you have the Stswwsp1.msp file in the Updates folder

 

The Area Service Web service is removed from SharePoint Server 2007 after you install the 2007 Microsoft Office servers Service Pack 2

 

Changes web.config

We’ve seen in some cases that the SP2 installation changes the web.config on the server where Central Admin is hosted. This was also the server which ran the SharePoint Products and Configuration Wizard during the Service Pack install.

The problem was that SP2 added a second defaultProxy-tag. The duplication of the defaulProxy-tag lead to failures loading the ASP.Net ISAPI filter.

WebConfig_DefaultProxy

 

Could not find load balancer service

After a Service Pack 2 install one of my colleagues encountered the error “Could not find load balancer service.” in the Event Log. SP2 cleared the LoadBalancerURL and Port values in the registry.  This only happened on the MOSS server with Central Admin. This was also the server on which ran the SharePoint Products and Technologies Wizard as a part of the Service Pack installation.

LoadBalancerURL_Regedit

 

Update 2009-08-17:

Two other issues I’ve seen folks stumble across:

SharePoint SP2: “The B2B upgrader timer job failed.”

http://blogs.catapultsystems.com/matthew/archive/2009/08/01/sharepoint-sp2-“the-b2b-upgrader-timer-job-failed-”.aspx


MOSS and WSS SP2 can break PDF searching

http://sharepointsearch.com/cs/blogs/notorioustech/archive/2009/07/28/moss-and-wss-sp2-can-break-pdf-searching.aspx

Friday, May 22, 2009

Adding outlook tasks fast (using Launchy with a little programming)

Being home from work with a stomach bug today I was thinking on how I can be more effective in what I do. One thing that popped to mind is how often in a work day I lose track of what I’m doing just because I remember something else I have to do. When the idea pops up I go off to outlook navigate to the right place, add a task… And boom, my mind is way off track.

So my thought was “how do I shorten the interruption so that it does not derail my train of thought”?

I’m a big fan of Launchy. It rocks and saves me time every day. So I figured that was the way to go and since I’m a computer nerd I immediately cracked open Visual Studio and got to work (if a hammer is the only tool you have, every problem looks like a nail :)).

Here is the achieved result:

OutLookTask_In_Launchy

Which puts the task in Outlook:

TaskInOutlook

The code I used for this is very simple. Here is the code for opening up Outlook and creating the task.

static void Main(string[] args) 
{ 
    Microsoft.Office.Interop.Outlook.Application olApp; 
    Microsoft.Office.Interop.Outlook.NameSpace ns = null; 
    try 
    { 
        olApp = new Outlook.Application(); 
        ns = olApp.GetNamespace("mapi"); 

        ns.Logon("Outlook", Missing.Value, false, true); 

        Outlook.TaskItem ti = olApp.CreateItem(Outlook.OlItemType.olTaskItem) as Outlook.TaskItem; 
        ti.Assign(); 
        ti.Subject = GetTaskSubject(args); 
        ti.DueDate = GetDueDate(args[0]);
        ti.Save(); 
    } 
    catch (Exception ex) 
    { 
        Console.WriteLine(ex.Message); 
        throw; 
    } 
    finally 
    { 
        ns.Logoff(); 
    } 
}

And in addition to that it’s just some parsing logic. The first word is my own little micro language. td –today, tm – tomorrow, nw – next week, jan – januari and so on. Check the huge switch-case statement in the code to se all my code words.

So this is just in the prototype state so far, but works pretty good. The code needs some heavy refactoring and so on, but if you want to check it out. Download code here.

For the next step I’m looking at making it a “real” Launcy plug-in. Since I don’t want to step into C++ land I leaning towards the Launchy# project.

UPDATE 2009-06-11: By request I've uploaded a compiled exe that you can download here.

Monday, May 04, 2009

Hiding Execution Window for Console App

Ever did a nice little console applications that does something smart and you’re satisfied with what it does but it’s kinda irritating that it steals focus and flickers by the screen during execution. Could be something like the GUID generator I wrote a while back, described in my post: Creating GUID’s.

So here the simple solution:

  1. In Visual Studio 2008, right-click the project
  2. Choose Properties…
  3. Change Output type from Console Application to Windows Application.
  4. Done.

Windows Application

Thursday, February 05, 2009

Getting a hang on twitter

This is just a fairly pointless rant on twitter usage, so if it don’t fall within your sphere of interest, stop reading now! :)

A while back I wrote a post about starting to twitter. I’m starting to get a hang of it now. The thing that seems a little conflicted in my mind is what people are using it for. Some, including myself, use it as micro blogging. That is writing short posts that are to short (and insignificant) to be their own blog post. The other camp simply uses it as the MSN Messenger status message with tweets like: “I’m at home”, “I’m at the airport”, “eating pizza” and so on. There no right or wrong here, simply a reflection on my part.

I haven’t retweeted anything yet, guess the old don’t forward chain mails instinct makes it feel uneasy.

Scott Hanselman just wrote a post on the subject of getting started with twitter: How To Twitter - First Steps and a Twitter Glossary. It’s very good and explanatory and I wished it was available when I got started.

I also wrote about my choice of twitter client: Witty. Witty is a neat app for twitter but I tried TweetDeck and got hooked. It’s really nice and the fact that you can mark tweets as read is a (simple) killer feature in my mind. Chirp looks really pretty but I haven’t had the time to try it out yet.

Next step: Installing Tiny Twitter on my Windows Mobile Phone.

 

So nowadays I’m: @nippe

Thursday, December 25, 2008

Converting a Html News Page to RSS

This have been my little weekend project this weekend (ok, some Christmas preparations to).

Background

As some of you know I play underwater rugby. The communication from the Swedish Underwater Rugby Association to it’s members is mainly through the news page on their site’s news page:  http://www.ssdf.se/t3.aspx?p=51459 (in Swedish). This page is only exposing HTML and does not expose an rss-feed (they should have used SharePoint). My problem is that I never remember to visit the site with regular intervals, so I miss out on stuff.

Approach

As I truly am a RSS junkie, that’s what I wanted. To be able to get these news (together with all other news I’m interested in) in my feed reader. So the approach I took outlined:

  1. Get HTML from newspage
  2. Make sense out of and parse HTML
  3. Generate RSS XML and save to file
  4. Expose the RSS on my own web server

Doing all the parsing by hand didn’t sound very tempting so I Lived around a little and found the HtmlAgilityPack on CodePlex, which is a framework that let’s you query a HTML document in the same way you would query a XML document using XSLT or XPath. The release on codeplex was compiled against the 2.0 framework, I simply changed target framework for the project an recompiled, worked like a charm.

 

Let’s Get Going

Getting the HTML

The HtmlAgilityPack supports getting the HTML itself by using something like:

HtmlWeb hw = new HtmlWeb();
HtmlDocument newsDoc = hw.Load(url);

The problem I had with that (and it’s probably due to incompetence on my part) is that I could not get the right encoding (very important in Swedish due to our extended alphabet). So what I ended up doing was getting the HTML myself and load it into a HtmlAgilityPack HtmlDocument object:

// Did not manage to solve the encoding bit so I retrive the data myself first ...
HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(urlToFetch);
HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse();

// ... and then apply the encoding while reading in the stream into HtmlAgilityPack object
HtmlDocument htmlDocument = new HtmlDocument();
htmlDocument.Load(webResponse.GetResponseStream(), Encoding.Default);

 

Parsing the HTML

Now it’s time to leverage the power of the HtmlAgilityPack, but first I did a manual analysis of the HTML using View Source and the IE Developer Toolbar. I found that I could identify each a news item by looking for a DIV-tag with the class attribute set to clMainnewsEntries.

Html2Rss_IEDevToolbar

So, let’s get cracking and find those nodes:

HtmlNodeCollection htmlNodeCollection = htmlDocument.DocumentNode.SelectNodes("//div[@class='clMainnewsEntries']");

foreach (HtmlNode newsNode in htmlNodeCollection)
{
    // ... generate rss items ...
}

That was easy, now the HTML stars working against me. A few issues are

No Author

The news have no author, that I easily can get to programmatically. But it aint really important either so I’m just setting it to “N/A”.

No Links

Not all news have links and if they do it’s hard to tell if it’s a link to the news item or something else. So to fill the link-element in the rss I try to find a link that has title tag (which seems to be the way this cms system handles read more links.

string link = string.Empty;

if (newsNode.SelectSingleNode(".//a[@title!='']") != null)
{
    link = newsNode.SelectSingleNode(".//a[@title!='']").Attributes["href"].Value;
    if (!link.StartsWith("http"))
    {
        link = String.Format("{0}{1}", "http://www.ssdf.se/", link);
    }
}

No Publishing Date

This one is trickier. To add on the confusion I learned the editors update a news item when they want to push it to the top of the list. So what I do here is simply put the date and time when I retrieve it the first time, keeping track of them with a hash (see next paragraph). This should work fine when it runs with a steady intervall, tough the first time it will give all news the same date.

Guid

To keep track of the items I calcluate a hash for each item and store that in a separate XML file.

public string ComputeHash(string Value)
{
    System.Security.Cryptography.MD5CryptoServiceProvider x = 
        new System.Security.Cryptography.MD5CryptoServiceProvider();
    byte[] data = System.Text.Encoding.ASCII.GetBytes(Value);
    data = x.ComputeHash(data);
    string ret = "";
    for (int i = 0; i < data.Length; i++)
    {
        ret += data[i].ToString("x2").ToLower();
    }
    return ret;
}

I put this hash in the guid-tag of the RSS. So if the news is updated I hope they change something in it so it renders a different hash.

 

Building the RSS

It’s time to start building the RSS. I start creating the document using LinqToXml (which by the way is pure love to use and deserves a blog post all of it’s own):

// Creating XDocument
XDocument xDocument = new XDocument(
    new XDeclaration("1.0", "windows-1252", "true"),
    new XProcessingInstruction("xml-stylesheet", "type=\"text/xsl\" href=\"EvelntLog.xsl\"" ),
    new XElement("rss", new XAttribute("version", "2.0"),
         new XElement("channel",
                      new XElement("title", "UV-rugbynyheter"),
                      new XElement("link", HtmlDocument.HtmlEncode( "http://www.ssdf.se/t3.aspx?p=51459") ),
                      new XElement("description", "Undervattensrugbynyheter från SSDF"),
                      new XElement("language", "sv-se")
             )
        )
    );

And then I add each item to item to the feed:

root.Add(new XElement("item", "",
      new XElement("title", newsNode.SelectSingleNode("h1").InnerHtml),
      new XElement("description", newsNode.OuterHtml),
      new XElement("link", link),
      new XElement("author", "N/A"),
      new XElement("pubDate", pubDate.ToString("r")),
      new XElement("guid", postHash)

));

 

Finalizing

I put this little program on my web server and used the windows scheduler to run it every 2 hours. And the final piece of code pushes the generated file out to the right directory.

if(Convert.ToBoolean(ConfigurationManager.AppSettings["CopyFile"]))
{
    File.Copy(".\\" + ConfigurationManager.AppSettings["Filename"], 
        Path.Combine(ConfigurationManager.AppSettings["TargetDir"], 
        ConfigurationManager.AppSettings["Filename"]), true);
}

You can grab the source code for the first working version here. Now it’s refactor time!

Tuesday, December 16, 2008

Getting into Twitter

twitter_logo_sEverybody is talking about twitter, tweet this and tweeting that. And I haven’t really got the point yet. So this Saturday during a Chili cook out my friends Mårten and Johan tried to explain it to me.

They did a job good enough to make me give it a try anyway. So I’m now on http://twitter.com/nippe

I haven’t said a twittering word yet, I think I’m going to listen for a while first to get the gist of it.witty

So I got an account what’s the next thing you do. See if you can find some cool apps to get you on your way, of course. I found Witty which seems to be a nice open source, WPF app. And hey, glossy buttons always makes adoption easier :).

Sunday, December 14, 2008

Adobe PDF iFilter now in 64-bit

Finally! Adobe released a 64 bit version of the PDF iFilter. You can get it here: http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025.

But before you decide if this is the iFilter you wanna go with. Check out Je Li’s performance measurements comparing Adobes and Foxit’s iFilter: http://blogs.msdn.com/opal/archive/2008/12/10/pdf-ifilter-battle-foxit-vs-adobe-64bit-version.aspx

Friday, November 07, 2008

3 Weeks with Windows Server 2008 on My Laptop

logo-ms-ws08-v A couple of weeks ago I felt that it was time to give my laptop (Dell Latitude D830) a clean install. I’ve been running Vista 64-bit on it and it has worked great. I’ve also been curious at Hyper-V and not totally satisfied with Virtual PC (the vm’s are often to slow).

Said and done, I installed Windows Server 2008 Standard Edition and got on to configuring it and installing features and roles. That WS2008 is not a client OS is a given, but the amount of configuration to get it to work like one was a little over the top for my taste. But hey, what don’t you go trough for learning something new. There is a ton of articles out there describing the steps, here’s a few that I followed:

After getting WiFi, Aero and sound working I struggled with Bluetooth which I didn’t get fully working which is a big setback because I use (and love) a bluetooth mouse.

Next step for me was installing the Role Hyper-V. Worked great, took me a while to figure out the how the networking worked and that it don’t work with wireless as Virtual PC. The big drawback for me was that when Hyper-V is installed it disables the laptops ability to Sleep & Hibernate and I just love to be able to slam down the lid, go some place and open it up and continue where I was.

So overall I’m happy with it but the bluetooth and Sleep/Hibernate issues are deal breakers for me, so I’m going back to Vista 64. Should I’ve had a stationary computer I would probably stick with Windows Server 2008 because Hyper-V really rocks!

Thursday, November 06, 2008

Shortcuts that Saves Time

Hi there, this post is about being a little more efficient in your everyday work. These shortcuts maybe saves me half a sec every time I use them, but I do use them literally a hundred times a day. 

 

Ctrl + E

Using the Ctrl + E keyboard short cut gets you to the search box in many major applications, such as: Internet Explorer, Mozilla FireFox and Outlook 2007.

Some examples:

Outlook
Ctrl + E in Outlook

Internet Explorer
Ctrl + E in Internet Explorer

FireFox
Ctrl + E in FireFox

 

ALT + D

A not so known shortcut is ALT + D that takes you to the address field of your browser (I only verified this in IE and FF). A nice effect is that it selects the whole address, so ALT+D and start typing and you’re entering a new address.

Internet Explorer
ShortCuts_AltD_ie

FireFox
ShortCuts_AltD_FF

 

Do you have any productivity boosting short cuts?

Wednesday, November 05, 2008

A Sweet Little File Rename Utility

Every now and then I want to rename files in a folder according to a pattern. Mostly it is to hook up audio books in my iPod. Then I have to rename all the files with .m4a extension to .m4b (and don’t ask me why apple did choose this idiotic solution).

This is easily done with a dos command in windows (ren *.m4a *.m4b). But when you want to change file names according to a pattern it gets trickier. I stumbled across this sometimes when I want to rename digital photos and such.

Anyway, I found this utility via lifehacker and it’s called KRename. I’ve just played around with it a little but for the things I needed off the bat it came trough.

KRename

Tuesday, October 14, 2008

Consolas Font in Command Prompt

I am a font geek and I just love the Consolas font. I started using Consolas in Visual Studio and now I want it in more places. So I sat out on a mission to get Consolas into my Command Prompt.

Here’s how:

  1. Get Consolas Font Pack and install it
  2. Crank up regedit and browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont
  3. Add a string value named “00”
  4. Add “Consolas” as value
    ConsolasPost_Regedit
  5. Restart your computer

And voila, consolas in the command prompt:

Before

ConsolasPost_CmdBefore

After

ConsolasFont_CmdAfter

Thursday, August 28, 2008

Getting a "403 Forbidden" when trying to access the Search Settings Page

A while ago I stumbled upon this issue. Doing my usual day-to-day stuff on the SharePoint farm, I entered the the Search Settings page under the SSP and instantly got a 403 Forbidden in my face. We had not experienced any problems with this earlier. So I looked around a little and the Profile Import page also showed immense weirdness:

Broken SSP User Profiles

I found some articles on similar problems but that did not help.

 

After trying a bunch of things I gave in and thought to my self: f**k it, I'll just create a new SSP and configure search once again. Said and done I started creating a new SSP only to get a failure, but with some interesting info "User cannot be found".

CreateSSPFailure

This set me off in the right direction. After reading trough a enormous amount of ULS logs and a substantial amount of support case logs I finally figured out what caused it all.

 

When you install a new SharePoint farm the account used to do the installation is appointed as the owner of the central admin site collection. We did not use a specific installation account and the guy that did the installation for our farm had left the place a while ago. Hence the IT department locked his account and that is what caused it all.

 

So lessoned learned, always use a specific set up account!

Wednesday, April 09, 2008

Installing MOSS SP1 - The Order of Things

In my current project I last Monday ran in to some DST issues on our MOSS farm. As you can guess we had a DST (daylight saving time) here in Sweden during the weekend just before this very frustrating Monday. I experienced it by getting huge problems while trying to deploy my wsp solution packages. The thing that tipped me of was that went to lunch with a deployment in "Deploying..." and when I got back it succeeded. As you probably figured by now we did not have Service Pack 1 installed.

So I read trough the Planning and Deploying Service Pack 1 for Microsoft Office SharePoint Server 2007 in a Multi-server Environment. It contains a lot of god info, but when it comes to to the installation procedure and sequence of things it does not do a very good job, in fact I find it to be quite self contradictory on some points.

What I ended up doing was my own installation matrix, which you can download here:

Install matrix

Monday, March 24, 2008

Stopwatch class

In my current project we’ve reached a phase where we’re hunting down performance issues and are doing some light profiling of our own on our code. So I’ve been using the Stopwatch class a lot to see how long time things take. This post is more of a note to self, so I can find it again in a non time consuming fashion :).

Friday, March 14, 2008

Net Stop Sens

This post is mostly a note to self, but hopefully it can save a little time for someone. I was just cranking up a new VPC to demo some document management features for a customer. Browsing the SharePoint webs worked like a charm, creating document libraries was no problem. But when I tried to save a document from word 2007 to a document library I got an annoying: "This file cannot be saved to this location because there is no connection to the server. Check your network connection and try again."

WordSaveError 

Also, the document panel failed to load.

I guess is that WebDAV or FrontPage RPC does not work connections the same way http does. I had no clue what this was so I spent a little time with my favorite search engine (live.com of course ;)).

Here is what made the error go away: net stop sens.

NetStopSens 

Apparently the System Event Notification Service (SENS) can be used by applications to determine bandwidth and such. And the office client uses it in some way. I have never encountered this problem in a production environment and even if I did, I don’t think turning off the service is the right solution. But in the case of a demo/development VPC, it’s fine in my book.

 

 

Copyright © Niklas Nihlen