<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SharePoint Integration</title><link>https://www.infopathdev.com:443/forums/46.aspx</link><description> For questions concerning issues in the integration of SharePoint and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Problems with UserProfile service</title><link>https://www.infopathdev.com:443/forums/thread/28642.aspx</link><pubDate>Fri, 09 May 2008 02:39:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28642</guid><dc:creator>desperation</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28642.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=28642</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;thx for reply, but I am not using the commented method, &lt;/p&gt;&lt;p&gt;&amp;nbsp;I try to get user by calling the userprofile service, any problem with that? &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Problems with UserProfile service</title><link>https://www.infopathdev.com:443/forums/thread/28613.aspx</link><pubDate>Thu, 08 May 2008 13:28:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28613</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28613.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=28613</wfw:commentRss><description>&lt;p&gt;I don&amp;#39;t think this method of user identity is supported in browser based froms since the form is being rendered on the server and not the client. Therefore it is not running under the specific user.&lt;/p&gt;
&lt;p&gt;We use the Qdabra Active Directory web service which will identify the form user&amp;#39;s somain authenticated login&amp;nbsp;ID as well as the additional information stored in AD such as email, phone, manager, department, etc.&lt;/p&gt;</description></item><item><title>Problems with UserProfile service</title><link>https://www.infopathdev.com:443/forums/thread/28603.aspx</link><pubDate>Thu, 08 May 2008 03:23:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28603</guid><dc:creator>desperation</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28603.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=28603</wfw:commentRss><description>&lt;span&gt;
&lt;p align="left"&gt;&lt;font face="Arial"&gt;Hi, friends&lt;/font&gt;&lt;/p&gt;
&lt;p align="left"&gt;I have created infopath browser-enabled forms and uploaded them to 
sharepoint server, but there is one function not working, that is to get the 
current user who is&amp;nbsp;using the forms.&lt;/p&gt;&lt;p align="left"&gt;I am using Infopath 07 and MOSS 07 &lt;br /&gt;&lt;/p&gt;
&lt;p align="left"&gt;I implemented it refering to this article from Infopath Team Blog, 
&lt;/p&gt;
&lt;h2&gt;&lt;font size="2"&gt;Get the User Profile through MOSS Web Services&lt;/font&gt;&lt;/h2&gt;
&lt;p align="left"&gt;&lt;a href="http://blogs.msdn.com/infopath/archive/2007/03/07/get-the-user-profile-through-moss-web-services.aspx" title="http://blogs.msdn.com/infopath/archive/2007/03/07/get-the-user-profile-through-moss-web-services.aspx"&gt;http://blogs.msdn.com/infopath/archive/2007/03/07/get-the-user-profile-through-moss-web-services.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p align="left"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="left"&gt;Following is my code, when I test it in console app, it works fine 
and return my domain id, but when I put it in web service and invoke it, it 
returns nothing.&lt;/p&gt;
&lt;p align="left"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="left"&gt;[Code]&lt;/p&gt;&lt;font color="#0000ff"&gt;
&lt;/font&gt;&lt;p&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt; &lt;font color="#0000ff"&gt;static&lt;/font&gt; &lt;font color="#0000ff"&gt;string&lt;/font&gt; CurrentUserName&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff"&gt;get&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000"&gt;/*{&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000"&gt;System.Security.Principal.IPrincipal _User;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000"&gt;_User = System.Web.HttpContext.Current.User;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000"&gt;System.Security.Principal.IIdentity _Identity;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000"&gt;_Identity = _User.Identity;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000"&gt;string _Value;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000"&gt;//_Value = _Identity.Name;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000"&gt;_Value = _Identity.Name.Substring(_Identity.Name.IndexOf(@&amp;quot;\&amp;quot;) + 1);&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000"&gt;return _Value;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000"&gt;}*/&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;ProfileService.&lt;font color="#008080"&gt;UserProfileService&lt;/font&gt; profileService = 
&lt;font color="#0000ff"&gt;new&lt;/font&gt; ProfileService.&lt;font color="#008080"&gt;UserProfileService&lt;/font&gt;();&lt;/p&gt;
&lt;p&gt;profileService.UseDefaultCredentials = &lt;font color="#0000ff"&gt;true&lt;/font&gt;;&lt;/p&gt;
&lt;p&gt;ProfileService.&lt;font color="#008080"&gt;PropertyData&lt;/font&gt;[] userProps = &lt;font color="#0000ff"&gt;null&lt;/font&gt;;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff"&gt;try&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000"&gt;// Passing null to this method returns the profile of the 
current user.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;userProps = profileService.GetUserProfileByName(&lt;font color="#0000ff"&gt;null&lt;/font&gt;);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff"&gt;catch&lt;/font&gt; { }&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt; (userProps == &lt;font color="#0000ff"&gt;null&lt;/font&gt; 
|| userProps.Length == 0)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt; &lt;font color="#0000ff"&gt;null&lt;/font&gt;;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt; userName;&lt;/p&gt;
&lt;p&gt;userName = userProps[1].Values[0].Value.ToString();&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt; userName.Substring(userName.IndexOf(&lt;font color="#800000"&gt;@&amp;quot;\&amp;quot;&lt;/font&gt;) + 1);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000"&gt;/*{ return System.Environment.UserName.ToString(); 
}*/&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p align="left"&gt;[/Code]&lt;/p&gt;
&lt;p align="left"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="left"&gt;Anyone can help with this problem? really struggling to find the 
solution these days...&lt;/p&gt;&lt;/span&gt;</description></item></channel></rss>