Codebureau - Matt Simner
(Not) just another .NET Developer
Thursday, February 18, 2010
Retrieving User Information in InfoPath without Code - One solution to 'Value cannot be null. Parameter name: serverContext'
InfoPath, SharePoint and Web Services are becoming sparring partners for me of late.
In order to retrieve user information in my InfoPath form I followed the instructions at itaysk's blog, as I wasn't aware I could use a SharePoint Web Service to get profile information. Sweet - I thought.
I then immediately got:
The User Profile Manager object could not be loaded. ---> Value cannot be null. Parameter name: serverContext
This was an error noted by quite a few people, but with very few solutions.
I then got out Fiddler as I do, to see what was going on, and remembered that InfoPath tends to expand url's into their fully qualified domain names (FQDN) - so you may have entered http://mylocalnetworkserver/_vti_bin/etc.asmx but if you're on a corproate network or anywhere with DNS happening then you'll suddenly find yourself calling http://mylocalnetworkserver.some.other.domain.gumph/_vti_bin/etc.asmx.
Why is this important you ask? - Well I then thought 'I'm sure there wouldn't be anything logged on the server?' - well SharePoint probably logs a lot more than most realise, but the error in this case was staring me in the face in the Event Log:
A Windows SharePoint Services Error - Event ID 8214.
A request was made for a URL, http://mylocalnetworkserver.some.other.domain.gumph, which has not been configured in Alternate Access Mappings. Some links may point to the Alternate Access URL for the default zone, http://mylocalnetworkserver. Review the Alternate Access mappings for this Web application at http://mylocalnetworkserver:1234/_admin/AlternateUrlCollections.aspx and consider adding http://mylocalnetworkserver.some.other.domain.gumph as a Public Alternate Access URL if it will be used frequently. Help on this error: http://go.microsoft.com/fwlink/?LinkId=114854.
Well blow me down. All the other web services I call from InfoPath don't care about this because they're not hosted in SharePoint, and SharePoint manages the allowed paths into the application.
Once I went to the Central Admin site --> Operations --> Alternate Access Mappings, and edited 'Public Zone URLs' to add the FQDN to the intranet zone (probably could choose any zone), it just started working.
InfoPath
|
SharePoint
posted on Thursday, February 18, 2010 12:13:49 PM (AUS Eastern Daylight Time, UTC+11:00)
Comments [0]
Related posts:
Run SharePoint Designer 2007 Workflows as System User
Fixing SharePoint error: No item exists at [url]?ID=n. It may have been deleted or renamed by another user
Pass in any parameter to an InfoPath form with one piece of code
Embedding InfoPath forms in SharePoint WebPart pages using the XmlFormView control
Setup Single Sign-on for SharePoint 2007. The missing link
Comments are closed.
Navigation
Codebureau Home
Matt Simner - T-Shirts, Software, Design
CodeProject Articles
Geek Casuals T-Shirts
On this page
Archive
<
August 2010
>
Sun
Mon
Tue
Wed
Thu
Fri
Sat
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
July, 2010 (2)
June, 2010 (2)
May, 2010 (2)
April, 2010 (3)
March, 2010 (1)
February, 2010 (2)
January, 2010 (1)
October, 2009 (2)
September, 2009 (1)
August, 2009 (1)
July, 2009 (1)
June, 2009 (3)
May, 2009 (1)
April, 2009 (3)
March, 2009 (2)
February, 2009 (2)
January, 2009 (3)
December, 2008 (4)
November, 2008 (3)
October, 2008 (4)
September, 2008 (3)
August, 2008 (3)
July, 2008 (16)
June, 2008 (10)
May, 2008 (1)
April, 2008 (6)
March, 2008 (4)
February, 2008 (7)
January, 2008 (10)
December, 2007 (2)
November, 2007 (3)
September, 2007 (3)
August, 2007 (5)
July, 2007 (5)
June, 2007 (4)
April, 2007 (1)
March, 2007 (2)
February, 2007 (2)
January, 2007 (6)
July, 2006 (1)
March, 2006 (1)
July, 2005 (2)
June, 2005 (1)
May, 2005 (3)
February, 2005 (3)
Month View
Categories
.NET Framework
Agile
Articles
ASP.NET
C#
CMS
Creative Design
CRM
dasBlog
Database
Development Process
DotNetNuke
FavPal.NET
InfoPath
IT Musings
JQuery
LINQ
Miscellaneous
Networking
Off piste
Oracle
Performance
Redbubble
Refactoring
Security
Setup and Deployment
SharePoint
SQL Server
SubVersion
Tools
Unit Testing
Usability
Visual Studio
Web
Workflow
WPF
XML
Blogroll
Brad Abrams
Charlie Poole (NUnit)
Roy Osherove
Scott Hanselman
SQL Authority - Pinal Dave