<?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; Programming</title>
	<atom:link href="http://markmonica.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://markmonica.com</link>
	<description>Contributing to the vast web, 1 blog post at a time - blogs by Mark Monica</description>
	<lastBuildDate>Wed, 23 Jun 2010 01:41:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<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[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[<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; ' 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; ' 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>
]]></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>
		<item>
		<title>RailsConf 09 &#8211; A-Z Intro To Rails Tutorial</title>
		<link>http://markmonica.com/2009/04/29/railsconf-09/</link>
		<comments>http://markmonica.com/2009/04/29/railsconf-09/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 12:56:16 +0000</pubDate>
		<dc:creator>Mark Monica</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby On Rails Blogs]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Rails Conf]]></category>
		<category><![CDATA[RailsConf09]]></category>

		<guid isPermaLink="false">http://markmonica.com/?p=66</guid>
		<description><![CDATA[Next week I'll be attending RailsConf 09 in Las Vegas, NV. Since I'm still pretty new to Rails I'm taking one of the tutorial classes "A-Z Intro to Rails Tutorial" and the presenter has already provided info from his site. Cool!]]></description>
			<content:encoded><![CDATA[<p>Next week I'll be attending RailsConf 09 in Las Vegas, NV.   Since I'm still pretty new to Rails I'm taking one of the tutorial classes "A-Z Intro to Rails Tutorial" and the presenter has already provided <a href="http://blog.adsdevshop.com/2009/04/22/getting-set-up-for-the-a-z-intro-to-rails-tutorial/" target="_blank">info from his site</a>.  Cool!</p>
]]></content:encoded>
			<wfw:commentRss>http://markmonica.com/2009/04/29/railsconf-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ROR Error: undefined method `include_root_in_json=&#8217; &#8230;</title>
		<link>http://markmonica.com/2009/03/06/error-undefined-method-include_root_in_json/</link>
		<comments>http://markmonica.com/2009/03/06/error-undefined-method-include_root_in_json/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 15:15:59 +0000</pubDate>
		<dc:creator>Mark Monica</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby On Rails Blogs]]></category>
		<category><![CDATA[Aptana Studio]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Radrails]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Rails 2.0]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://markmonica.com/?p=40</guid>
		<description><![CDATA[Background Upon continuing a Ruby on Rails project after a few months delay, Aptana Studio's RadRails editor installed some updates.  I suspect something that  changed in Rails itself (GEM update) caused the error I received. Error Message undefined method `include_root_in_json=' for ActiveRecord::Base:Class (NoMethodError) Solution To fix this error rename the config/initializers/new_rails_defaults.rb to config/initializers/new_rails_defaults.rb.bak. It appears [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>Upon continuing a Ruby on Rails project after a few months delay, Aptana Studio's RadRails editor installed some updates.  I suspect something that  changed in Rails itself (GEM update) caused the error I received.</p>
<h3>Error Message</h3>
<p><span style="color: #ff0000;"><em>undefined method `include_root_in_json=' for ActiveRecord::Base:Class (NoMethodError)</em></span></p>
<h3>Solution<em><br />
</em></h3>
<p>To fix this error rename the <span style="color: #008000;"><em>config/initializers/new_rails_defaults.rb</em></span> <strong>to</strong> <em><span style="color: #008000;">config/initializers/new_rails_defaults.rb.bak</span>.<br />
</em></p>
<p>It appears that the old code placed in these files no longer works with ROR 2.0.2.</p>
<blockquote><p># These settings change the behavior of Rails 2 apps and will be defaults<br />
# for Rails 3. You can remove this initializer when Rails 3 is released.</p>
<p># Include Active Record class name as root for JSON serialized output.<br />
ActiveRecord::Base.include_root_in_json = true</p>
<p># Store the full class name (including module namespace) in STI type column.<br />
ActiveRecord::Base.store_full_sti_class = true</p>
<p># Use ISO 8601 format for JSON serialized times and dates.<br />
ActiveSupport.use_standard_json_time_format = true</p>
<p># Don't escape HTML entities in JSON, leave that for the #json_escape helper.<br />
# if you're including raw json in an HTML page.<br />
ActiveSupport.escape_html_entities_in_json = false</p></blockquote>
<p>The file now created in a new project appears as follows:</p>
<blockquote><p># These settings change the behavior of Rails 2 apps and will be defaults<br />
# for Rails 3. You can remove this initializer when Rails 3 is released.</p>
<p>if defined?(ActiveRecord)<br />
# Include Active Record class name as root for JSON serialized output.<br />
ActiveRecord::Base.include_root_in_json = true</p>
<p># Store the full class name (including module namespace) in STI type column.<br />
ActiveRecord::Base.store_full_sti_class = true<br />
end</p>
<p># Use ISO 8601 format for JSON serialized times and dates.<br />
ActiveSupport.use_standard_json_time_format = true</p>
<p># Don't escape HTML entities in JSON, leave that for the #json_escape helper.<br />
# if you're including raw json in an HTML page.<br />
ActiveSupport.escape_html_entities_in_json = false</p></blockquote>
<h4>Footnotes</h4>
<p><em>See  <a href="http://www.hostingrails.com/1461/dbmigrate-undefined-method-include_root_in_json" target="_blank">http://www.hostingrails.com/1461/dbmigrate-undefined-method-include_root_in_json</a> for more help with this error.<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://markmonica.com/2009/03/06/error-undefined-method-include_root_in_json/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scientific Web Design: 23 Actionable Lessons from Eye-Tracking Studies</title>
		<link>http://markmonica.com/2007/11/15/scientific-web-design-23-actionable-lessons-from-eye-tracking-studies/</link>
		<comments>http://markmonica.com/2007/11/15/scientific-web-design-23-actionable-lessons-from-eye-tracking-studies/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 19:28:33 +0000</pubDate>
		<dc:creator>Mark Monica</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://markmonica.com/2007/11/15/scientific-web-design-23-actionable-lessons-from-eye-tracking-studies/</guid>
		<description><![CDATA[Eye-tracking studies are hot in the web design world, but it can be hard to figure out how to translate the results of these studies into real design implementations. These are a few tips from eye-tracking studies that you can use to improve the design of your blog or site. read more &#124; digg story]]></description>
			<content:encoded><![CDATA[<p>Eye-tracking studies are hot in the web design world, but it can be hard to figure out how to translate the results of these studies into real design implementations. These are a few tips from eye-tracking studies that you can use to improve the design of your blog or site.</p>
<p><a href="http://www.virtualhosting.com/blog/2007/scientific-web-design-23-actionable-lessons-from-eye-tracking-studies/">read more</a> | <a href="http://digg.com/design/Scientific_Web_Design_23_Actionable_Lessons_from_Eye_Tracking_Studies">digg story</a></p>
]]></content:encoded>
			<wfw:commentRss>http://markmonica.com/2007/11/15/scientific-web-design-23-actionable-lessons-from-eye-tracking-studies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
