hey everyone

well today i had a problem with infopath 2007 + vsta. I needed to develop c# in an infopath form.

Well it seemed that i was unable to do so because VSTA wasn’t installed, or so it seemed.

You can find many blogs saying uninstall infopoth program with frame 2.0 node , install framework 2.0 and install the office node back.

Well no good, still didn’t work.

In the end i went looking for the vsta.exe on my disk, well guess what, I did find it, so what was the problem you ask?

Office in all it’s supreme knowledge install it in the wrong dir

I was using windows server 2008 R2 (64bit ofcourse) and office 2007 installed the VSTA in “program filesMicrosoft Visual Studio 8Common7IDE and here comes the punchline

it need to be installed (or copied in this case) to “program filesMicrosoft Visual Studio 8Common7IDE”, without the (86x) part

This problem kept me busy all day so I hope that this blog saves some time for somebody…..

kind regards


I’ve been extremely busy with new work, working in a recently bought appartement and going to the MS Techdays in Antwerp.

Lotz to blog about so soon to come 🙂

kind regards

InfoPath cannot open the selected form because of an error in the form’s code. The Microsoft .NET Framework 1.1 is not installed on your computer

or the InfoPath primary interop assembly (PIA) is not registered. Use Add or Remove Programs in Control Panel to make sure that Microsoft .NET Framework 1.1 is installed

or install it using Windows Update, then run Setup again to confirm that .NET Programmability Support is installed, or contact your system administrator.

 This is the most complete error I’ve ever received, BUT it’s not the same error I’ve received 🙂

Atleast not as detailed. 

 If you have this error or something that looks like it. 

You’ll have to put the Office 2007 cd in, select add/remove features , go to infopath and select the “.net programmabilty”.

 first uninstall it and than install it again. 

It could be because Framework 1.1 or 2.0 wasn’t installed when Office 2007 was installed. 

(although this situation seems highly unlikely)

Hope this helps someone

Today I had a strange problem. 

I had 2 peopleEditors and I needed to check if both of them didn’t had the same value. 
If this was the case an error should appear, whether this was via a label or errormessage from the peopleEditor. The error needed to be shown. 

So the test is in applychanges event (could be syncchanges event, but this event is also run when the toolpart is opened). 
The problem was that the toolpart did the check and wrote a message that the 2 editors contain the same info but still continued to exit. So I had to stop the exit. 


Throw an exception 🙂 , just as simpel as that. The user will not see the exception only the error message. 
But I believe that this isn’t the best solution but it’s the only one I could find. 
If someone has a better method please post it. We’re all learning 😉

Kind regards 

hey everyone, 

Well this is a relative quite easy assignment no? 

How can you find the site directory URL in SharePoint without laying a path to it hardcoded. 

Well the answer is, you’ll have to put the SiteDirectory url in the CentralAdmin (Operations -> Master Site Directory). 
To retrieve this information you’ll need some admin rights to get it. Ofcourse normal users don’t have these rights. So elevation is needed here. 

SPFarm farm = null;
                PortalService service = null;
                SPWebApplication app = null;
                string URL = SPContext.Current.Site.Url.ToString();
                using (SPSite site = new SPSite(URL))
                    System.Uri uri = new System.Uri(URL);
                    app = SPWebApplication.Lookup(uri);

                    farm = app.Farm;
                    foreach (SPService spservice in farm.Services)
                        if (spservice is PortalService)
                            service = spservice;

                    GUID siteguid = new Guid(service.MasterSiteDirectorySiteId.ToString());
                    GUID webguid = new Guid(service.MasterSiteDirectoryWebId.ToString());

After this is it pretty easy, you’ll need to look for the “Sites” list et voila the rest is easy. 
The hard part was to figure out which service contains the information. And it appeared to be the PortalService. 

Hope this helps someone. 

Kind regards 

Well after some search SPMarcel (short for SharePoint Marcelleke) has found a solution to a problem that we had.

I’m currently working with a client that needed a parser that parsed all kinds of different files and retrieve the information accordingly. While defining the site structure with a colleague is where the problems began.
They need a lookup in the same site BUT  also needing a lookup to the parentsite.

Needless to say that this is quite hard to realize. When building an STP the lookup is to the document library of the site where you pulled the STP from. Also building the solution via Code or CAML didn’t prove a solution so we had to make descissions cancelling a few lookups.

So on we went building the site. We used Solution Generator which proved to be a great tool.

We are now at the point that we create a blank site via code BUT after that activating a feature so that all the lists/document libraries with the list content types and columns is generated.

Here is where it goes wrong.

In my parser I automatically upload all the files to the correct document library.

And suddenly my parser uploaded one file and crashes after that (not when uploading my file but adding the metadata), where in the old (read created via gui) solution it could parse 3000 files.

So after some debugging the error was found: ” The URL ’FileName’ is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web” .

Well good luck hunting 🙂

After a while of making google our best friend we found a blog (http://yasirbutt.spaces.live.com/blog/cns!A8677D5751E6B4DA!958.entry) also describing the same error but with a twist.

In this blog they are doing a migration from SPS 2003 to MOSS 2007 , not quite the same but the world isn’t perfect.

The key phrase in the blog however is “The problem is with SharePoint Solution Generator”.

This is interesting, no? The Sharepoint world says that this is one of the best tools out there, but it seems that this has a big flaw in my eyes.

I mean ok, nobody is going to make a schema.xml on his own, a tool that generates it is good enough.

It seems that the solution generator automatically assigns colname=”nvarchar” and colname=”ntext” fields (n is for a incremental number) to the schema.xml. Why this is I don’t have a clue (if somebody can explain to my why it’s added but when removed you don’t see a difference?) .

But this is where my solution comes from. After removing ALL the fields with colname=”nvarchar” and “ntext” in the Fields tag and rebuilding my WSP and installing it. Everything workes fine.

So many thanks to jerry for this one.