<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>On The Mark &#187; VB.net</title>
	<atom:link href="http://markmonica.com/category/programming/vb-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://markmonica.com</link>
	<description>IT blogging by Mark Monica</description>
	<lastBuildDate>Wed, 25 Apr 2012 15:06:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Code generation for property &#8216;Image&#8217; failed</title>
		<link>http://markmonica.com/2012/04/25/code-generation-for-property-image-failed/</link>
		<comments>http://markmonica.com/2012/04/25/code-generation-for-property-image-failed/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 15:02:05 +0000</pubDate>
		<dc:creator>Mark Monica</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[VB.net]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://markmonica.com/?p=178</guid>
		<description><![CDATA[<p>Posted in <a href="http://markmonica.com/category/programming/" title="Programming">Programming</a><a href="http://markmonica.com/category/software/" title="Software">Software</a><a href="http://markmonica.com/category/programming/vb-net/" title="VB.net">VB.net</a><a href="http://markmonica.com/category/programming/visual-studio/" title="Visual Studio">Visual Studio</a></p>The Problem After finally making the jump from Visual Studio 2008 to Visual Studio 2010, a project using Infragistics NetAdvantage 2008.3 started throwing the &#8220;Code generation for property &#8216;Image&#8217; failed&#8221; error in Visual Studio 2010. The NetAdvantage incompatibility with Visual Studio 2010 appears to be related to Windows Forms and making any changes to the image of [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://markmonica.com/category/programming/" title="Programming">Programming</a><a href="http://markmonica.com/category/software/" title="Software">Software</a><a href="http://markmonica.com/category/programming/vb-net/" title="VB.net">VB.net</a><a href="http://markmonica.com/category/programming/visual-studio/" title="Visual Studio">Visual Studio</a></p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><h2>The Problem</h2>
<p>After finally making the jump from Visual Studio 2008 to Visual Studio 2010, a project using Infragistics NetAdvantage 2008.3 started throwing the &#8220;Code generation for property &#8216;Image&#8217; failed&#8221; error in Visual Studio 2010.</p>
<p><em><strong>The NetAdvantage incompatibility with Visual Studio 2010 appears to be related to Windows Forms and making any changes to the image of the form.</strong></em></p>
<h2>The Fix</h2>
<p>Infragistics has reported an error in some versions of it&#8217;s product with Visual Studio 2010.  It appears that NetAdvantage 2008 is not fully compatible and no patch has been provided.  Luckily I still had an upgrade for NetAdvantage 2009.1, of which after being patched / updated to the latest build works.  The standard install of Infragistics 2009.1 or 2009.2 does not work and must be patched / updated.  Check with Infragistics or download the patch directly from them from your downloads area.</p>
<h2>Compatibility</h2>
<p>NetAdvantage WinForms compatibility with Visual Studio 2010</p>
<ul>
<li><strong>NetAdvantage 2008.x</strong> and previous versions &#8211; Not fully compatible, see error above</li>
<li><strong>NetAdvantage 2009.1 <span style="text-decoration: underline;">Unpatched</span></strong>  - Not fully compatible, see error above</li>
<li><strong>NetAdvantage 2009.1 <span style="text-decoration: underline;">Patched to 9.1 2094</span></strong>  &#8211; Compatible, fixes above error</li>
<li><strong>NetAdvantage 2009.2 <span style="text-decoration: underline;">Unpatched</span></strong> - Not fully compatible, see error above</li>
<li><strong>NetAdvantage 2009.2 <span style="text-decoration: underline;">Patched to 9.2 2083</span></strong> - Compatible, fixes above error</li>
<li>&gt; <strong>NetAdvantage 2009.2 &#8211; </strong>Compatible</li>
</ul>
<h2>Credits</h2>
<p>Original credit for solving this goes back to an Infragistics employee in their forums:</p>
<p><a href="http://blogs.infragistics.com/forums/t/41560.aspx?PageIndex=2">http://blogs.infragistics.com/forums/t/41560.aspx?PageIndex=2</a></p>
<p>I&#8217;ve tested their solution with my project and reflected the results above.  As always, back up your solution before making changes!</p>
<div class="shr-publisher-178"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://markmonica.com/2012/04/25/code-generation-for-property-image-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Possible VB2008 BUG: My.User.IsInRole (When UAC ON)</title>
		<link>http://markmonica.com/2009/10/29/possible-vb2008-bug-my-user-isinrole-when-uac-on/</link>
		<comments>http://markmonica.com/2009/10/29/possible-vb2008-bug-my-user-isinrole-when-uac-on/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 18:31:25 +0000</pubDate>
		<dc:creator>Mark Monica</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[VB.net]]></category>
		<category><![CDATA[My.User.IsInRole]]></category>
		<category><![CDATA[UAC]]></category>

		<guid isPermaLink="false">http://markmonica.com/2009/10/29/possible-vb2008-bug-my-user-isinrole-when-uac-on/</guid>
		<description><![CDATA[<p>Posted in <a href="http://markmonica.com/category/programming/" title="Programming">Programming</a><a href="http://markmonica.com/category/programming/vb-net/" title="VB.net">VB.net</a></p>Scenario &#160; On machines where Vista/W7 is installed there appears to be an issue when checking to see if a user is in a role.&#160; User Account Control (UAC) must be on to reproduce the issue.&#160; The result is that the value returned is always FALSE even when the user does belong to the group. [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://markmonica.com/category/programming/" title="Programming">Programming</a><a href="http://markmonica.com/category/programming/vb-net/" title="VB.net">VB.net</a></p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><h3>Scenario</h3>
<p>&#160;</p>
<p>On machines where Vista/W7 is installed there appears to be an issue when checking to see if a user is in a role.&#160; User Account Control (UAC) must be on to reproduce the issue.&#160; The result is that the value returned is always FALSE even when the user does belong to the group.</p>
<p>&#160;</p>
<h3>Sample Code (UAC must be on to produce error)</h3>
<p>&#160;</p>
<p><font size="2" face="Courier New"><strong><em>If My.User.IsInRole(“My Domain\My Group”) Then</em></strong></font></p>
<p><font size="2" face="Courier New"><strong><em>&#160;&#160;&#160;&#160; Return True</em></strong></font></p>
<p><strong><em><font size="2" face="Courier New">Else</font></em></strong></p>
<p><font size="2" face="Courier New"><strong><em>&#160;&#160;&#160;&#160; Return False</em></strong></font></p>
<p><font size="2" face="Courier New"><strong><em>End If</em></strong></font></p>
<p><strong><em><font size="2" face="Courier New"></font></em></strong></p>
<h3>Workaround</h3>
<p>&#160;</p>
<p>To get around this I created a function using other .Net functions.</p>
<p><font size="2" face="Courier New"><em>Public Function IsInUserRole(ByVal RoleToFind As String) As Boolean </em></font></p>
<p><font size="2" face="Courier New"><em>&#160;&#160;&#160; Dim id As WindowsIdentity = WindowsIdentity.GetCurrent       <br />&#160;&#160;&#160; Dim irc As IdentityReferenceCollection </em></font></p>
<p> <font size="2" face="Courier New"><em>&#160;&#160;&#160; &#8216; Gets a SID list of groups the user belongs to </em></font>
<p><font size="2" face="Courier New"><em>&#160;&#160;&#160; irc = id.Groups </em></font></p>
<p><font size="2" face="Courier New"><em>&#160;&#160;&#160; For Each ir As IdentityReference In irc </em></font></p>
<p><font size="2" face="Courier New"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8216; Need to convert the SID to plain english</em></font></p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5606f97e-143e-4b45-b368-635a1acae258" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/VB.net" rel="tag">VB.net</a>,<a href="http://technorati.com/tags/My.User.IsInRole" rel="tag">My.User.IsInRole</a>,<a href="http://technorati.com/tags/UAC" rel="tag">UAC</a></div>
<p><font size="2" face="Courier New"><em>       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim act As NTAccount = CType(ir.Translate(Type.GetType(&quot;System.Security.Principal.NTAccount&quot;)), NTAccount) </em></font></p>
<p><font size="2" face="Courier New"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; If act.Value = RoleToFind Then </em></font></p>
<p><font size="2" face="Courier New"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return True </em></font></p>
<p><font size="2" face="Courier New"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; End If </em></font></p>
<p><font size="2" face="Courier New"><em>&#160;&#160;&#160; Next </em></font></p>
<p><font size="2" face="Courier New"><em>&#160;&#160;&#160; Return False </em></font></p>
<p><font size="2" face="Courier New"><em>End Function </em></font></p>
<div class="shr-publisher-74"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://markmonica.com/2009/10/29/possible-vb2008-bug-my-user-isinrole-when-uac-on/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

