-
12-05-2010, 12:29 #1Approved 9-lifer
- Registered
- 31/07/04
- Location
- Kortrijk
- Posts
- 1,019
- iTrader
- 4 (100%)
- Mentioned
- 0 Post(s)
WCF Service + SharePoint 2010 TimeOut
I have been developing on SP 2010 for a while now. Mostly I have been working with the Client Object Model.
Though I am at a point where I need to read out the UserProfiles from inside SharePoint.
I see no other way to do this than to make a custom WCFService and deploy it to SharePoint.
So that is what I did. I made an "Empty SharePoint Project" and added the mapped "ISAPI" folder.
The code from the WCF Service:
This service gives a TimeOut error... When I delete the following line the TimeOut is fixedCode:public string GetUserByName(string _name) { string server = "http://esddev72"; UserProfileManager profileManager; string s = ""; string u = ""; SPSecurity.RunWithElevatedPrivileges(delegate { using (SPSite site = new SPSite(server)) { SPServiceContext context = SPServiceContext.GetContext(site); profileManager = new UserProfileManager(context, true); s += "AccountNames: "; u += "firstNames: "; foreach (UserProfile profile in profileManager) { if (profile["AccountName"] != null) { s += profile["AccountName"] + " - "; } if (profile["FirstName"] != null) { } } } }); return s; }
So I can only read out the AccountName... Does anyone know a solution to this?Code:if (profile["FirstName"] != null) { }
I've read things about putting the timeout times higher, but it didn't work for me... Or maybe I did someting wrong, so if you could explain that part as well
Thanks !BLOG: http://blog.voltje.be/
DESKTOP: AMD Phenom x4 925 / ASUS Mobo / ATI RADEON HD5770 1GB DDR5 / 4GB DDR3 / 1x 24" Full HD Samsung/ Logitech G9x / QPad Lowsense / Logitech Illuminated !
LAPTOP: Lenovo T510 / Intel i5 @ 2.40Ghz / 8GB Ram / 120GB SSD
WOW CHAR: Averlena, Protection Paladin @ Talnivarrno votes
-
-
14-05-2010, 21:39 #2Member
- Registered
- 20/03/04
- Location
- Limburg
- Posts
- 1,515
- iTrader
- 12 (100%)
- Mentioned
- 0 Post(s)
- Reputation
- 0/4
Heeft je development machine genoeg rechten om deze informatie aan te vragen van de server? Run eventueel lokaal eens als Administrator?
Check anders eens dmv debugging in de variable profile welke 'keys' je kan uitlezen.no votes
-
14-05-2010, 22:07 #3Approved 9-lifer
- Registered
- 31/07/04
- Location
- Kortrijk
- Posts
- 1,019
- iTrader
- 4 (100%)
- Mentioned
- 0 Post(s)
Wel...
Ik kan alles perfect uitlezen via een console applicatie
Ik heb sowieso alle rechten op de server + ik programmeer rechtstreeks op de server.
De rechten staan sowieso goed normaal.
En ik kan alle keys uitlezen in een console applicatie.
Ik denk dat het hier mis gaat:
De WCF Service wilt SharePoint aanspreken maar heeft daarvoor authentication nodig.
Door dat het een service is komt er dus geen prompt...
Maar ik vind niet hoe dat ik mijn login gegevens kan meegeven aan de serviceBLOG: http://blog.voltje.be/
DESKTOP: AMD Phenom x4 925 / ASUS Mobo / ATI RADEON HD5770 1GB DDR5 / 4GB DDR3 / 1x 24" Full HD Samsung/ Logitech G9x / QPad Lowsense / Logitech Illuminated !
LAPTOP: Lenovo T510 / Intel i5 @ 2.40Ghz / 8GB Ram / 120GB SSD
WOW CHAR: Averlena, Protection Paladin @ Talnivarrno votes
-
14-05-2010, 23:00 #4Member
- Registered
- 17/07/02
- Location
- Wilrijk
- Posts
- 1,994
- iTrader
- 2 (100%)
- Mentioned
- 0 Post(s)
- Reputation
- 9/16
En dien Silverlight zit in een webpart?But i need to get the UserProfiles in Silverlight so i have to use a WCF Custom Service to fetch the UserProfiles
Domme vraag omdat ik niks van SP 2010 ken maar, waarom niet de default bestaande webservices van sharepoint gebruiken?no votes
-
14-05-2010, 23:12 #5Approved 9-lifer
- Registered
- 31/07/04
- Location
- Kortrijk
- Posts
- 1,019
- iTrader
- 4 (100%)
- Mentioned
- 0 Post(s)
Dat zou een mogelijkheid zijn, maar om een of andere reden kreeg ik die ook niet werkend.
Ik ga da sowieso maandag nog eens proberen.
Maar mijn stagebegeleider raadde mij ook aan custom wcf services te gebruiken.
Als ik mij goed herinner werkte het niet met die standaard webservices, maar ik kan mis zijn.
Jep SL zit in een webpart, wat niet uitmaakt want het blijft client...
Of je die nu als webpart draait of gewoon in een webpage, blijft gelijk heBLOG: http://blog.voltje.be/
DESKTOP: AMD Phenom x4 925 / ASUS Mobo / ATI RADEON HD5770 1GB DDR5 / 4GB DDR3 / 1x 24" Full HD Samsung/ Logitech G9x / QPad Lowsense / Logitech Illuminated !
LAPTOP: Lenovo T510 / Intel i5 @ 2.40Ghz / 8GB Ram / 120GB SSD
WOW CHAR: Averlena, Protection Paladin @ Talnivarrno votes
-
15-05-2010, 00:39 #6Member
- Registered
- 17/07/02
- Location
- Wilrijk
- Posts
- 1,994
- iTrader
- 2 (100%)
- Mentioned
- 0 Post(s)
- Reputation
- 9/16
hier is een webpart te downloaden die werkt met de userprofiles
PeopleZen: User Profiles Web Part for SharePoint - ROXORITY ? Sensational SharePoint Solutions
Decompilen met reflector en ge zijt vertrokken
Waarom raadde hij dat aan?Maar mijn stagebegeleider raadde mij ook aan custom wcf services te gebruiken.
- WCF is hip / nieuw
- Technisch de beste oplossingno votes
-
15-05-2010, 21:12 #7Approved 9-lifer
- Registered
- 31/07/04
- Location
- Kortrijk
- Posts
- 1,019
- iTrader
- 4 (100%)
- Mentioned
- 0 Post(s)
Allright, maandag direct eens bekijken

Ik hou je op de hoogte, tegen maandag middag kan je hier een update verwachten!BLOG: http://blog.voltje.be/
DESKTOP: AMD Phenom x4 925 / ASUS Mobo / ATI RADEON HD5770 1GB DDR5 / 4GB DDR3 / 1x 24" Full HD Samsung/ Logitech G9x / QPad Lowsense / Logitech Illuminated !
LAPTOP: Lenovo T510 / Intel i5 @ 2.40Ghz / 8GB Ram / 120GB SSD
WOW CHAR: Averlena, Protection Paladin @ Talnivarrno votes
-
17-05-2010, 10:36 #8Approved 9-lifer
- Registered
- 31/07/04
- Location
- Kortrijk
- Posts
- 1,019
- iTrader
- 4 (100%)
- Mentioned
- 0 Post(s)
Maarja ... Dat is een gewone webpart ?
Daar kan je dan het SharePoint object model gebruiken...
Dat werkt allemaal bij mij, maar ik wil het over de service trekken, en daar loopt het mis.BLOG: http://blog.voltje.be/
DESKTOP: AMD Phenom x4 925 / ASUS Mobo / ATI RADEON HD5770 1GB DDR5 / 4GB DDR3 / 1x 24" Full HD Samsung/ Logitech G9x / QPad Lowsense / Logitech Illuminated !
LAPTOP: Lenovo T510 / Intel i5 @ 2.40Ghz / 8GB Ram / 120GB SSD
WOW CHAR: Averlena, Protection Paladin @ Talnivarrno votes
-
17-05-2010, 14:05 #9Member
- Registered
- 20/03/04
- Location
- Limburg
- Posts
- 1,515
- iTrader
- 12 (100%)
- Mentioned
- 0 Post(s)
- Reputation
- 0/4
Je kan binnen WCF aangeven hoe je je credentials wilt doorgeven. Dit gebeurt meestal in je web/app.config (maar kan je ook in code configureren).
Indien je rechten hebt met je domain account zal je wss impersonation ofzo moeten aangeven. Indien je gewone credentials hebt (bv th43ns - myPassword) kan je die ook aangeven.
Ik heb ooit eens een kleine snippet van wcf errortracing op mijn blog gezet (www.benzinimundo.com). Dan kan je ook gaan bekijken wat er precies misgaat met je WCF connectie.no votes
-
17-05-2010, 14:34 #10Approved 9-lifer
- Registered
- 31/07/04
- Location
- Kortrijk
- Posts
- 1,019
- iTrader
- 4 (100%)
- Mentioned
- 0 Post(s)
En toch krijg ik dat op een of andere manier dus niet werkende.
Het is Silverlight, dus BasicHttpBinding, maar ik krijg de credentials niet werkende.
Als er iemand een idee heeft of iets denkt, just shoot.
Hoe meer er mee denken hoe sneller er een oplossing komt
Last edited by voltje; 17-05-2010 at 17:01.
BLOG: http://blog.voltje.be/
DESKTOP: AMD Phenom x4 925 / ASUS Mobo / ATI RADEON HD5770 1GB DDR5 / 4GB DDR3 / 1x 24" Full HD Samsung/ Logitech G9x / QPad Lowsense / Logitech Illuminated !
LAPTOP: Lenovo T510 / Intel i5 @ 2.40Ghz / 8GB Ram / 120GB SSD
WOW CHAR: Averlena, Protection Paladin @ Talnivarrno votes

