<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>antony_scott - Latest Comments</title><link>http://antonyscott.disqus.com/</link><description></description><atom:link href="https://antonyscott.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 09 Aug 2012 08:07:33 -0000</lastBuildDate><item><title>Re: Using Hg convert to move projects between repositories</title><link>http://sixgun.co.uk/blog/2012/08/01/using-hg-convert-to-move-projects-between-repositories/#comment-614397903</link><description>&lt;p&gt;I used this "technique" again today, but I tried pulling one project over at a time and for whatever reason it didn't do anything the second time. So, I just started again and put both projects in my filemap.txt&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Antony Scott</dc:creator><pubDate>Thu, 09 Aug 2012 08:07:33 -0000</pubDate></item><item><title>Re: Tooltips on disabled buttons</title><link>http://sixgun.co.uk/blog/2006/03/10/tooltips-on-disabled-buttons/#comment-563072462</link><description>&lt;p&gt;It did indeed! I found a number of gross, complicated ways to get disabled UI objects to display their tooltips, before I found this - still gross, perhaps, given it uses a pinvoke, but we use loads of pinvoke calls already, and at least it's simple and obvious what it's doing.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">neminem</dc:creator><pubDate>Wed, 20 Jun 2012 16:19:13 -0000</pubDate></item><item><title>Re: Standing up to work: Day 3</title><link>http://sixgun.co.uk/blog/2012/06/13/standing-up-to-work-day-2-2/#comment-556492489</link><description>&lt;p&gt;ha ha - off to run an errand aka picking up your son from nursery and running the gauntlet home with the scooter!!!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sue</dc:creator><pubDate>Wed, 13 Jun 2012 15:06:48 -0000</pubDate></item><item><title>Re: ASP.NET Web Api Basic Authentication</title><link>http://sixgun.co.uk/blog/2012/02/29/asp-net-web-api-basic-authentication/#comment-551746444</link><description>&lt;p&gt;with MVC4 RC Microsoft changed how the authentication token is handled.&lt;/p&gt;&lt;p&gt;By disassembling the System.Web.Http.AuthorizeAttribute, I found that I had to change line 24 of the posted code to something similar to this:&lt;br&gt;Thread.CurrentPrincipal = new GenericPrincipal(identity, new string[0]);&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kralizek</dc:creator><pubDate>Fri, 08 Jun 2012 08:11:36 -0000</pubDate></item><item><title>Re: ASP.NET Web Api Basic Authentication</title><link>http://sixgun.co.uk/blog/2012/02/29/asp-net-web-api-basic-authentication/#comment-531359067</link><description>&lt;p&gt;Antony, thanks for the code - I can't believe there isn't a built-in solution for this with webapi.&lt;/p&gt;&lt;p&gt;One thing others might find useful though is to enable Roles with the Authorize attribute just change &lt;/p&gt;&lt;p&gt;request.Properties.Add(HttpPropertyKeys.UserPrincipalKey, new GenericPrincipal(identity, new string[0])); &lt;/p&gt;&lt;p&gt;to&lt;/p&gt;&lt;p&gt;request.Properties.Add(HttpPropertyKeys.UserPrincipalKey, new GenericPrincipal(identity, Roles.GetRolesForUser(credentials.Username)));&lt;/p&gt;&lt;p&gt;I also had to remove the existing UserPrincipalKey property before I could add the new one (not sure why that was).&lt;/p&gt;&lt;p&gt;Thanks again,&lt;br&gt;Clint&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Clint Chapman</dc:creator><pubDate>Thu, 17 May 2012 14:24:40 -0000</pubDate></item><item><title>Re: ASP.NET Web Api Validation with Data Annotations</title><link>http://sixgun.co.uk/blog/2012/03/28/asp-net-web-api-validation-with-data-annotations/#comment-515228049</link><description>&lt;p&gt;Sorry, it's a bit difficult to say without more information. I suggest you ask a question on stackoverflow giving as much information as you can.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Antony Scott</dc:creator><pubDate>Tue, 01 May 2012 15:01:05 -0000</pubDate></item><item><title>Re: ASP.NET Web Api Validation with Data Annotations</title><link>http://sixgun.co.uk/blog/2012/03/28/asp-net-web-api-validation-with-data-annotations/#comment-514881039</link><description>&lt;p&gt;while trying to access this set of api with using php cURL it returns  likes this&lt;br&gt;{ToEmailAddress: [ ]}&lt;/p&gt;&lt;p&gt;Any Ideas why ? for the following code.&lt;/p&gt;&lt;p&gt;$result=json_encode($web-&amp;gt;api('TellAFriend', array(&lt;br&gt;            'ToName'=&amp;gt;'John Doe',&lt;br&gt;            'ToEmailAddress'=&amp;gt;'wrongemailaddreess"&lt;br&gt;        )));&lt;br&gt;echo($result);&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anuj Pandey</dc:creator><pubDate>Tue, 01 May 2012 07:28:28 -0000</pubDate></item><item><title>Re: ASP.NET Web Api Basic Authentication</title><link>http://sixgun.co.uk/blog/2012/02/29/asp-net-web-api-basic-authentication/#comment-506814980</link><description>&lt;p&gt;that's a very good question!&lt;/p&gt;&lt;p&gt;tbh, I am not sure how to get that functionality. I would be very interested to find out though. It sounds like a stackoverflow question in the making ;)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Antony Scott</dc:creator><pubDate>Mon, 23 Apr 2012 09:46:11 -0000</pubDate></item><item><title>Re: ASP.NET Web Api Basic Authentication</title><link>http://sixgun.co.uk/blog/2012/02/29/asp-net-web-api-basic-authentication/#comment-506809612</link><description>&lt;p&gt;Alright, now I got it to run. But it gets invoked even if there is no [Authorize] attribute on the called action. How would I got about to make this messagehandler only run for actions with the [Authorize] attribute? Or would I need to implement my own &lt;br&gt;AuthorizationFilterAttribute to be able to get that kind of control?&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John</dc:creator><pubDate>Mon, 23 Apr 2012 09:41:41 -0000</pubDate></item><item><title>Re: ASP.NET Web Api Basic Authentication</title><link>http://sixgun.co.uk/blog/2012/02/29/asp-net-web-api-basic-authentication/#comment-506636709</link><description>&lt;p&gt;it looks like you got your answer via stack overflow. An earlier version of my message handler did have code in place to send back the WWW-Authenticate header in the response, but for some reason I couldn't quite get it to work properly. I found that the framework was adding other authenticate header in there as well so my client ended up picking the wrong (ie - non Basic) authentication method. The solution I posted in this blog article assumes the caller knows what needs authenticating and what method to use. Which I've handled by publishing documentation along with my API. Not ideal, but it does the job :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Antony Scott</dc:creator><pubDate>Mon, 23 Apr 2012 05:04:32 -0000</pubDate></item><item><title>Re: ASP.NET Web Api Basic Authentication</title><link>http://sixgun.co.uk/blog/2012/02/29/asp-net-web-api-basic-authentication/#comment-506631866</link><description>&lt;p&gt;What should happen in that case is the handler will just let the request continue. Then the framework should see the [Authorize] attribute on the method and send back a 401 response because there is no Principal within the request properties. I used a chrome extension to make sure all of this worked. I also wrote a test client application which can be driven by xml test data (ie - expected response codes for given requests). If you're still having problems I can post that code too.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Antony Scott</dc:creator><pubDate>Mon, 23 Apr 2012 05:00:29 -0000</pubDate></item><item><title>Re: ASP.NET Web Api Basic Authentication</title><link>http://sixgun.co.uk/blog/2012/02/29/asp-net-web-api-basic-authentication/#comment-506629691</link><description>&lt;p&gt;My authentication doesn't follow a flow as such, that is really up to the client to figure out.&lt;/p&gt;&lt;p&gt;If a request requires authentication and the credentials are not supplied via the "Auth" header then a 401 is returned. If the client sends an anonymous request which returns a 401 it is down to the client to try again with credentials.I've only used a chrome extension to test the authentication side of my API and that sets the Authorization header. Which is also what my clients will be doing.I have also written some test client code using the new HttpClient class (it came along at the same time as the Web Api) and again, I just set the Authorization header and got back the expected results.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Antony Scott</dc:creator><pubDate>Mon, 23 Apr 2012 04:56:51 -0000</pubDate></item><item><title>Re: ASP.NET Web Api Basic Authentication</title><link>http://sixgun.co.uk/blog/2012/02/29/asp-net-web-api-basic-authentication/#comment-502114989</link><description>&lt;p&gt;Thanks for sharing - helped me get a kick start to securing my Web API controllers!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Gray</dc:creator><pubDate>Thu, 19 Apr 2012 06:43:40 -0000</pubDate></item><item><title>Re: ASP.NET Web Api Basic Authentication</title><link>http://sixgun.co.uk/blog/2012/02/29/asp-net-web-api-basic-authentication/#comment-501032306</link><description>&lt;p&gt;Hi Antony. Sort of works, but the Authorization header is always blank when I call the service. I have explained it here: &lt;a href="http://stackoverflow.com/questions/10215515/asp-net-web-api-authorization-header-blank" rel="nofollow noopener" target="_blank" title="http://stackoverflow.com/questions/10215515/asp-net-web-api-authorization-header-blank"&gt;http://stackoverflow.com/qu...&lt;/a&gt;. Any ideas?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nick</dc:creator><pubDate>Wed, 18 Apr 2012 14:23:14 -0000</pubDate></item><item><title>Re: ASP.NET Web Api Basic Authentication</title><link>http://sixgun.co.uk/blog/2012/02/29/asp-net-web-api-basic-authentication/#comment-499702150</link><description>&lt;p&gt;Thanks for a great post. Can't really get it to work though. Even if request.Headers.Authorization is null (line 18), my action method with the [Authorize] attribute still gets invoked. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John</dc:creator><pubDate>Tue, 17 Apr 2012 07:21:03 -0000</pubDate></item><item><title>Re: ASP.NET Web Api Basic Authentication</title><link>http://sixgun.co.uk/blog/2012/02/29/asp-net-web-api-basic-authentication/#comment-499615304</link><description>&lt;p&gt; Can you also post the code sample for consuming such a service using HttpClient..&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Binoj Antony</dc:creator><pubDate>Tue, 17 Apr 2012 03:37:13 -0000</pubDate></item><item><title>Re: I think it&amp;#8217;s my destiny to be a grumpy old man!</title><link>http://sixgun.co.uk/blog/2011/12/12/i-think-its-my-destiny-to-be-a-grumpy-old-man/#comment-439746467</link><description>&lt;p&gt;Haha, that was actually quite funny. +1&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Guest</dc:creator><pubDate>Wed, 15 Feb 2012 07:55:00 -0000</pubDate></item><item><title>Re: Media PC Build</title><link>http://sixgun.co.uk/blog/media-pc-build/#comment-415154027</link><description>&lt;p&gt;I am happy for you to use parts of the blog post as long as you give credit and a link to the original post.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Antony Scott</dc:creator><pubDate>Thu, 19 Jan 2012 06:03:10 -0000</pubDate></item><item><title>Re: Automatically Adding Entity Framework Config Classes to the ModelBuilder</title><link>http://sixgun.co.uk/blog/2011/08/31/automatically-adding-entity-framework-config-classes-to-the-modelbuilder/#comment-415152660</link><description>&lt;p&gt;Why do you need pictures in a post which is talking about coding?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Antony Scott</dc:creator><pubDate>Thu, 19 Jan 2012 06:02:06 -0000</pubDate></item><item><title>Re: Media PC Build</title><link>http://sixgun.co.uk/blog/media-pc-build/#comment-415151475</link><description>&lt;p&gt;I'm using disqus for comments now. Do you have multiple email addresses registered with that service?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Antony Scott</dc:creator><pubDate>Thu, 19 Jan 2012 06:01:14 -0000</pubDate></item><item><title>Re: Smooth 1080p MKV playback, FINALLY!</title><link>http://sixgun.co.uk/blog/2011/11/29/smooth-1080p-mkv-playback-finally/#comment-415148993</link><description>&lt;p&gt;It came to approximately £450 for the hardware.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Antony Scott</dc:creator><pubDate>Thu, 19 Jan 2012 05:59:27 -0000</pubDate></item><item><title>Re: Media PC Build</title><link>http://sixgun.co.uk/blog/media-pc-build/#comment-386727888</link><description>&lt;p&gt;Wow, thatâs what I was seeking for, what a information! present here at this website, thanks admin of this site.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Frances Brosky</dc:creator><pubDate>Mon, 12 Dec 2011 06:48:36 -0000</pubDate></item><item><title>Re: Media PC Build</title><link>http://sixgun.co.uk/blog/media-pc-build/#comment-386727889</link><description>&lt;p&gt;When I initially commented I clicked the âNotify me when new comments are addedâ checkbox and now each time a comment is added I get three emails with exactly the same comment. Is there any way you'll be able to remove me from that service? Cheers!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">seo</dc:creator><pubDate>Mon, 12 Dec 2011 01:55:11 -0000</pubDate></item><item><title>Re: Automatically Adding Entity Framework Config Classes to the ModelBuilder</title><link>http://sixgun.co.uk/blog/2011/08/31/automatically-adding-entity-framework-config-classes-to-the-modelbuilder/#comment-386727870</link><description>&lt;p&gt;Just my two cents, but your blog articles will appear additional colorful if you're able to add in some pictures.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">backlinks</dc:creator><pubDate>Sun, 11 Dec 2011 21:25:33 -0000</pubDate></item><item><title>Re: Media PC Build</title><link>http://sixgun.co.uk/blog/media-pc-build/#comment-386727890</link><description>&lt;p&gt;Excellent article and easy to understand explanation. How do I go about getting permission to post part of the article in my upcoming news letter? Giving proper credit to you the author and link to the site would not be a problem.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kaylee</dc:creator><pubDate>Sat, 10 Dec 2011 20:36:25 -0000</pubDate></item></channel></rss>