Skip to main content

Kurt

Go Search
Infusion Blogs - Beta
ActiveNick
Alex
Boston
Bryan
Daniel
Greg
kennedy
Kurt
London
Matthew Glace
Nadeem's SharePoint Blog
Recruiting
Rob
Simon
Simon Matthews
Sleepless Blog
Syd Millett
Szymon
Trev
Tyler
  

Infusion Blogs - Beta > Kurt
The blog of Kurt Guenther, Practice Manager of Emerging Technologies at Infusion Development
Multiple LobSystemInstance s

I was recently teaching a SharePoint class, and during the BDC section I ran into a situation where I had to explain why you could have multiple LobSystemInstances in a given LobSystem definition.

At first it didn't make very much sense to me for a number of reasons:

  1. Database vs. Web Service: you are constrained to using all Database or all Web Service connections in a given LobSystem (this is defined at the LobSystem object, not at the LobSystemInstance)
  2. You must have the same schema for all LobSystemInstances: there is no way to specify different Methods for entities based on each LobSystem. 

So to me, it seemed like you were effectively stuck for a given LobSystemInstance.  Then I started reading the documentation on the MSDN and found the following:

The LobSystemInstance object allows you to associate two sets of instance-specific data such as connection parameters and authentication settings with a single system definition - one for Web clients and one specifically for search. This is extremely useful when you have different sets of security credentials to access data using Web clients and to crawl search.

So there you have it.  But you have to ask yourself, how would I pick different LobSystemInstances.  Well, when you look at the BDC picker in SharePoint, you'd naturally think it's enumerating on the LobSystem.  Well, you're wrong.  It's enumerating on the LobSystemInstances.  So you can effectively pick different connectionStrings for your Search vs. Web Client.

I have a feeling this would also help when doing shifts between Dev, Staging, and Production.  I imagine you could have all of the different strings in one Application file.  But it's too early to tell whether this is a best practice or not. 

Further reading (suggested):

MSDN LobSystemInstance definition

MSDN Business Data Catalog FAQ (not too much there yet - but a good start)

BDC XSD schema file

At the time of posting, it was virtually impossible to find (via google or msn live) the BDC schema.  And why would I want to instantly find that?  Well, if you place this in the schemas directory for Visual Studio, then you get intellisense on your BDC application xml file.

 

And you want intellisense when working with BDC.  Believe me.

 

So this is one of those posts that contains very little information, but is mainly a marker for people who are looking for the BDC schema file.

 For reference, you can find this under "<Program files>\Microsoft Office Servers\12.0\Bin\bdcmetadata.xsd".  To get intellisense to work, place the xsd in "<Program Files>\Microsoft Visual Studio 8\Xml\Schemas"

For niceness, I am going to post this file here for download until someone tells me I can't do it.  I figured it's the least I could do (since I found it particularly annoying to have to copy it from one of our remote MOSS servers).

 

(And before people say intellisense isn't work, remember you need to type

<LobSystem xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog" >

to kick things off (although VS2005 should intellisense the xmlns as a choice).  Happy BDCing)

Sleepless in NY slides
As promised, here are the slides.  More to come on Sleepless in NY soon!
 
 
Brilliant Company: Tapefailure

http://www.tapefailure.com/

 

Go there.  Do it.  Go now.  Find out exactly what these guys do, becuase I think it's quite amazing. 

As far as I can understand, Basically, they record user actions for every visitor to your site and provide statistics and actual "tapes" of what the user is doing.

Example: all your users scroll to the bottom, then mouse over an image and click it.  Bam.  See that they pause when scrolling down to look at something. 

How great is that to know.  If I were a web designer or a web 2.0 company, I would instantly hire these guys.  This is a great idea and I hope it proves to be a worthwhile business.

.NET Framework 3.5 Beta 1

Who has time to keep up?  While I'm busy trying to build a next gen trading system with WPF (a part of .NET 3.0) Microsoft is already releasing the .NET Framework 3.5 Beta 1

Google Notebook

Holy crap.  Has anyone else seen Google Notebook.  This is *exactly* what I've been looking for.  I can even share my notebook. This is exactly the mini blogging experience I've been looking for.

And these sneaky bastards have included the "Note this" in their search results (that's how I stumbled upon Notebook in the first place). 

I am going to probably start using this a lot more.  For those of you who care to follow, I will keep a public notebook here.

Hopefully Live Writer (see my rant below) can keep up.  I wonder, does Microsoft have something to compete here?  Is it Live Writer?

[Don't worry real tech fans, I will have a real tech post here shortly.  Right now I am having too much fun spending my few free moments being immersed in the Web 2.0 that I haven't caught up on]

Windows Live Hotmail gets it wrong again

I decided to sign up kurtguenther@hotmail.com just to test out the new Windows Live Hotmail interface.  I haven't used hotmail in ages, but I felt that I should check out the new Web 2.0 UI. 

Btw, spam bots, feel free to pick up that address, I won't be using it again.

I wanted to see what the new interface would be like and I was instantly turned off by the blaring, in my face ads.  Has Microsoft learned nothing from Gmail?  (disclosure: I use gmail for my personal mail).  You can only use text ads when I am trying to do my business with email.  You can't have some kind of flashing ad for Neiman Marcus or blinking Online degrees logo when I am writing email. 

I do recognize how the interface is vaguely similar to how Outlook webmail is, but beyond that, I am unimpressed.  The send button isn't in the natural spot for me and the "new contact" interface is ugly as sin.

Tough love from a fan boy, Microsoft.  That's what'll make you better ;)

[oh, does anyone know whether hotmail uses email to contextually display ads?  I am hoping it does, though it's tough to tell since I have no mail for it to go on yet]

Google goes iRetro

Apparently, it's hip again to name things with the iPrefix: Google decided to go all retro by rebranding its custom user portal as iGoogle.

 

iLame.

Microsoft Blog Writer Incompatible with Microsoft Blogs (updated)

<rant>

This is absolutely infuriating.

I wanted to start using the Microsoft Windows Live Writer - basically Microsoft's easy-to-use Blog Writing Tool. There's a full SDK around it, a number of add-ins to support various blogging tasks that I want to do (*hint hint* code snippet add-in), and most importantly there's an extension for IE that serves as "Blog This" quick start.

Perfect tool, right?

Yeah, no. The MICROSOFT blog writer doesn't work with the MICROSOFT blogs created from SharePoint 2007. Even more insane, it supports the MetaWeblog API, just not the version exposed via SharePoint (_layouts/metaweblog.aspx). SharePoint is going to be supported in the "next beta" according to the Windows Live Writer forums.

I'm glad you supported Windows Live Spaces, Wordpress.com, TypePress, LiveJournal, Moveable Type, Wordpress Custom Installation (whatever that is), Radio Userland, das Blog, Community Server, MetaWeblog API, Moveable Type API, and Blogger, but not your own. To clarify: Microsoft supports Google's API for blogging, not their own.

Not to bite the hand that feeds me, but if you're going to tout how your portal software is great for using blogs, maybe you should make it work with your blog authoring software.

Unreal.

 

update: There is a workaround to this issue.  You have to muck with the settings on your SharePoint blog to allow credentials to be passed (in clear text, I believe).  This clearly isn't a long term solution and is something that will have to be fixed in order for this product to leave the beta stage.  For this reason, I am leaving my rant up.

update 2: Now that I have this working, the "Blog This" extension for Live Writer on IE doesn't seem to be compatible with Vista.  Come ON!  I can't win here.  Or more accurately, Microsoft can't seem to win here.

Starting Salaries Up, Enrollment down.  Smells like a bubble

As some of you know, I studied computer science at Cornell, so I naturally look at Ithaca for the latest college trends.

Stupid facebook explosion aside, here is something I have noticed. Starting salaries for Cornell CS grads are on the rise again. Like a lot.

[salaries]

I don't have a lot of time to get into what I think about this, but I'll post this and comment later. Feel free to pick apart my decidedly shoddy statistics.

And here's another tidbit, enrollment is incredibly down, about half of what it was when I was there. Again, not enough hours in the day to comment, but I will post more soon.

[Enrolled]

 

Here's where I got my data: http://www.cs.cornell.edu/degreeprogs/ugrad/cscareers/PlacementReport/index.htm

Bandwidth is everything

I'm sitting in my apartment and getting near dial up speeds from my damned Time Warner Cable modem. Admittedly this is over our wireless router, but still, this is so annoying. It makes watching YouTube or any internet movies annoying. There should be a word for the anxiety felt when your movie buffers at an inappropriate time. BufferAnxiety, Buffer Suspense, Bandwidth-hanger. Like a cliffhanger. These are the things I think of when I see "Buffering…"

I can't express how much I am disappointed by modern ISPs. Some perspective:

Seven years ago, I distinctly remembering downloading the Matrix from my a friend the first day I showed up at Cornell. Yes, back then I was a pirate, although this was well before Napster was ruled too cool for school. The quality was quite good and the movie weighed in at just over a gig split over two files. All in all it took about 20 minutes per half. Forty minutes for a gig is not bad at all.

Now I don't even get those kinds of speeds in my cable modem, which I pay $50 a month for. Free college internet was better than a service I pay $600 a year for.

 

Let's compare some other trends:

Processor speed in 2000: 667 Mhz

Processor speed in 2007: 2.6 Ghz

 

Ram in 2000: 256 mB

Ram in 2007: 2 gB

 

HD in 2000: 8 gB

HD in 2007: 100 gB

 

Where are the monumental increases in bandwidth in the past seven years? Shouldn't I be getting gigabit commercially available by now?

All this new video crap on the internet and I actually have slower speeds. Lame.

Twitter is terrible

I keep reading about Twitter from Scoble as the next big thing, but the truth is that it's absolutely terrible.  Now I'm going to break Twitter down into a two-part suck: idea and implementation.

Idea: mini blogs - post where you get no more than 160 characters.  Now this is an idea that I originally had a while back.  I was hoping for a service where I could put up some of my random thoughts - a place where I could leave my hilarious one liners without having to craft a whole post.  Ultimately a collection of non sequiters.

I was hoping to build an app that took care of this, but Twitter beat me to it.  All I can say is that I am glad I didn't waste my time building it.  After reading through what's there, it's really nothing impressive.  No one is treating it like it should be - just non sequiters - people are trying to write full updates.  People are also "catching up" on their twitters, which is ironic.  Someone said it best: twitter is UDP, blogging is TCP/IP. 

Overall, I don't think that this was a good use of someone's time (though perhaps a good use of their VC capital, monetizing this is another issue altogether)

Implementation:  this is possibly the worst "web 2.0" app that I have seen in a while.  The interface is absolutely awful, I feel they could have spent more on web designers here.  Second, the performance is incredibly slow.  For posting 160 characters, it takes about 10 seconds of time.

I've read that the perf problems are both because they used Ruby on Rails, which doesn't scale well, and that their developers have taken the lazy route.  Whatever the cause, it's damn slow - and that's something that I is going to turn me away.

Overall, I give Twitter a thumbs down.  Sure, twittervision is cool, but there's going to have to be a big improvement in the implementation before I start using it.

McKinsey Presentation for Microsoft

I gave a pretty thorough Virtual TS presentation for McKinsey earlier this week. I promised to post the slides, so here is the link to the presentations and code samples.

I touched on basically anything related to the Office stack (each client app, SharePoint 2007, Office Communicator, Groove 2007). These things are usually 1 or 2 hours, but this time I did a 6 hour Tour de Force covering all of the relevant improvements in Office 2007.

There were 7 presentations in all:

It was the first time I had to give a complete session on PowerPoint J

I gave some information about customizing the Ribbon and using VSTO. This will be the basis for my talk this Saturday at the NYC Code Camp.

Cool project: Elite Models

I am always happy to see a project go into production. And finally at Elite Models, we can call the model booking system a success.

 

This project started in early 2005 as a proof of concept that I did. It was actually the first project that I worked on with our perennial Graphics Designer Petri, and it was the first VSTO project that I ever looked into. Actually, that's a direct lie, it was originally an IBF project (IBF is in many way the precursor to VSTO. VSTO wasn't a real technology then (VSTO 1.1 was pretty useless, having no UI components, it was more like a .NET 1.1 code-behind for a word doc), and IBF was a fledgling tech extension to Office. IBF failed because it was too damned hard to use (basically, you had to write tons of obscure XML) and it was a client-server technology (*everything* was a call back to the IBF server – way too slow).

 

In the times since the initial design a few cool things happened. First, office 2007 started its gestation period. I've been fortunate enough to be working with Office 2007 since the "Dog Food 4" (pre-alpha) days in Aug 2005, so I could see the new capabilities coming down the pipe. The improvements to Outlook really were what caught my eye – along with the changes in SharePoint 2007. Outlook now had support for a Task Pane (which wasn't supported before) – so we could now create our own UI in Outlook just like we could with Word and Excel.

 

Also, VSTO 2005 came out, which allowed us to take advantage of the Outlook TaskPane. For those not familiar with what VSTO 2005 does, it basically allows you to treat the Task Pane in Office as a .NET Winform. So you can put arbitrary code that operates inside of Office. This means the age of the isolated win32 app is finally at a close – thick client work these days is going to start becoming increasingly integrated into Office.

 

Finally, we saw WPF as an emerging technology. It's really great for what Elite needed. Elite's entire business is around image, and what better to use there than a next gen UI technology. It allowed us to create new ways of viewing client portfolios (collections of swimsuit edition style photos).

 

The result of this project is that Elite's entire North America operations now run on Infusion technology (which is really just customization of the Microsoft stack). This caught the attention of some important people at Microsoft. In fact, we even did a video case study out of it, which was shown on stage with Steve Ballmer at the New York Premier.

 

So, here's the link to the video that was shown with SteveB. There will be two other short MS videos (that focus more on the technology) coming out in the next two weeks. I'll post them when I have a chance. Along with that, Infusion made its own "Making of" video that shows what it was like to work with the Modeling Agency and Microsoft. It's currently being edited, but we should have that out sometime in late Q1 I imagine.

 

That's going to be an absolute riot.

 

Way to go, Infusion Elite team.

A second SharePoint Search Error

As I posted before, I've been doing some SharePoint mentoring in Waltham. The team built a SharePoint medium server farm from scratch to show off MOSS from an Enterprise perspective. Naturally, there were a number of errors with the set up; no matter how many times I do this, it never just works OOTB.

Here's the error: After fixing the previous SharePoint error, doing a search from the site collection http://servername/sitecol, we got:

"The Site Collection http://servername/sitecol could not be found in Web Application http://servername "

Short Answer: If you are using search on a Site Collection that sites other than at Root on a Web Application, you either need another Web Application at Root, or turn Root on as a Wildcard Inclusion.

Longer Answer: Basically, SharePoint is having problems finding this Site Collection in its search index. This isn't a problem when you have your Site Collection defined at the Root of your Web application, but it's a problem when you put the Site Collection at another non root spot. The reason for this is easy to see when you take a look at how SharePoint is searching.

Take a look at the search scope on the SSP. It will probably list something like this:

http://servername1:port/

http://servername2:port/

http://servername3:port/

What this means is that SharePoint will start at these sites and then go to the sub-sites from below. Normally, you will have a site at each of these roots and then go to the sub-sites in the directories below. But you don't have anything at http://servername1:port/ ; your site is at http://servername1:port/sitecol. So it can't be found by starting at any of the starting locations.

You have two options from this point on:

  1. Change your site index to include this site collection. This means that you'll have to put http://servername1:port/sitecol in the Search Index. That's pretty easy to do, but it requires that you have SSP admin rights (since this setting lives on the SSP) and you'll have to do it for each site collection.
  2. Change your Managed Access Path to include "/" as a wildcard inclusion. This will work across all site collections (so you only have to do it once) and only requires access to your Central Admin (hey, in *some* places you have access to CA, but not SSP). *However*, then all sites that match "/" are included in SharePoint. So if you put a /VirtualDirectoryOutsideOfSharePoint at root, it'll take control from your external app.

So, it's really up to you, which method you choose. If you're going for maintainability and you create tons of Site Collections, then I would definitely go with option two. But if you use a lot of VDirs at root, then you might want to avoid this option.

Either way, search is now working. And the job is done.

SharePoint Search “Unknown Error” Fix

This week I was in Waltham, MA doing a SharePoint Mentoring Session at the Waltham MTC*. The client was pretty fly (an international insurance company) and very eager to learn all about SharePoint. They peppered me with questions that I was, frankly, very happy that I could answer. One of the ones that I had to debug was the following: why am I getting "Unknown Error" when I do a top-level site search on a medium server installation.

Short Answer: To do search, the App Pool of your SharePoint Web Application must be a Domain Account.

Longer explanation: In a medium server installation, or any installation that has a DB on another Box, you are going to be accessing the DB over the network. Specifically, you are going to be accessing the SSPAdmin DB. To do this, the executing process (which gets its identity from the App Pool) must be able to authenticate over the network. Ironically, the Network Service on a local box will not have access to the DB (it will use the machine account Domain\MachineName$) from over the network. Look in your logs, you will probably get a notice that the machine account couldn't log in. The solution is to change the App Pool to use a Domain Account that has access to these DBs.

As a follow up, I don't know what other DBs that the App Pool Identity will need access to beside the SSPAdmin_DB.

Another search related post will come shortly (which solves a similar problem).

* MTC – Microsoft Technology Center: a Microsoft office with a boatload of servers. MS brings customers there to show how their products will run in an actual enterprise environment.

CUTC – “Technology Predictions” for 2007 deck

This past Saturday, Greg and I gave a presentation for the CUTC conference entitled "Technology Predictions for 2007." In it, Greg and I go into some of the "serious" trends we see happening in the upcoming year.

Thanks to everyone who turned out for the event, and special thanks to Andrea Richardson and Jackie Lee (our HR team) who set it up.

CUTC Technology Predictions - Office 2007

CUTC Technology Predictions - Office 2003

 

Edit: An attendee decided to email me a few photos, I posted them here.  More to come for sure.

Check us out at home.infusionblogs.com
We here at the Infusion blogger community are doing a weee bit of a renovation. In the meantime, check us out at our beta blog

home.infusionblogs.com

And specifically my blog at:

home.infusionblogs.com/kguenther
Document Information Panel
Check out how easy it is to customize the Document Information Panel inside of Office 2007 using InfoPath. This article leads you through an approximately 3 step process that should allow you to have custom Document Information Panels up and running.

Two things I've noticed:
1. It's even easier than I previously thought. If you don't want to customize the panel beyond the xml data being stored, it's quite simple. You can simply edit the Content Type and the Document Information Panel default form will automatically pick up the changes (including specialized drop down fields).

2. This walk through doesn't seem to work on my version of Beta 2 TR. Not sure if that's a bug across all copies, but I have seen it work on the RTM. Something to watch out for.

Some screens and maybe a video walk through are in order, I think. Hopefully, I can post them at the end of the week.
Stop reading my blog!
Yesterday, I was giving a technical interview for Infusion. This is a fairly normal occurance for me as I give about 3 tech interviews a week(Infusion is going through a period of record growth and is looking for candidates *all the time* - more about this to come soon).

But the candidate said something that made me laugh. When I asked him a BizTalk related question, he said "Oh, yeah, that's easy, like you said on your blog ..."

and suddenly it hit me that people might actually be reading this thing. I'll have to stop taking my tech interview questions directly from my blog.

For the record, the guy lost points for knowing the answer, but gained more for reading my blog. Kudos to you, blog-reader-candidate.
BizTalk Secrets: using Multi-Part Messages instead of directly using Schemas

This tip comes from Marty Waz (described yesterday in my post about Publishing as Web Services) .  As you’ll remember, I’m at the Virtual TS Boot Camp, where we did a simple BizTalk 101 project – Marty Waz Style.  Basically, it’s a Hello World Web-Services project, but using all best practices and done in 20 minutes.

Ok.  Not a problem.

But it turned out to be quite a problem.  The class is made up of mostly Virtual TS’s and actual Microsoft TS’s so it’s not like it’s a slacker group (although we’ve all run into the occasional bonehead TS).   Probably one of the best groups to program BizTalk outside of the actual BizTalk Server team at MS.   Anyway, enough praises – cause we sucked big time.  Not a single person was able to do the assignment even with extra time following all of Marty’s best practices.  Personally, I forgot to isolate the external schemas from the internal, used maps inside my orchestrations, and used Schemas directly as Messages.

Well, that last part is the topic of this post.  Marty showed us how to save an extreme amount of time by loosely coupling our messages inside our orchestrations.  No more messages of type schema.  It’s a little odd, so let’s start from the beginning.

Here’s the non-leet method: Create your orchestration.  Add a receive shape and a logical port.  Well, now I need a message.  Add a new Message in the Orchestration Explorer.   Set the Message Type to the schema you want.  Hook up your receive to that logical port.  Nothing out of the ordinary so far.  And let’s do something that should be pretty easy: change our schema type.  So we go to the Message, select the Message Type and select a different Schema.  We get the following error:

Property value is not valid: One or more Send or Receive actions are connected to Ports and are using this Message.  Please disconnect the actions before changing the Message Type.

Now this is a fairly common thing.  I mean, sometimes we change our schemas – during development this happens all the time.  The object oriented equivalent is changing variable “int foo” to “double foo” in code.  What if you couldn’t do that without removing all the references to foo.   That would suck.

Here’s Marty’s super hot way around this: Create your orchestration.  Add a receive shape.  Well, now I need a message.  ADD A NEW MULTI-PART MESSAGE TYPE.  Give it name that doesn’t include the schema –remember, you are using this as an abstraction over your schemas so you can change between types (Object oriented analogue: changing “int foo” to “double foo”).  Change the “MessagePart_1” to “Body” (CAPITAL B – it’s important).  Now set the Type for this to the schema you were going to use before.  NOW add a normal Message, name it, but instead of choosing a Schema for the Message Type, choose your Multi-part Message Type.  Use this message like you normally would.

Go ahead, try changing the underlying schema type.  Instead of doing it at the Message Level, you can do it at the Multi-part Message Type.   Your links are still valid because the ports are bound to the wrapper around the schema (multipart message), not the schema itself.  You have successfully changed from “int foo” to “double foo”.

Sounds pretty simple, but no one in the room knew it.  So I figured I would blog it so we don’t see any more of this in the field.  So, there you go, no more schema type messages, only multi-part messages.

[Editors note: this text is a little confusing without sitting down with an orchestration and trying it yourself.  I may post a video shortly that walks you through the changes.]

Can't publish orchestration as web service even though ports are Public

"But I swear my Two Way Ports are Public scoped"

Publishing an Orchestration as a Web Service: it's a common thing.  You create an orchestration; create a send-receive logical port; and try to expose via web-service.  Ah, but you forgot to make it Public scoped - by default it's Internal - no biggie.  Intuitively, per the error message you get ["There are no orchestrations with public receive ports in this BizTalk assembly.  Click back and specify a BizTalk assembly containing orchestrations with public receive ports."], you change the scope to Public and re-try the Publish Orchestration as Web Service.

But you still get the message that it's not public.

I have run into this a number of times, and I should be ashamed because I have listened to erroneous blog posts that tell you to re-write your project.  Normally, my projects are small enough that it doesn't matter.

But now, here's the canonical word on the subject - it comes via Marty Wazsnicky, Regional Program Manager at Microsoft and head of the Virtual TS program (which I am a part of).  Mix equal parts caffeine and BizTalk and you have Marty.  It's ashame he doesn't blog more often, because he's full of good information.

Anyway, to solve your problem Restart the BTSNTSVC.exe.  As Marty explains it, BizTalk 2006 uses .NET 2.0 caching for inspection of the Assembly that contains your newly public ports.  Thus, it never really inspects your new assembly and just relies on the old assembly (with Internal port scopes).  This is a dependency on the .NET CLR 2.0, so that's why this is a problem with BizTalk 2006 and not BizTalk 2004.

To sum up: Restart the service, the caching goes away and you can now create your service.

Thanks, Marty!

Kurt in Boston

Seems like there's not a lot of activity here - but I assure you there is..just not on the publish side.  I've gotten about 20 emails (and a related number of comments) from people who are running into problems with the SharePoint Forms Authentication.  Proves at least my setup isn't unusually bad ;)  In fact, my post on the "File Not Found" issue was translated into Japanese!

Right now I am outside of Boston (Waltham) getting training from Marty Waz from Microsoft in BizTalk Server 2k6.  Already both certified and a Virtual TS in BizTalk, but this is the code-until-you-drop-14-hour-a-day program that makes the VTS team worth its salt.  Hopefully will be able to blog a few lessons.

Speaking of blogging a few lessons, I have run into a number of SharePoint issues that I uncovered from our internal implementation and from our clients.  I'll be blogging them this week now that I have a "manageable" 14 hour a day schedule. *Gulps Coffee*  Hopefully I'll get a post out tonight - thinking SharePoint Forms Authentication and how it breaks MySites.

File Not Found (SharePoint Forms Authentication)

(This is the second post in a series on Forms Authentication in SharePoint 2007.  I announced this series a little while ago over here and continued it here)

This is an error that until today signaled the end of using Forms Authentication for a web application.  Every once in a while, after setting up an application to use Forms Auth, I would get "File Not Found" when I was redirected to the login.aspx page.  Not a 404 mind you, but simply a web page that said "File Not Found" (just the text, no SharePoint chrome).  Basically, whenever I tried logging in, I wouldn't even be given the chance - and since I needed to be logged in - it would effectively bar me from the site completely.

I didn't really have a good workaround for this until I really started digging through the SharePoint code to find out what was causing it.  I am not sure how wide-spread this problem is, but I've had seen it so far on all of my installations, so I thought I would post this fix below.  It's not supported by Microsoft and when I brought it to the internal SharePoint DL, they didn't really have a solution.  (Take note: before implementing the solution below, you should make a back up copy of login.aspx and authenticate.aspx):

Basically, the error is caused because the Microsoft.SharePoint.ApplicationPages.dll assembly is not accessible by the login.aspx or authenticate.aspx.  I noticed this by removing the following tag from login.aspx (under \program files\common files\microsoft shared\web server extensions\12\template\layouts): < %@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"% > (remove spaces between < and %).  This caused me to get compliation error, but it actually loaded the file.  So, throwing that tag back in, I just simply needed to make sure that the ApplicationPages assembly was available.

My solution was to toss the ApplicationPages assembly into the GAC (again, this is my work around hack - this "shouldn't have to be done" according to MS but they gave no reason as to why this file wouldn't be able to access the ApplicationPages dll in the first place).  You'll find the ApplicationPages dll under \program files\common files\Microsoft Shared\web server extensions\12\CONFIG\BIN. 

Next you should should be able to navigate to /_layouts/login.aspx and get your normal login page.  However, when you click the "Sign In" link from SharePoint this will take you to /_layouts/authenticate.aspx which will now give a similar "File Not Found" but this time with the SharePoint chrome.  Again, the ApplicationPages assembly tag is the culprit, so I replaced the stock < %@ Assembly Name="Microsoft.SharePoint.ApplicationPages" % > with the < %@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"% > from the login.aspx.  After I did this, the problem worked fine.

Again, this is something that you'll have to do on each server that is affected by this horrible problem.  It doesn't seem ideal, and yes it is probably a bug in SharePoint, but if you want to get Forms Authentication to work in Beta 2, this is the kind of hack you might have to do.  After I made this change, I never ran into the dreaded "File Not Found" exception again.

Do me a favor and shoot me an email (kguenther at infusiondev dot com) if you have run into this problem.  I'd like to see how many people actually come across this problem.

Couldn't find user error for Forms Authentication

(This is the first post in a series on Forms Authentication in SharePoint 2007.  I announced this series a little while ago over here)

One of the main problems I was having with SharePoint Forms Authentication was getting it to recognize and list users from my new authentication provider.  Once you switch authentication providers, you have to manually add the first authenticated user to SharePoint from the Central Administration.  The reason for this is quite simple: the normal administrator credentials you used before won't be recognized under the new provider - so you have no way to log into the site under the new provider.

But what I found was that after going to "Policy for Web Application" (the page where you manually add the first authenticated user), is that Central Administration can't list or recognize your new user names.  Being new to using ASP.NET provider model, I assumed I simply had the database set up incorrectly - not so.  I just missed one essential step: You must add the provider settings to BOTH the Web Application web.config and the Central Administration web.config.  I can't stress this last part enoguh.  If you don't add the provider settings to the central admin, you won't be able to access the new credentials store, and thus won't be able to add users.

Sounds pretty intuitive once you think about it (how else would Central Administration know about the new provider) and indeed SharePoint gives a warning about this (albeit a small one) on the left hand side when setting the provider on the Authentication Providers page: 

The membership provider must be correctly configured in the web.config file for the IIS Web site that hosts SharePoint content on each Web server. It must also be added to the web.config file for IIS site that hosts Central Administration. [Emphasis mine]

But to first time users of Forms Authentication in SharePoint (which we all are), this is a little counter-intuitive.  We kinda assume that adding the provider details for the individual Web Application is enough.  And indeed, I think the central admin web.config will become bloated with providers from every site that it's managing.  All in all, I think it's a poor choice to rely on the central admin web.config and not using the web.config of the individual sites, but I am sure there are specific reasons why MS chose this model.

I think I'll file this under "things you'll probably run into if you're doing SharePoint Forms Auth."  Next up in this series, the infamous "File Not Found" exception you will probably run into if you do Forms Authentication enough.

InfoPath Forms Services - Can't publish form

I'm currently working on a Federal Disaster Recovery Collaboration demo that heavily leverages InfoPath and Forms Services from Microsoft Office SharePoint Server 2007.  If you're not familiar, MOSS 2007 and Forms Services allows for InfoPath forms to be displayed directly in the browser.  Normally, Forms Services works out of the box, but the other day I ran into a bit of an odd situation.

Heres the error that I got:

 

This form template is browser-compatible, but it cannot be browser-enabled on the selecte site.  This may be caused by one of the following reasons:

  - The server is not running InfoPath Forms Services

  - The necessary features are not available on the site collection

  - The policy setting on the server does not allow users to browse enable templates.

The solution seemed pretty straight forward: enable Forms Services on the Site.  Looking at the suggestion from InfoPath, perhaps I didn't have the SharePoint feature that allows Forms Services on my site.  So, I went to the SharePoint Features page under Site Settings and activated the Office SharePoint Server Enterprise feature. Rerunning the publishing Wizard, I expected this to fix my problem ... but it didn't.

This turned out to be a bit of a noodle scratcher until I realized that although I enabled this feature on my subsite that I was going to publish to, I didn't enable it on my Site Collection.  So, the solution is enable Forms Services on the Site Collection (Site Settings -> Site Collection Settings -> Features).  Since I was trying to publish initially to the site collection, it rejects the form (even though the subsite could publish).

Now why did this work out of the box before on my previous installations?  My previous installations used the Corporate Intranet Publishing Site as a template for the site collection; the broken one used the Internet Presence template.  The difference here is the the Intranet Publishing Site activates these features by default - Internet Presence does not.

So the lesson here is: if you're going to use Forms Services on an Internet Presence site, activate the Office SharePoint Server Enterprise on the Site Collection first.

How to speed up alerts in SharePoint

SharePoint 2003 had alerting functionality, whereby a user could subscribe to a list and would get an email alert if anyone changed the list.  Basically, it was useful if you had a document library and you wanted to know when someone posted to it.  I personally found this feature to be annoying at best, but apparently everyone else found it to be a super useful.

Well, now alerts form the basis of Workflow tasks in SharePoint 2007.  And if it's not abundantly clear, I absolutely *love* using workflow in SharePoint.  I thought that Workflow would handle it's own emails, but it turns out that by default it uses two different types of emailing systems:

  1. Code emails: these emails are genrerated directly in the workflow.  An example is an email the user get when a workflow is kicked off.
  2. Task alert emails: these emails are generated via the Alerting system.  An example of this is the alert that user gets when a Task is waiting for him.

To my dismay, there was a distinct difference between these emails: code emails were fast, task emails were dead slow.  Turns out the problem is not confined to Workflow.  By default, alert emails in SharePoint are throttled to being sent every 5 minutes.  For most people, this is apparently acceptable - but for real time demos it's a deal breaker.  I can't wait 5 minutes for SharePoint to send me an alert.

Apparently, there's a way to change this.  Originally, this help comes from David Mann (dave at brandywinegroup.com) in the betanews workflow group.  He clued me in that there's a setting in SharePoint that throttles the email.  He didn't remember the command to fix it, but I found that tip here.  Basically run this stsadm command:

stsadm.exe -o setproperty -pn job-immediate-notification -pv [minutes]

I haven't tried setting this lower than 1 minute, so I am not sure whether zero is a valid option, but 1 minute is fast enough for me.  Now both types of email are pretty much instantaneous.  Certainly, a worthwhile setting for anyone expecting SharePoint instantaneous alerts to be really instantaneous.

Atlas and Ajax - coolest 18 minutes I've seen in a while

Since Ajax and Web 2.0 is getting really hot - I figure I should put this up here.  It comes via Syd's blog, so mad props to his post.  Originally, it's from Scott Guthrie and it shows how you can create a full ATLAS application using zero C# code.  For the uninitiated (which was me a short while ago) ATLAS is the Microsoft tag system that brings AJAX functionality to the ASP.NET framework.

So check out this video.  You're not going to be sorry.

Hopefully, I'll be able to add some of my ATLAS experiments up here soon.  ATLAS in SharePoint - that's the dream: just need to find the funding.    

Virtual Server Undo Disks - I am never going to use you again  (Can't Merge Disks - Parent Disk is a part of a Saved State)

I have been monopolizing the Virtual Server (sweet 8gb dual processor machine) at Infusion lately.  I've been running some heavyweight VPCs (MOSS 2007 / Exchange 2007 / LCS 2005 and a few others) which require about 2gb to run nicely.  The problem lies in the way I've been backing up our development work.  Usually, when I work on my machine locally, I turn on undo disks and simply merge changes when I know I am in a good state.  If I screw up, well, I can always just discard the undo disk.

Now this is nothing Earth shattering.  It's almost a standard best practice for those who use VPC.  But what does undo disks buy you when you have virtually unlimited storage: nothing but headaches.  The whole point is keeping a safe copy of the code - and well, if you have the storage space, why not simply make a full copy of the virtual hard drives themselves?

And after the error below, that's exactly what I'm going to do from now on.  When I do personal development on my laptop, I am going to use undo disks, but on the server I am going to leave them off.  Undo disks just slow performance and create headaches when they don't merge.  So now on to the error.

"Virtual Server was unable to commit the changes made during the current session of "[VPC NAME]". The cause of this problem is that the parent virtual hard disk is a part of a saved state. Your changes will be kept for the next time you start this virtual machine."

If you search google for this, you come up with almost nothing.  But there's a critical post right here about it.  It spells out exactly what you need to do, but foolishly I ignored it and kept looking for a better solution, since I didn't understand the concept of "inspecting" a virtual disk.

The basic steps are:

  1. Rename the undo disks to *.vhd.  This turns them into a virtual drive in the eyes of Virtual Server.
  2. Click on the Inspect option in the Virtual Disk section of Virtual Server.  There should be an option to then merge the disk.
  3. Select a new disk to merge into.  If you try merging into the original parent, Virtual Server will just give you the above error again.
  4. Take your newly merged virtual disk and replace it in the virtual machine (i.e. replace the parent that was couldn't be merged to before).

That's it.  Pretty simple, but since I didn't know this option was there (very rare to have to merge into a completely new disk) it completely eluded me.  Well, I won't have to worry about this with Virtual Server anyway, since I am going cold turkey off undo disk.  They are only for smaller environments.

Business Scorecard Manager error - Not using Domain creds for Database

I ran into a bit of a problem trying to import a Business Scorecard file today.  After importing the cube file, I successfully opened the Business Scorecard Workspace (.bsw) file.  However, when I tried to Publish All I got the following error:

"The database connection failed.  Please contact the administrator."

Being the administrator, I figured I should probably fix this myself.  I assumed the problem was with the defined datasource not being able to hit my server.  Since I imported the database myself, I figured I simply had to update the name.  Not so, I found that the name under Data Sources was the same, but when I tried to set the name again, it the Business Scorecard Manager gave me the following error:

"The Business Scorecard Manager server could not connect to the data source.  Verify that all of the required data has been entered in the boxes and that the connection information is correct."

Well, the key here is that the Business Scorecard Manager SERVER could not connect to our database.  After checking out the credentials of the BSM web service app pool, I found it was using the Network Service.  This did not have access to the SQL server I was using.

Solution: Change the app pool identity to be a (domain) account that has access to the SQL Server.

That basically did it.

Props to this conversation which pointed me in the right direction: http://www.eggheadcafe.com/aspnet_answers/officebusinessscorecardmanager/Jun2006/post26979401.asp

1 - 30 Next