<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Get and Check User Domain name</title><link>https://www.infopathdev.com:443/forums/thread/38187.aspx</link><pubDate>Sat, 07 Feb 2009 01:10:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38187</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38187.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=38187</wfw:commentRss><description>&lt;p&gt;Well, this will get you the full user name, including the domain, but requires full trust:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;System.Security.Principal.&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;WindowsIdentity&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.GetCurrent().Name&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;font size="2"&gt;So, you&amp;#39;d be able to substring off the domain by getting the info before the &amp;#39;\&amp;#39;. But again, since it would require your form to be full trust, I wonder if it would be worth it. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;What about using user roles? Do you have an AD group that includes all the people who you would want to have &lt;strong&gt;*see*&lt;/strong&gt; the section? You could have a user role that was the default, and hide the section if the user belonged to that role (i.e., a customer) and another role with the people who work at your company... the section will show for them. &lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Get and Check User Domain name</title><link>https://www.infopathdev.com:443/forums/thread/38170.aspx</link><pubDate>Fri, 06 Feb 2009 16:52:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38170</guid><dc:creator>denfer06</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38170.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=38170</wfw:commentRss><description>&lt;p&gt;nobody has an idea ?&lt;/p&gt;</description></item><item><title>Re: Get and Check User Domain name</title><link>https://www.infopathdev.com:443/forums/thread/38151.aspx</link><pubDate>Fri, 06 Feb 2009 10:59:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38151</guid><dc:creator>denfer06</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38151.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=38151</wfw:commentRss><description>&lt;p&gt;I already find out, in the following post, how to show/hide a control using script&amp;nbsp;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/forums/t/3267.aspx"&gt;http://www.infopathdev.com/forums/t/3267.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;remain how to get and Check Domain name&lt;/p&gt;</description></item><item><title>Get and Check User Domain name</title><link>https://www.infopathdev.com:443/forums/thread/38148.aspx</link><pubDate>Fri, 06 Feb 2009 09:39:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38148</guid><dc:creator>denfer06</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38148.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=38148</wfw:commentRss><description>&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Hi,&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;How can I get and check The domain name where the form is run ?&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;I Have designed a template (.xsn) that will be send to&amp;nbsp;my customer (outside the our network domain) &lt;/p&gt;
&lt;p&gt;I want to hide a part of this template (a section) when the customer create a new form, and display it when I open the customer form.&lt;/p&gt;
&lt;p&gt;So I thought that testing the domain at the open event will be the best way to hide this section.&lt;/p&gt;
&lt;p&gt;The problem it&amp;#39;s That I don&amp;#39;t know how to do that.&lt;/p&gt;
&lt;p&gt;I saw that in the Tool -&amp;gt; Programming -&amp;gt; On Load Event, we can write some code but I&amp;#39;m not so good developper so any help will be welcomed&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>