Posts Tagged ‘Windows 7’

Dear all,

With LightSwitch, currently you can consume different data source types:


  • Database
  • SharePoint
  • WCF RIA Service

So far, so good. Upon a fresh installation, I set up a custom list. The goal was to consume the SP2010 list in a LightSwitch Application, as a data source. Using the Add Data Source wizard, I came until I entered the server address and my credentials on the server. Then, the Choose Your SharePoint Items window issued a message like:




With the small but all-telling message that what we need is a running SP2010 with the WCF Data Services installed. Obviously, I didn’t have this installed, so I went to install (as recommended) the CTP2 of the ADO.NET Data Services v1.5. In the good hope that it would work now, I tried again – but not a chance. I tried also to access the data services via browser, but this way it would issue only the following message:




Again, not a chance. So, I went for installing the following:


ADO.NET Data Services Update for .NET Framework 3.5 SP1 for Windows 7 and Windows Server 2008 R2


Since I am running Windows Server 2008 R2 on my VM, I took the choice above. If however you are running a different OS than the ones mentioned above, you might want to have a look at the following link:


ADO.NET Data Services Update for .NET Framework 3.5 SP1 for Windows 2000, Windows Server 2003, Windows XP, Windows Vista and Windows Server 2008


And here we went! Adding a datasource using LightSwitch, I got the a list of all available SP lists, as expected, and could add them as a datasource. One more thing that was bothering: When defining a custom list, specifying a column of type




Then LightSwitch Beta1 will import this list as a table where the column of type Number is always of type Double. Also, changing the list column type to number with 0 decimals won’t change this behaviour. Obviously, if then we try to create relationships in LightSwitch with tables from other data sources, we have a problem. I hope there exists a workaround for this not-so-much-desirable behavior.

Important notice: Before installing the above mentioned ADO.NET Data Services Update, please consider that the server will need to be restarted for the changes to take effect!

If you install the data services AFTER your SP2010 installation, then you might also to run the iisreset command. Of course, running all the installations and commands mentioned require attention and contain potential harms that are to be carried out at your own risk.


I wish you happy Lightswitching and SharePointing till the next time! 😉


Best regards,


Read Full Post »

Howdy folks,

We’ll have to make this a quick post, since I am only on for a 15 mins break at the SPOC 2010 conference ;-). I prepared a few things, and now I am putting them together.

First of all, I hope you enjoy as much as I do the concept of having VHDs under Windows 7. For those who don’t know where to get started, go to Computer –> Manage –> Disk Management (shown in Figure 1)


Figure 1: Disk management. Right-click in order to create or attach VHDs.

And this is where the problem resides. Everytime you want to mount your disks, you have to enter here and execute “Attach Vhd” manually. Not cool enough for us.

The solution: A script, executed as scheduled task (run as Administrator)

These are the steps:

  1. Create a script that calls the diskpart commands
  2. Call the script from a batch file
  3. Create a scheduled task for it.

Sounds simple? It is!

1. Create a script that calls diskpart commands.


Figure 2: The attachScript.txt script file.

2. Call the script from a batch file


Figure 3: The corresponding batch file: Just calling diskpart with the /s switch and the script file from Figure 2

3. Create a scheduled task for it


Step 1: Start –> Accessories –> System Tools –> Task Scheduler


Step 2: Set the following fields (Tab: General):

  • Name: Choose what you like. Here: “Mount Vhds”
  • Security options (1): Change User or Group –> Choose an Administrator!
  • Security options (2): Run whether user is logged on or not – makes sense. We don’t need the admin to be logged on for us to access our Vhd, right?
  • Security options (3): Do not store password. You can optionally set this.


Step 3: Set “Begin the task” to At startup. Now our task will run at startup.


Step 4: Specify which file to run (our created batch/AttachVhds.bat). Confirm by clicking on OK.

That’s it! We’re done! From now on, each time we start the computer, our created task will run!

Important: This is not the most elegant way of automating such a thing, but at the moment there is not a lof of choice under Windows 7. For Windows Server 2008 R2, you can also perform this functionality using PowerShell (and not diskpart/batch files etc.).

I hope you enjoyed this quick tutorial!

Cheers & best greetings from Milan,


Read Full Post »