January 2008 - Posts

29 January 2008
The blog is (moving) reopening :)
to the weblogs.asp.net site. Since most of the content I write is web related, I think it makes sense to start writing my posts over there . I'm not going to close this blog since I'm not migrating my old posts. If you want to keep following my blog and you're consuming my feedburner feed... Read More...
29 January 2008
Making NHibernate play nice with TransactionScope
Another day with NHibernate, one more thing learnt...Ok, so if you're going to use NH and you want it to play nice with the TransactionScope class introduced by .NET 2.0 and you're using a provider which is capable on enlisting in an existing transaction (ex.: you're connecting to SQL Server... Read More...
Filed under:
28 January 2008
More NHibernate gotchas
Today I've just wasted a couple of hours trying to get something to make NHibernate persist an custom object graph. My scenario wasn't really complicated and looked something like this: root object --->Item(s)---->Components My root is a reference object which has a collection of other... Read More...
Filed under:
27 January 2008
Application Services III: implementing a win forms credential provider
In the last post on the series we've seen how we can use the new ClientFormsAuthenticationMembershipProvider to authenticate a user. Today we're going to see how we can implement the IClientFormsAuthenticationCredentialsProvider in order to create or own windows forms login form. The IClientFormsAuthenticationCredentialsProvider... Read More...
Filed under:
26 January 2008
Application services II: configuring the client
In the first post of the series, we've configured a web app so that we can use the new application services from a client desktop app. Today we'll see how a windows forms (or other type of client desktop application) can consume those services. After creating a Windows Forms app, we need to start... Read More...
Filed under:
23 January 2008
Are you working with paths?
I believe that everyone has had to (at least once) write code that needs to work with paths. How many of us have gone into writing something like this: String basePath = "c:\\myPath"; String fileName = "myfile.doc"; String completeFilePath = basePath + "\\" + "myfile... Read More...
Filed under: ,
23 January 2008
Application services I: configuring the server
The latest version of ASP.NET introduced several new classes (defined on the System,Web.ApplicationServices, System.Web.ClientServices and System,Web.ClientServices.Providers namespace) which you can use in client apps for using the well known ASP.NET membership, roles and profiles services. Currently... Read More...
Filed under:
16 January 2008
Syndication and WCF
The latest release of .NET has added several interesting new things. One of those is support for Syndication. The System.ServiceModel.Web assembly has several classes that you can use to expose an ATOM or RSS feed. There's already a cool article on how to achieve this which has been published on... Read More...
Filed under: ,
07 January 2008
Are you trying to reduce your lock contention?
Michael Suess has a great blog on parallel programming and concurrency. Even though this post has already got some months, I still recommend it to everyone that wants to improve their knowledge on lock contention reduction. Read More...
Filed under: ,
07 January 2008
ASP.NET AJAX: generating the proxy's JS code on the fly
Before talking about the ProxyGenerator class, I'll have to add one more observations on the previous posts on the new role service: for the code I've shown to work you do need to have an authenticated user. The easiest way to see the previous code working is just to create a new login page which... Read More...
Filed under: ,
06 January 2008
ASP.NET AJAX: Building a custom role service provider
Yesterday I've talked about the new Role service which was introduced by ASP.NET AJAX. Today, I'll keep talking about it and I'll show how easy it is to build a custom role service that is responsible for feeding the client role classes. After enabling the role service , the first thing you... Read More...
Filed under: ,
05 January 2008
ASP.NET AJAX: the new role service
The latest version of the ASP.NET AJAX framework added a new client service which will let you get info about the roles of the current user: I'm talking about the Sys.Services._RoleService. The class exposes two important methods which you might end up using if you need to get info about the roles... Read More...
Filed under: ,
03 January 2008
Making the DataPager generate a block element
I do really like the new paging model introduced with the new ASP.NET 3.5 version. However, there is one thing I don't like: the fact that the DataPager control will always generate an inline element (in this case, a SPAN). So, how can we change this default behavior? Well, I see at least 2 options... Read More...
03 January 2008
XUnit: NotEqual messes parameter order
I've been using XUnit in my last project and I must say that I'm pretty excited with it. Besides letting me throw in the "correct place" (ie, no more ExpectedExceptionAttribute!), I'm really enjoying its simplicity. Unfortunately, there are still some bugs that need to be solved... Read More...
Filed under:
02 January 2008
To use this...or not to use this
I'll just start by wishing you all a great 2008! Now, to what used to be a somewhat philosophical question: should you use this to reference a member of your class in your code? Ex: should you write this.CallInstanceMethod() ? Ok, in pre-C# 3.0, I'd say NO. With the current release, I'm saying... Read More...