Wednesday, February 18, 2009

WindowsClient.Net in Miro

In my previous post I was saying that Miro had very little .Net-related content so you had to manually add feeds which is fine but not as simple as using Miro's own channel guide.

Yesterday I did a little testing and added one of the feeds I enjoy quite a lot. It's the WindowsClient.Net feed straight from the Microsoft team responsible for WinForms and WPF. There are plenty of tips and tutorials and if you have Miro installed, you only need to click on the buttong bellow and the channel will be automatically added to your feeds. How cool is that?

Miro Video Player

Tuesday, February 17, 2009

.Net Training with Miro

So I've finally got some free time in between jobs. Now that the job hunting is over, I have some time to find better ways to keep myself trained and up to date in complement to just reading books and online articles.

It's been quite some time I've been using a great little application called Miro. It's basically a RSS reader coupled with a download manager, a video player and a media manager. The result is very elegant and very easy to use, specially in it's recent 2.x release which polished the interface quite well. Until now I've been using it to watch channels from it's integrated guide which allows you to search and click to add new feeds. These feeds are checked in regular intervals and the contents downloaded for easy viewing.

Wanting more than best-of-Youtube kind of content, like .Net related goodness, I set myself to seek out some good feeds that would teach more about all things .Net, more specifically feeds that provide direct links to videos. Once I have the link to the RSS feed it's very easy to add it to Miro and voilĂ , I have a self-updating stream of .Net-related tutorials, discussions and demos. Miro tells me when something new has been downloaded and manages my files by flagging what I've watched and what I haven't. It even cleans up old videos I've seen after a few days unless I mark them for safekeeping.

The only effort is locating the right feeds and unfortunately the Miro guide doesn't have much .Net related content... yet.

Thursday, November 13, 2008

TechEd 2009 - First Impressions

Well, one more day to go and so far it has been interesting yet not quite as exiting as last year. I can't blame them because it was hard to beat announcing Visual Studio 2008 with it's complement of WPF/WF/WCF/LINQ and SQL 2008 among others.

Microsoft did give us an eyeful of Visual Studio 2010 with it's better integration of JavaScript and an enhanced web deployment model. It's obvious that many enhancements are to be expected for WPF and the many other components but it's still too early to show us.

On the Entity Model side of things, VS2010 will bring some often requested things like complex types from the IDE and hopefully POCO amongst other things.

Tuesday, November 27, 2007

Long running web services (.Net WS)

I have some web services that I know are going to take some time to run. They are going to do a lot of stuff so the default timeouts don't apply here. Well, it's actually quite easy to do. First, don't forget to call your web services asynchronously using the provided proxy methods. Then in the web service proxy I affect the Timeout property and set the number of milliseconds I want the timeout to be. You can set -1 for infinite but I wouldn't advise this. Test your server and come up with an expected maximum and add some padding.

On the server side, the default is 110 seconds. By following the provided link, you'll see have to change this setting by adding a line into your Web.Config. Unfortunately you can't set a different timeout for each web method and it will be applied globally to your web service project.

Some help related to the configuration setting: http://msdn2.microsoft.com/en-us/library/e1f13641.aspx

Tuesday, November 20, 2007

Visual Studio 2008 RTM on MSDN!

Well, as suggested by Microsoft, Visual Studio 2008 is RTM today. So all of you with MSDN accounts can go and fetch it.

Speaking of MSDN downloads, expect a totally new look sometime next year. I got to see a prototype during TechEd 2007 and I must say it's much, much, much more friendly then today's version. Searching for downloads should provide more pertinent results and you will no longer need to navigate down deep hierarchies in a tree stuck in a small panel. The downloads tree will have something like two levels maximum. Plus RSS feeds will make an appearance so you wont need to hammer that page until you're favorite RTM comes around. Good stuff.

Friday, November 16, 2007

.Net Configuration & Group Policies

I have a .Net smart-client deployed in several countries and I want to change a value in the configuration file. One way I could do it would be by publishing an updated version with the configuration changes using ClickOnce but that's a bit overkill and risky to release a new version each time a configuration value changes. I could also imagine some fancy ways to get the value from a web service but if I'm getting info like the base web service URL from configuration, I'd fall in a chicken before egg dilemma.

A better alternative, when working in a single domain, is to use Group Policies (GPO). I've modified my smart-client to read from the registry the key corresponding to the GPO. That may sound old-school and with the coming of .Net we've been preached (a lot and rightly so) not to use the registry anymore and that ".config" files where the right way to do things.

Actually, using GPOs doesn't change the way we do things in .Net. It's still a great practice to save user settings in the ".config" files. But when you're managing an application distributed across geographically distributed domain and you feel that some specific settings could change, consider reading the setting from a GPO registry entry. That way before deploying your GPO-aware application, you can ask your friendly IT administrator to create a new GPO for you with your initial value, deploy your application. And when it's time to change the value, just open a ticket/email/call/wake up your IT dude and ask him to change the value.

I've found a good article on implementing GPO aware application on DevX: ASP.NET Configuration and Group Policy, Part 2: Creating and Using Group Policy-Aware Providers. Don't be put away from the title, it talks about ASP.Net but the basic idea works just fine in other type of applications. You also don't need to create a configuration provider and just write some code that fetches the registry value but that's up to you to choose.

Wednesday, November 14, 2007

Dynamically changing URL of a WCF proxy

A couple of weeks ago I was creating a WPF/WCF version of a very simple little application I've made that checks if all my production web services are running correctly. It's really simple, using an existing web service it retrieves the URI of all the current production services, then iterates them and calls a web service method that either returns True is the service has access to the database and all, or False if it doesn't. The little application shows the list of services with a little flag for each. The flag is green if the web service call went well and returned True, red if either the call failed ("hay caramba, time to check IIS!"), or orange if the call is pending.
Simple but very useful when the production server was going bonkers a couple of months ago.

In the old days of .Net 2.0, to change the URI of a web service proxy, you just set the "Url" property, re-set the credentials if you use them and call the method. Now with WCF, I have defined all the bindings in my configuration file, in the SOAP client's EndPoint I set the "Address" property with the URI of my server and I'm done! I don't even need to re-set the credentials that .Net 2.0 used to "forget" when I changed the URL of the proxy.

MyServiceSoapClient securitySoapClient = new MyServiceSoapClient();
for(int i=0; i<list.Count; i++)
{
mySoapClient.Endpoint.Address = new EndpointAddress(myServiceUri[list[i].Uri]);
//Call the service here
}