<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: UserName bug(?) for forms published to SP library</title><link>https://www.infopathdev.com:443/forums/thread/18083.aspx</link><pubDate>Tue, 16 Aug 2005 14:57:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18083</guid><dc:creator>pmbarnes</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18083.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=18083</wfw:commentRss><description>Yes, it does work. I wasn't aware of the Advanced option to "Show a notification for managed code errors." With that turned on I do see the Security exception. So feel free to move this thread out of the Bugs folder : ).&lt;br /&gt;&lt;br /&gt;Now if I can just get around those Access database connection issues without having to fully trust the *site* (and thus lose the ability to call Environment.UserName without a fully trusted *form*), all will be well.</description></item><item><title>Re: UserName bug(?) for forms published to SP library</title><link>https://www.infopathdev.com:443/forums/thread/18082.aspx</link><pubDate>Tue, 16 Aug 2005 05:54:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18082</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18082.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=18082</wfw:commentRss><description>But, it works and fills in username, right?&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: UserName bug(?) for forms published to SP library</title><link>https://www.infopathdev.com:443/forums/thread/18081.aspx</link><pubDate>Mon, 15 Aug 2005 23:45:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18081</guid><dc:creator>pmbarnes</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18081.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=18081</wfw:commentRss><description>I have it in Trusted Sites. If I put&lt;a target="_blank" href=http://&amp;lt;my&gt;http://&amp;lt;my&lt;/a&gt; server name&amp;gt; in IntraNet zone, when I click to the button to query an Access db I get a dialog stating "This Web site uses a data provider that may be unsafe. If you trust the Web site click OK, otherwise click Cancel." If I click OK I get another dialog stating "This Web site is using your identity to access a data source. If you trust the Web site click OK, otherwise click Cancel." &lt;br /&gt;&lt;br /&gt;When I add the site to Trusted Sites I don't get these dialogs.</description></item><item><title>Re: UserName bug(?) for forms published to SP library</title><link>https://www.infopathdev.com:443/forums/thread/18080.aspx</link><pubDate>Mon, 15 Aug 2005 22:54:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18080</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18080.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=18080</wfw:commentRss><description>Sounds like a permissions issue. Is this running Domain trust? What zone is URL in? It should be in IntraNet zone not Internet or Trusted. Please check in IE.&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>UserName bug(?) for forms published to SP library</title><link>https://www.infopathdev.com:443/forums/thread/17981.aspx</link><pubDate>Mon, 15 Aug 2005 22:23:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17981</guid><dc:creator>pmbarnes</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17981.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=17981</wfw:commentRss><description>I've got a managed form I'm publishing to a SharePoint Team site Forms Library on a domain controller. I've discovered that calling Environment.UserName in the form's OnLoad event handler essentially causes a silent runtime error, preventing any code that follows in the handler from executing. I think this bug can be reproduced by creating a simple form, adding an OnLoad event handler and then putting the following in the handler:&lt;br /&gt;&lt;br /&gt;e.XDocument.UI.Alert(Environment.UserName)&lt;br /&gt;e.XDocument.UI.Alert("test msg")&lt;br /&gt;&lt;br /&gt;This will appear to work fine in Preview mode. But when I publish this template to my SharePoint Form library and run it from the server or a client box none of the alerts appear when the form loads. If I reverse the above two lines of code, the "test msg" alert will fire and nothing else.&lt;br /&gt;&lt;br /&gt;Has anyone seen this?&lt;br /&gt;&lt;br /&gt;UPDATE: I think this is an issue with Full Trust. I had seen postings from others that Environment.UserName didn't require Full Trust. But maybe they're not on a DC. I just signed the form with a self-issued cert and it did access Environment.UserName when I opened the form from the Form library on the server. When I tried the same on the client box I got an error saying the form could not load because the cert either expired or was revoked. Must be that it was self-issued. This is progress. I will post back if I've resolved this. Might be helpful for someone in the future.</description></item></channel></rss>