<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: userName() blank</title><link>https://www.infopathdev.com:443/forums/thread/26372.aspx</link><pubDate>Mon, 11 Feb 2008 21:15:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26372</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26372.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=26372</wfw:commentRss><description>&lt;p&gt;I tried to see how userName is implemented via reflector but it seems like the most interesting bits are obfuscated :)&lt;/p&gt;
&lt;p&gt;Nonetheless, I was able to dig out this:&lt;/p&gt;
&lt;p&gt;&lt;font color="#1000a0"&gt;return&lt;/font&gt; &lt;a title="Microsoft.SharePoint.WebControls.SPControl" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.WebControls.SPControl"&gt;&lt;font color="#006018"&gt;SPControl&lt;/font&gt;&lt;/a&gt;.&lt;a title="SPWeb Microsoft.SharePoint.WebControls.SPControl.GetContextWeb(HttpContext);" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.WebControls.SPControl/GetContextWeb(System.Web.HttpContext):Microsoft.SharePoint.SPWeb"&gt;&lt;font color="#006018"&gt;GetContextWeb&lt;/font&gt;&lt;/a&gt;(&lt;a title="System.Web.HttpContext" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Web:2.0.0.0:b03f5f7f11d50a3a/System.Web.HttpContext"&gt;&lt;font color="#006018"&gt;HttpContext&lt;/font&gt;&lt;/a&gt;.&lt;a title="HttpContext System.Web.HttpContext.Current { ... }" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Web:2.0.0.0:b03f5f7f11d50a3a/System.Web.HttpContext/property:Current:System.Web.HttpContext"&gt;&lt;font color="#006018"&gt;Current&lt;/font&gt;&lt;/a&gt;).&lt;a title="SPUser Microsoft.SharePoint.SPWeb.CurrentUser { ... }" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPWeb/property:CurrentUser:Microsoft.SharePoint.SPUser"&gt;&lt;font color="#006018"&gt;CurrentUser&lt;/font&gt;&lt;/a&gt;;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This may give you the idea of what is going on... also, like you have mentioned, you might want to make sure that both Forms Services and your site use the same authentication scheme. I believe Forms Services run in a different vdir (namely, _layouts) so you may consider putting Anonymous/Forms on it as well.&lt;/p&gt;
&lt;p&gt;Good luck!&lt;/p&gt;</description></item><item><title>Re: userName() blank</title><link>https://www.infopathdev.com:443/forums/thread/26369.aspx</link><pubDate>Mon, 11 Feb 2008 20:31:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26369</guid><dc:creator>Jonesie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26369.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=26369</wfw:commentRss><description>&lt;p&gt;Thanks, but we are using a custom provider - which I think is the source of the problems.&lt;/p&gt;</description></item><item><title>Re: userName() blank</title><link>https://www.infopathdev.com:443/forums/thread/26368.aspx</link><pubDate>Mon, 11 Feb 2008 20:25:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26368</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26368.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=26368</wfw:commentRss><description>&lt;p&gt;Hey Peter.&lt;/p&gt;
&lt;p&gt;Here is an Active Directory Web Part that can be used codelessly.&amp;nbsp; One advantage it has is getting the Domain Account the user is using rather than the local user like UserName() does, if you have remote users.&lt;/p&gt;&lt;p&gt;http://www.qdabra.com/en/products/ADWebService.aspx&lt;/p&gt;I believe there is also a Sharepoint 2007 web service that can be used, but it will not retrieve as much information as Active Directory will.
&lt;p&gt;Just an FYI for you if it helps.&lt;/p&gt;</description></item><item><title>Re: userName() blank</title><link>https://www.infopathdev.com:443/forums/thread/26366.aspx</link><pubDate>Mon, 11 Feb 2008 19:33:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26366</guid><dc:creator>Jonesie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26366.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=26366</wfw:commentRss><description>&lt;p&gt;Oh, and I dont think this will work as userName() is returning a blank string in web mode so Application.User.UserName will probably be the same.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Instead I will pass a parameter from the web part that launches the form. Ah, but crap, that wont work either&amp;nbsp;as I need to write code to do that.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;</description></item><item><title>Re: userName() blank</title><link>https://www.infopathdev.com:443/forums/thread/26365.aspx</link><pubDate>Mon, 11 Feb 2008 19:32:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26365</guid><dc:creator>Jonesie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26365.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=26365</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not that I&amp;#39;m afraid of coding but a) it will make the process require a developer which we are trying to avoid and b) InfoPath is the worst development tool imaginable. The UI is so incredibly poor it&amp;#39;s only a passable forms editor. Who ever thought of allowing managed code in these things should be shot! &lt;/p&gt;
&lt;p&gt;Cheers&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: userName() blank</title><link>https://www.infopathdev.com:443/forums/thread/26364.aspx</link><pubDate>Mon, 11 Feb 2008 19:28:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26364</guid><dc:creator>Jonesie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26364.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=26364</wfw:commentRss><description>&lt;p&gt;I tried it and it blew up when I tried to view a UDC or create&amp;nbsp;a new one.&amp;nbsp; Needs a bit more work I think...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: userName() blank</title><link>https://www.infopathdev.com:443/forums/thread/26357.aspx</link><pubDate>Mon, 11 Feb 2008 16:01:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26357</guid><dc:creator>anotherchrisberry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26357.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=26357</wfw:commentRss><description>&lt;p&gt;Jonesie,&lt;/p&gt;&lt;p&gt;If you&amp;#39;re not afraid of writing a little code, you can set the field&amp;#39;s value with one line of C# in the form&amp;#39;s onload event:&lt;/p&gt;&lt;p&gt;MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;//[xpath expression here]&amp;quot;).SetValue(Application.User.UserName);&lt;/p&gt;&lt;p&gt;This is what I do, but with the code behind the form, it requires a little more work to publish the form template.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: userName() blank</title><link>https://www.infopathdev.com:443/forums/thread/26340.aspx</link><pubDate>Mon, 11 Feb 2008 08:12:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26340</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26340.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=26340</wfw:commentRss><description>&lt;p&gt;You will definitely need a UDC. Please download the UDC Editor and tell us what you think.&lt;/p&gt;</description></item><item><title>Re: userName() blank</title><link>https://www.infopathdev.com:443/forums/thread/26334.aspx</link><pubDate>Sun, 10 Feb 2008 23:34:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26334</guid><dc:creator>Jonesie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26334.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=26334</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have a UDC&amp;nbsp;setup for this form yet as I found them a PITA to create.&amp;nbsp; Your tools might make this easier tho.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I have a feeling I might have fiddled with proxy settings also... will check that.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: userName() blank</title><link>https://www.infopathdev.com:443/forums/thread/26332.aspx</link><pubDate>Sun, 10 Feb 2008 22:53:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26332</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26332.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=26332</wfw:commentRss><description>&lt;p&gt;Hi Jonesie and welcome!&lt;/p&gt;
&lt;p&gt;I&amp;#39;m assuming you have a UDC file set up for the Web Service that your browser form is using. Please check that proxy service is set to false.&lt;/p&gt;</description></item><item><title>userName() blank</title><link>https://www.infopathdev.com:443/forums/thread/26331.aspx</link><pubDate>Sun, 10 Feb 2008 22:46:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26331</guid><dc:creator>Jonesie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26331.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=26331</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The setup:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;InfoPath form in forms services.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;WSS site using Forms Auth with a custom provider&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Web service to expose user details&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;When my form loads I want to pre-populate some fields with the current user details.&amp;nbsp; In the form load rules I query the web service and use the userName() to pass as the single parameter to the GetUserDetails() method.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;If I preview in InfoPath the web service is passed the windows account I&amp;#39;m logged in with. When I debug this on the published form the user name parameter comes through as blank.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I&amp;#39;m sure this&amp;nbsp;used to work a while ago.&amp;nbsp; I&amp;#39;m not sure what might have changed but I&amp;#39;m thinking it&amp;#39;s something to do with the authentication setup of WSS rather than the form.&lt;/p&gt;
&lt;p&gt;Does Forms Services need to use the same auth provider as the site collection maybe?&lt;/p&gt;
&lt;p&gt;Any ideas anyone?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>