Archive for June, 2009
Tip: Convering your Virtual PC 2007 disks to Windows Virtual PC (on Windows 7)
June 29th, 2009 by Tobias Zimmergren
Author: Tobias Zimmergren
URL: http://www.zimmergren.net
Introduction
As you all know, most of the SharePoint people (architects, developers, testers, designers, <etc>) are running our environments virtually. That rocks! But, there’s some things one need to think of when you want to migrate your VPC to Windows 7.
I just "migrated" all of my Microsoft Virtual PC 2007 virtual machines to Windows Virtual PC which is a feature set for Windows 7.
While doing so – I bumped into one major PITA which I now want to share so you can get around it if you’re converting as well…
The problem & solution
You would think that you can take your .vhd files and simply launch as normal in Windows 7. Although that’s not untrue, there’s something you’ll need to do first if you want to have full Windows 7 integration support:
Uninstall Virtual Machine Additions before you even open the VHD file in your Windows 7 Virtual PC setup.
Basically, all you need to do is uninstall the additions in Virtual PC 2007, copy your .VHD file to your Windows 7 machine and then hook it up as usual with your Windows Virtual PC setup there.
If you do not do this, you will not be able to install the Integration Features of your Windows Virtual PC on your virtual disk.
With that said, just uninstall on VPC 2007 - move - install on Windows 7 VPC. Then simply install the integration features.
Note: Failing to do this, will most certainly get you to a stage where your Virtual Machine can not copy/paste, you can not drag’n'drop things, you can not get a full integration with your normal desktop.
Thanks to Daniel Sörlöv for tipping me of about this, it saved me tons of time!
Beer-ticker says +1
- Posted in Technical
- No Comments
- Tags: Virtualization
SharePoint: Recommended links June 2009
June 29th, 2009 by Tobias Zimmergren
Author: Tobias Zimmergren
URL: http://www.zimmergren.net | http://www.tozit.com
Introduction
I previously posted a short post about some good links around SharePoint. It proved to be a popular post. Not only providing a set of good posts, but actually pointing to good posts that is worth reading instead of having to pile through those 200 new posts/day in the RSS reader..
With that said, here’s yet another bunch of recent articles that I would like to recommend.
Recommended links, in no particular order
- Chris O’Brien’s Checklist on SharePoint Optimizations
Chris is talking about how you can optimize SharePoint and most of all – where you can find resources for optimization. He provides us with some insight in what his checklist looks like and gives us some tips and tricks on the way to get there!
http://www.sharepointnutsandbolts.com/2009/06/my-checklist-for-optimizing-sharepoint.html - Waldek Mastykarz writes about different approaches to retrieve items from SharePoint lists
Waldek provides us with some insight on different ways to retrieve items from SharePoint lists, and what performance the different approaches may have.
http://blog.mastykarz.nl/performance-methods-retrieve-list-item/ - Wictor Wilén writes about six ways to store settings in SharePoint
Wictor talks about storing setting-values in different ways.
http://www.wictorwilen.se/Post/Six-ways-to-store-settings-in-SharePoint.aspx - Sahil Malik writes about SharePoint Debugging
Sahil has provided us with a great resource for learning more about SharePoint debugging.
http://www.code-magazine.com/Article.aspx?quickid=0907041 - Video: Sahil Malik talks about Silverlight and SharePoint
Sahil demonstrates how easy it is to incorporate Silverlight in SharePoint
http://www.dnrtv.com/default.aspx?showNum=142 - Bob Mixon writes some good thought about IA in SharePoint
http://masteringsharepoint.com/blogs/bobmixon/archive/2009/06/27/sharepoint-ia-store-information-close-to-the-point-of-ownership.aspx - Tobias Zimmergren writes an introduction to getting up and running with BDC in SharePoint
Since this article was proven to be highly popular, I’m pinning it down to this list as well!
http://www.zimmergren.net/archive/2009/06/25/sharepoint-bdc-part-1-getting-started-with-the-business-data-catalog.aspx
I’ve read hundreds of great resources the last month, but I can’t list them all here (that’s what your RSS-reader is all about..) – but if you feel that you’ve got a great article or resource that was published in the last month which is worth highlighting, ping me.
- Posted in Misc
- No Comments
- Tags: Links, SharePoint
SharePoint BDC Part 1: Getting Started with the Business Data Catalog
June 25th, 2009 by Tobias Zimmergren
Author: Tobias Zimmergren
URL: http://www.zimmergren.net | http://www.tozit.com
Introduction
In this article I will guide you through the very basics of getting started with Business Data Catalog, BDC:
- Install the AdventureWorks 2008 Sample Databases
- We will use this database as our example for retrieving data using the BDC.
- I will step you through the simple process of creating your ADF (Application Definition File)
- We will use this file as our import connection
- I will guide you through how we can import this ADF file and create our BDC Application
- Lastly, I will guide you through the process of creating a basic site and use some of the basic BDC Web Parts
Install the AdventureWorks sample database
- You’ll need to go and download the AdventureWorks sample databases
- Just finish the installation by clicking next a couple of times and let the installer do it’s normal Microsoft-installer magic.
- You should now see a couple of new databases in your SQL Server Management Studio:
AdventureWorks, AdventureWorks2008, AdventureWorksDW, AdventureWorksDW2008, AdventureWorksLT, AdventureWorksLT2008
Alright – We’ve got our databases, now we need to start thinking about how we will get data from our SQL server into SharePoint. This is done by creating/generating an Application Definition File (ADF) as you will see in the next section.
Creating the ADF (Application Definition File)
Alright, there’s a few different options to create your ADF (Application Definition File). I will show you how to get started with using the free tool called "Application Definition Editor" that comes with the latest SharePoint Server SDK.
Note: See the bottom section in this article for a summary of links to all resources mentioned in the article.
After you have installed the latest SDK, you can choose to install the "Microsoft BDCTool" located here by default: "C:Program Files2007 Office System Developer ResourcesToolsBDC Definition Editor". Which will give you the following item in your Start Menu:
Launch the BDC Application Definition Designer
Click the application and launch the editor. You will see an interface like this:
Create or import your ADF file
There’s basically two alternatives when it comes to editing an ADF (Application Definition File).
One is to create a new one (which I will guide you through first), and the other is to import an existing one (which I will show you after the first alternative).
Alt 1) Creating our own ADF file
Now we’re going to connect to our newly created sample-databases and create an ADF file for use with those databases.
- Click on ADD LOB System
- Choose Connect To Database
- You will see a nice popup-dialog where you will be able to enter the connection details to your desired database
- You are presented with the "Designer Surface" that looks something like this:
- In our case, we’re going to use the table called "vEmployee" which exist in the AdventureWorks database in order to pull out some information about our employees.
- Search for the table called vEmployee and drag it out to the Design Surface
- Search for the table called vEmployeeDepartments and drag it out to the Design Surface
- It should look something like this:
- Make any necessary changes, then click OK
- You’ll see a view similar to this one after some tweaking:
- After you’ve done the necessary changes to your configuration, making sure it’s a valid ADF with proper filters, enumerators and methods or whatever you need in your application then smile, because we’re done with that part!
Alt 2) Importing an existing ADF file
If you don’t want to do everything from scratch or you’ve already got an ADF file that you wish to modify, you can do so by importing an existing ADF file into the Definition Editor. Here’s how:
- Open the BDC Definition Editor tool, then click the "Import" button in the menu:
- Browse to your existing ADF file and choose to import it. Simple as that.
(I am importing a file called BDCAWDW.xml, which contains definitions for Product, Reseller, ProductSubcategory, ProductCategory as shown below) - You’ll see the imported ADF file’s structure immediately in the designer, under the prerequisite that your SQL connection string in the ADF file is valid:
Note: I will not detail how you create filters, finders, methods etc. in this article. You can read more about that here:
http://msdn.microsoft.com/en-us/library/ms145931(SQL.90).aspxI may cover the topic of ADF-functionality in another article later on.
Generate the ADF file from the designer
I really don’t need to tell you this, but there’s a button called "Export" which you use to export the definition you’ve created using the definition editor to an xml file:
Import the ADF file
If we have gotten this far, we might as well get the last few bits in place.
What we now need to do is to import our ADF file into SharePoint, since that’s where it should reside. Follow along with these few simple steps to make sure you’re properly importing your file into SharePoint.
- Navigate to your Shared Services Provider Administration site (You can access your SSP through Central Administration)
- You are presented with a section called "Business Data Catalog" where you’ll find a bunch of different alternatives.
- Make sure you have the permissions to modify the BDC (See the link Business Data Catalog permissions)
- Click "Import application definition"
- Browse for your .xml file and click "OK":
- You’ll see a progress bar (You don’t see that a lot in SharePoint. I love it!), telling your how the import process is going:
- When it’s done, you’ll click "OK" and be presented with an overview of your imported BDC Application:
Configure permissions on the BDC Application Definition
In order for all users to be able to select/read data from your BDC Application, you’ll need to make sure they’ve got the appropriate permissions to actually do so.
Usually I do this setting on each of the imported entities, in case you want specific permissions on different entities – instead of on the entire application.
- Select the DropDown list on your first entity and choose "Manage Permissions":
- Choose "Add Users/Group":
- Enter "NT AUTHORITYAUTHENTICATED USERS" and choose "Select in Clients":
- Repeat these steps for the other entity as well.
- You’re done.
Now we have created or imported an ADF file with the Business Data Catalog Definition Editor tool, exported it to an .xml file, imported it into SharePoint, set basic permissions on the entities.
Next, we should make sure that the application works in SharePoint by adding a Business Data Catalog-WebPart to a page.
Use the basic built-in BDC Web Parts
Awesome. Now that we have gotten this far by importing an ADF file into SharePoint and set appropriate permissions on the entities – We’re ready to actually use the ADF connection to view stuff in our database.
Note: I have created a new blank site where I can easily show the built-in BDC Web Parts – so that’s where I am adding my Web Parts.
- Add two Web Parts to your page called "Business Data List" and "Business Data Item":
(Note that when you’ve configured a BDC application, you’ll see the Business Data web parts)
- Choose to edit the properties of the Business Data List Web Part:
- Click the Browse-icon to the right to pop up the BDC entity chooser:
- It will present you with the following interface (note, BDC applications will of course vary depending on what you have imported..):
- Double click the "Employee" type, and then click "OK" in your Web Part property window.
- Repeat this process for the "Business Data Item" Web Part, and select "Employee" in the BDC Type Picker as well.
Now we’ve got one BDC List Web Part which will list all employees, and one BDC Item Web Part that will display details about the employee we select.
In order for this to work we must connect the two Web Parts.
Test our BDC Application out, and make sure it works!
- Choose "LastName" then "contains" and enter "smith":
- Select one of the results by clicking the radiobutton to the left, and see that the result (details) about the Employee shows up in the connected Web Part:
Resources and links
- AdventureWorks Sample Databases [This is the one I've used in my sample]
- Microsoft SQL Server Community Projects & Samples
- ADF Reference
- Complete Sample ADF File
- SharePoint Server SDK
Summary
This article is a basic step-by-step guide to getting started with BDC in MOSS 2007. I’ve shown you every step from creating the databases required (in our case some sample databases) to creating the ADF file and to finally utilize the BDC connection from a site, using the BDC Web Parts.
In an upcoming post I will talk about how you can create your own BDC Web Parts! Keep your eyes open!
- Posted in Technical
- 7 Comments
- Tags: BDC, How-To, MOSS, SharePoint
Announcing TOZIT
June 14th, 2009 by Tobias Zimmergren
Author: Tobias Zimmergren
URL: http://www.zimmergren.net | http://www.tozit.com
Note: Generally I don’t like to "promote" things in my blog, rather staying objective. But this is too good not to mention – so bear with me a couple of minutes while you read through this post
TOZIT is born
After many years in the IT business it is with great pride I am now announcing TOZIT. This business has been running for a couple of years and was in the beginning of 2009 renamed to TOZIT.
TOZIT has a main focus on Microsoft technologies with a strong love for SharePoint and .NET techniques.
What we do
- Consulting
- SharePoint architecture, development, customizations and general implementations and solutions in projects that ranges from small to enterprise.
- Implementations with project management, issue tracking, document management that follow ISO standards and a variety of other niches are some of the things we have done.
- SharePoint consulting one of our main focus areas at TOZIT.
- Training
- We conduct SharePoint and .NET training in various forms. With a close collaboration with one of the largest training centers in Scandinavia, we can make sure to meet any requirement the customers may have.
- Our Microsoft Certified Trainers make sure to deliver quality training.
- Products / Custom development
- Building products on .NET and SharePoint technologies is something we have experience with, and love to do.
Partner network
TOZIT is collaborating with a few selected partners, making sure no assignment is too large to handle.
Contact information
To get in contact with us, please use the below details:
E-mail
tobias@tozit.com
Visiting address:
TOZIT
Norra Vallgatan 20
SE-211 25 MALMÖ
SWEDEN
- Posted in Business
- No Comments
- Tags: Business, TOZIT
Debugging your code execution for anonymous users in SharePoint
June 5th, 2009 by Tobias Zimmergren
Author: Tobias Zimmergren
URL: http://www.zimmergren.net
Introduction
Often when developing solutions that has anonymous users enabled, it can be hard to debug them from your local machine – because when you reach a point in your code where permissions higher than anonymous is required, SharePoint automatically tries to identify the user.
This means that if you’re running local development, and is browsing as an anonymous user – everything can be fine until you hit a line of code in your application that requires authentication, you are then automatically logged in.
This makes it rather hard for anyone to truly debug their solutions in anonymous mode.
With this article I’m laying out the tips that I’m using to debug application requiring anonymous users, and making sure that I don’t step up my privileges if the application needs to – I will now get an access denied instead.
Featured Solution that I am using
- Enable Anonymous access for your web application
- Enable anonymous access for your site and lists
- Enable Remote Desktop on your development machine
- If it is a virtual machine, you’ll also need to give it access to the internet or at least the local network so you can RDP to it using Remote Desktop.
- Hook up your Visual Studio debugger to the IIS worker process so your breakpoints can hit
- Use the web browser on your LOCAL machine (not the development machine) to browse your site (remember, it has to be an IP reachable from the local machine – make sure your network settings are valid)
- This ensures that whenever you hit a point in your code that doesn’t allow anonymous users, it can not impersonate the account of the logged in user, which will result in an access denied exception. (Yes, this is where your breakpoints and debugging skills come in)
- Now, when the breakpoint has hit – simply remote to your development machine (or use the lagged-out funked-up VPC console.. (no, use RDP!!)) and step through the code, as the breakpoint has hit!
Summary
Debugging anonymously accessible code can be a bit of a pain, but following my mentioned recommendations should make it a bit easier.
I tend to use this technique whenever I’m playing around with anonymous access, least-privilege code and things like that.
Hope it can help someone.
- Posted in Technical
- No Comments
- Tags: Anonymous, Debugging, How-To, MOSS, SharePoint, WSS
Sweden SharePoint User Group, May 28th Re-Cap
June 5th, 2009 by Tobias Zimmergren
Author: Tobias Zimmergren
URL: http://www.zimmergren.net
Introduction
On May 28th we held our Sweden SharePoint User Group meeting in Stockholm with great success.
Sponsoring the event for the evening was Precio, who had an arsenal of food and drinks layered up for us to dive into in-between sessions.
With that said, thank you Precio for lending us your time, place and beer.
What was said / Agenda
During the event, we had three main sessions:
- SPVisualDev by Tony Restaino (Precio)
- During this session, Tony did a great demonstration of how his CodePlex tool (SPVisualDev) can help you as a developer to complete your tasks a bit faster. A great complement to WSPBuilder!
- Microsoft Certified Master by Peter Williams (Microsoft Sweden)
- As the only one in Sweden who is a Microsoft Certified Master on SharePoint, Peter did an awesome job describing what the MCM program is all about.
If I can get hold of the presentation from Peter I will have this article updated with links to it.
- As the only one in Sweden who is a Microsoft Certified Master on SharePoint, Peter did an awesome job describing what the MCM program is all about.
- Nintex Workflows by Mikael Bolin (HumanData)
- Giving us a brief overview of what Nintex workflows bring to the table was clearly appreciated.
Post-Session Photos
And the real reason for this post is so I can show you some photos of the event!
Thanks to Tony for shooting some great pictures of the event – please bring this amazing camera next time
Summary
Remember, attending our User Group meetings is 100% FREE OF CHARGE! You can find more information on www.sharepointcommunity.se and sign up if you’re not a member already. You will then receive an email next time we will organize a meeting!
We organize meetings in:
- Stockholm
- Göteborg
- Malmö
- (other locations where it may be fun and there is an audience)
If you have any thoughts about future meetings, about being a presenter, about having a meeting in your city, about sponsoring a meeting or about anything at all – please send me an email at tobias@zimmergren.net and I will set it up for you.
Thanks for reading.
- Posted in Misc
- No Comments
- Tags: Blogging, SSUG

