This project is read-only.

WLA: Value out of range

Jun 26, 2008 at 4:57 PM
I tried to add Live Authentication to one of my sites with:
stsadm -o addwindowsliveauth -url –appid 0016BFFD800xxxx -appkey rosebud -appmode https -locked -profsite http://hostname:1234 -proflist Profs

The result I got is: Creating list Profs .. and then: Value out of range

I tried the same site via https, its http-counterpart locally, another site locally, another site in the internet zone, ...

Honestly, i don't understand the profsite-Parameter: does this have to be another App? must it be accessible from internet? I couldn't find any further docs ...

pls help :-(

Jul 4, 2008 at 9:29 AM
Edited Jul 4, 2008 at 9:29 AM
Issue resolved. Target system was german, the whole CKS source code seems to work in english system only.
In the case of WLA stsadm -addwindowsliveauth tries to create a list based on [Custom List] with a value of [Title]; both are only displaynames and therefore don't exist in german systems; in order to work the code has to be changed:

1. replace -- SPListTemplate template = web.ListTemplates["Custom List"]; -- (in CreateUserProfileList) with:
                        SPListTemplate template;
                        try {
                            template = FindTemplate(web, "custlist");
                        catch(Exception ex) {
                            Console.WriteLine("Could not find custom template in web {0}.  Error: {1}\n", web.ServerRelativeUrl, ex.Message);

 and then add
                        private SPListTemplate FindTemplate(SPWeb w, string name)
                            foreach (SPListTemplate tpl in w.ListTemplates) 
                                if (tpl.InternalName == name) return tpl;
                            return null;

2. replace (in the same procedure) SPField field1 = list.Fields["Title"];  with SPField field1 = list.Fields.GetFieldByInternalName("Title");

that's it :-)