Pages

Monday, September 27, 2010

WP7 Ads

Definitely not the best way to promote Windows Phone 7:


The sad part it's that somebody (hope not Microsoft) paid for this ads when it's common sense that this is a crap.

Thursday, September 23, 2010

SharePoint Server 2010 “System.ServiceModel.EndPointNotFoundException” in OWSTimer.exe

If you get this error on your SharePoint Server 2010 development machine – ""System.ServiceModel.EndPointNotFoundException” in OWSTimer.exe – then you probably need to manually start the ForeFront Identity Manager Service – it did the trick for me …

SharePoint Stef provided the solution (and additional explanation) in his blogpost – SP2010 “System.ServiceModel.EndpointNotfoundException”.

Building a claims viewer webpart for SharePoint 2010

When running through the MSDN article – Claims Walkthrouhgh: writing claims providers for SharePoint 2010 – I noticed that it did not clearly showed how the webparts where build which showed the overview of the claims for a specific request. Reza pointed me in the correct direction by sending me the link to a post from Steve Peschka (a must read blog for people who work with SharePoint and claims) – Figuring out what claims you have in SharePoint 2010.

Some things you should know when you try to build a claims viewer webpart of your own:

The code is actually pretty simple – you can use a Visual Web Part (new in 2010) or a standard webpart – here’s a snippet

IClaimsPrincipal cp = Page.User as IClaimsPrincipal;   
if (cp != null) {
IClaimsIdentity ci = (IClaimsIdentity)cp.Identity;
foreach (Claim c in ci.Claims) {
sb.Append(c.ClaimType + " " + c.Value + "<br>");
}
}



Have fun ….


Wednesday, September 22, 2010

WP7 Application Settings on IsolatedStorage


I'm starting to put together pieces for my WP7 application and one of the features I needed is to save/load application settings. There is already an integrated mechanism using IsolatedStorageSettings.ApplicationSettings, but I've implemented it using an XML file located on the IsolatedStorage. The main reason why I don't use the default one is because I want to upload/backup the file to DropBox or SkyDrive making it possible to share the same settings between various versions of the same application running on different platforms (in my case iOS and WP7) and also the user can restore the settings of an application when he changes the phone or reinstalls the application.

The VS2010 solution I am posting at the end of this entry is structured in 3 projects:

1. ConfigManager is the library used for settings management. It can read/write the settings. It also implements an indexed property, but as WP7 v1 uses Silverlight 3 it's not possible to use bindind to indexed properties (this feature is only available from Silverlight 4). If you want to directly bind settings to UI elements you will have to create bind-able properties . If the configuration file is not found on the IsolatedStorage the library will try to restore the file from Content (have a look at the sample TestConfig). It is possible to manually add values to the settings. There is nothing extraordinary in the source code.
2. TestConfig is a sample project that uses the library ConfigManager. It has a default configuration file deployed in Content (settings.xml). One of the things to pay attention to if you are binding to textboxes is to be sure that the binding is updated before saving the settings (this because if a textbox has focus, you modify it's value and select save settings you will loose the modifications if the binding is not updated). This is why I force the update of the source on TextChanged event:
((TextBox)sender).GetBindingExpression(TextBox.TextProperty).UpdateSource();
not a very elegant solution but it's the only one I found till now.
3. TestConfigMVVM is the same test project using MVVM light library. I did not include a settings file in the content and I load the default values manually.

Hope you will find the library useful and that you could spare the time I've spent in developing this part. The next post will be on synchronization with DropBox.



NAMASTE

SharePoint 2010 Software Development Kit – august 2010 release

On september 9th a new version of the SharePoint 2010 SDK (august 2010) was released – a must have for every developer.

Monday, September 20, 2010

WP7 Deploy Db as Content File

Some readers asked me about the possibility to use a database file deployed as Content with the project. Using the file directly from the content folder it is not possible as we do not have read/write access to content files. In fact if we use only the silverlight assemblies we don't have access to any content file. The solution is to use TitleContainer.Openstream from Microsoft.Xna.Framework (a reference should be added manually to your project) to read the content file and then save it to the IsolatedStorage. Once we have the file on IsolatedStorage we can use SQLiteClient to access it.

I've published an updated version of the SQLiteClient project adding a content file (test.db) and there is also ExecuteScalar inside the SQLiteCommand class.



Wednesday, September 15, 2010

WP7 Device Test Day One

Today was my first day of testing a WP7 device as my primary phone. Got the device on Monday, but being a really crazy week, I only got time to configure it today. Still have to install this weekend the development environment(I hope that tomorrow they will release the RTM also for the test devices cause I have a "clean" install of VS 2010 and I would like to keep it that way). The device is the LG and the build is the one that works with the beta tools.
In the past two days knowing that I don't have time to use/configure it I did some tests and got some interesting points. The first one was from my colleague Marius that, in the home screen kept pressing the windows(Start) button and not the arrow to go to the programs. This got me thinking that maybe it would be a good idea to be able to go to the Programs list when pressing Start(Windows) in the Home screen. The second person I gave the phone to play was my wife. She currently owns a Blackberry and I've wanted to see how she'll like the device. Bad luck... Maybe she was a little tired and wasn't in the right mood for trying new things but she didn't like the UI and gave up pretty quick (even if I told her to try the Facebook experience). Another colleague of mine (that owns an Android) returned the phone after 30 minutes of playing even if I've told him that he could play all evening as I did not had time (I will ask him why). So the feedback from the others was not as positive as I was expecting.
No let's get back to my experience. A bug that I've noticed in the beta build is in the initial wizard if you don't have the SIM card and you try to configure the windows live account it will block the device (the user should be able to configure the Wifi before configuring the windows live account in the intial wizard). I also got a "freeze" today using voice search with the word pizza :). At the beginning I did the mistake to add my Facebook account. Don't get me wrong I like the integrated experience but Facebook "polluted" my contact list with 200 people (and I don't have many friends on Facebook) which for me are not really important as phone contacts. I usually surf facebook if I have 10 minutes free time. For me it would be more suitable an Facebook application. So I took out the Facebook account and synchronized everything (calendar and contacts) using Google (it was quite an adventure to find the right programs that synchronize Outlook 2010 with my gmail account). I was good to go to test the phone.
The overall experience is good. The software keyboard is really good (but not better than the one on the iPhone or iPod touch). I have the impression that there is a lot of "wasted" space in the UI. For example when you are in a call you have the Speaker, Mute, Hold, Add speaker buttons that are small and then there is a lot of unused space. They could be a little bigger (even if the precision of the touchscreen is amazing but it would be for visibility and symmetry). Also the font is a little too small in some screens (in the home screen if you don't have really good eyes you will have some difficulties reading the screen). The worst designed part of the phone is still the Application list. It is in alphabetical order and the only thing you can do is to pin an app to the home screen or scroll scroll scroll. I've even tried, from the application list, to press search without being connected to the internet and wrote Marketplace but the result was empty. Let's hope that in the RTM this part will work. Anyway the application list is unusable when you have a lot of applications on the phone.
I am very excited to have a "real" test device and hope soon to start/have time to deliver some apps, modules.

P.S. Today in the car I was trying to call a person and I don't know what I was keep pressing that the phone was asking me if I want to delete the contact (got it at least 3 times today). Strange....


NAMASTE

Form Based Authentication in SharePoint 2010 and what it has to do with Claim Based Authentication.

Starting from SharePoint Server 2007 it is possible to use the ASP.NET membership and role provider for authentication purposes (meaning you are not limited to pure windows authentication). SharePoint Server 2010 extends on this model by providing claim based authentication.

For authentication 2010 in SharePoint you can choose between 2 models:

  • Classic mode authentication
  • Claims based authentication mode

Classic mode is provided mostly for legacy purposes since claims is the way forward – take a look at Plan Authentication Methods (SharePoint 2010) on Technet for more details.

If you plan to use anything other then plain windows authentication you have to go for claims based authentication (CBA). Claims based authentication in 2010 supports the following underlying authentication mechanisms:

  • Windows claims (when you log on with NTLM or the Kerberos protocol)
  • Forms-based authentication claims (when you use an ASP.NET membership and role provider – so use a SQL Server or Oracle database as back-end store)
  • Security Assertions Markup Language (SAML) claims -when you log on by using a security token service (STS), such as Active Directory Federation Services (AD FS) 2.0.

Claims based authentication in 2010 is implemented on top of Windows Identity Foundation (WIF) – so I recommend that you take a look at this blog post to get you started with a number of resources – Windows Identity Foundation resources for SharePoint 2010 developers.

I wanted to try out Forms-based authentication claims using SQL Server as back-end store and I tried out a number of walkthroughs but this one worked like a charm – Configuring claims and form-based authentication for use with a SQL provider in SharePoint 2010  (Thanks you, Spence for pointing me in the correct direction)

Some additional remarks:

References:

Tuesday, September 14, 2010

BIWUG goes Facebook...

I just started a BIWUG group on Facebook - join us if you are interested in sharing information around the Microsoft Information Worker Community in Belgium and Luxemburg

Friday, September 10, 2010

Get Monotouch with 15% discount

Apple decided to take out the restrictions introduced in the iOS Developer Program earlier this year making Monotouch a "SAFE" environment to develop apps for iOS. Novell is celebrating this decision by offering a 15% discount on Monotouch for the next two weeks. If you are interested just use the discount code "MONO-331" on http://monotouch.net/Store

Tuesday, September 7, 2010

Powershell changes from SharePoint 2010 beta to RTM

When testing some SharePoint 2010 Powershell scripts I noticed that there have been some changes in the naming from beta to RTM – for a good overview check out Changes in SharePoint 2010 powershell commandlets (Forums)

Update: Apparently there is also a Technet page which describes the changes – Updates to Windows PowerShell cmdlets (SharePoint Server 2010)

10 extra seats available for BIWUG september 2010 session

The number of available seats for the BIWUG session of september 16h has been increased to 45 people (previously 30 people) so 10 people can still register – go quickly to www.biwug.be

Friday, September 3, 2010

I hate marketing people

This post was not planned, but I have to write about it. The only reason I am not buying the iPhone 4 is the price. Today, watching the Apple presentation from 1st of September, got another confirmation. The new iPod Touch 32GB, that even Steve Jobs calls an iPhone without the phone and seems to have the exact same hardware of the iPhone, costs (in Italy) 309 Euros. The iPhone4 on the other hand 32GB costs 779 Euro, so 479 Euro for the Skyworks SKY77541/42 GSM module. That's why I hate marketing people: they decide. If they say the product will sell for that much that will be the price, but if you pass on the excitement of having a "cool" gadget you realize it doesn't worth the money. So I guess I will buy an iPod Touch for development and debugging.

P.S. Microsoft should be careful and react fast cause they are completely loosing a market on which they had some shares (that would be the PDA without a phone). The devices are still widely used (especially for restaurants) and will be used for gaming, apps. The iPod Touch is not only music anymore. Again Microsoft will have to choose a name for the OS because Windows Phone 7 without a phone it would be Windows 7 :) which is not the best choice. They've changed so many time the name of the mobile OS so one more won't count. Anyway a Windows Phone 7 without a phone makes a lot of sense to me


NAMASTE

C# for Mobile Development

A long time without blogging but I have some ideas for my next two posts (will be on Windows Mobile). Today I wanted to talk about developing on mobile platforms. Two weeks ago I joined the Monodroid preview version. So in this moment a C# developer is able to develop on all 3 major mobile platforms (Microsoft, Apple and Google).
My personal opinion on each of the development platforms:
I will start with Android and Monodroid which is the newest arrived. The integration with Visual Studio 2010 is fabulous (they plan to integrate with MonoDevelop also). I was impressed of the "activity" on the Monodroid list since launching of the preview (I have almost 500 messages in 2 weeks and it's not a preview opened to everybody) and even if it's a really early version and most of the things don't work (I've tried to use threading and sqlite library to do some comparative tests but nothing worked) there are already good ideas and a lot of interest to develop on this platform. One of the most "nasty" aspects of Android is developing the UI but Daniel Cazzulino from Clarius Consulting proposed to realize a "fake" WPF UI control just to leverage the designer, and then have a custom serialization that would transform the XAML to the android markup (this way it would be possible to use Blend too). Another aspect about Monodroid that doesn't convince me is the fact that almost everything is a "proxy" to the correspondent Java object so when you run your program every object creates another object in Java and of course this influences on memory requirements and performance. I wanted to test the Sqlite library because is not a Java wrapper and I could have a speed comparison between the Java program and the same Monodroid program (when Sqlite will work I will post the results). Then there is the runtime which has to be installed on the device. So for now I would not pay for Monodroid just to be able to write code in C# which is linked to Java (of course personal opinion and a lot of things can change when they release the first version of Monodroid) .
Then there is iOS and Monotouch. This a "mature" platform arrived at version 3.0. I love the fact that in the end the code is compiled to native code so you won't loose performance. The developer designs the interface with Apple tools and then link them to C#. You have access to feautures missing in WP 7 v1 like sockets, database and the newest one that will come to iOS 4.2 is PRINTING (if you read my blog you probably know that I am pretty "obsessed" with database and printing). Let's hope Microsoft will take Apple example and implement missing features really fast (I am referring at games for mobile where Microsoft is ahead of everyone but Apple just announced on the 1st of September the Game center and my feeling is that Google is preparing something similar for Android 3.0 for the end of the year). I think Monotouch worth every penny the only doubt remains if Apple will ever "block" the apps developed in Monotouch (they don't have any reason, but I've seen some prepotent behavior from Apple lately). You will need a MAC for developing.
The last but not least is WP7. It's is the most integrated development platform. It has everything a developer needs for development (I am not referring to the missing features of WP7) and it's FREE. I am waiting for the first devices to hit the market and "play" some more (I would have loved to have a "test" device and blog about the experience with the phone from usability to development).
In the following weeks I will also test and blog about the new controls from Resco for WP7 and Monotouch.

NAMASTE

Thursday, September 2, 2010

Free Microsoft training sessions available at MIC Belgium

The Microsoft Innovation Center in Belgium organizes a number of interesting events:

  • SharePoint Developers Day  - 15 september
  • Club des experts: BPOS & Office Online & Office Web App – 16 september
  • Testing Visual Studio 2010 – 21  september
  • Silverlight 4 – 7 october
  • Club des experts – SharePoint & gestion documentaire
  • Construire son Mock up en quelgues heurs – 4 november 4t

All sessions are in French – and registration is possible through – www.mic-belgique.be

Wednesday, September 1, 2010

BIWUG IT Pro session on september 16th

BIWUG (www.biwug.be) is announcing another session about SharePoint on September 16th at the Quest offices in Diegem.

Agenda

  • 18:00-18:30 Welcome
  • 18:30-19:30 SharePoint administration and granular recovery (Speaker Quest)
  • 19:30-19:45 Break
  • 19:45-20:45 Upgrading from SharePoint Server 2007 to SharePoint Server 2010 (Speaker – Karine Bosch)

More details and registration on the BIWUG site – www.biwug.be