LA.NET [EN]

January, 2008Archive

Jan 29

The blog is (moving) reopening :,,)

Posted in Uncategorized       Comments Off on 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, then […]

Read the rest of this entry »

Jan 29

Making NHibernate play nice with TransactionScope

Posted in Trivia       Comments Off on Making NHibernate play nice with TransactionScope

2011-01-12 09:58:18

Read the rest of this entry »

Jan 28

More NHibernate gotchas

Posted in Trivia       Comments Off on 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 reference types (Item). Now, the fun part: I was under […]

Read the rest of this entry »

Jan 27

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 interface has only one method: GetCredentials. This method returns an instance of […]

Read the rest of this entry »

Jan 26

Application services II: configuring the client

Posted in ASP.NET       Comments Off on 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 by […]

Read the rest of this entry »

Jan 23

Are you working with paths?

Posted in C#, Trivia       Comments Off on 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.doc”; That was the best possible scenario. How many times did you had […]

Read the rest of this entry »

Jan 23

Application services I: configuring the server

Posted in ASP.NET       Comments Off on 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, you have two options for authentication: Windows or Forms. As you”d expect, using either of these options will end […]

Read the rest of this entry »

Jan 16

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 MSDN, so I”m not going […]

Read the rest of this entry »

Jan 07

Are you trying to reduce your lock contention?

Posted in C#, Trivia       Comments Off on 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 the rest of this entry »

Jan 07

ASP.NET AJAX: generating the proxy''s JS code on the fly

Posted in ASP.NET, MS AJAX       Comments Off on 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 the rest of this entry »

Jan 06

ASP.NET AJAX: Building a custom role service provider

Posted in ASP.NET, MS AJAX       Comments Off on 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 need to do is […]

Read the rest of this entry »

Jan 05

ASP.NET AJAX: the new role service

Posted in ASP.NET, MS AJAX       Comments Off on 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 of the current […]

Read the rest of this entry »

Jan 03

Making the DataPager generate a block element

Posted in Uncategorized       Comments Off on 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 the rest of this entry »

Jan 03

XUnit: NotEqual messes parameter order

Posted in Trivia       Comments Off on 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. Today I”ve just tripped on what I think is […]

Read the rest of this entry »

Jan 02

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 maybe! Why? […]

Read the rest of this entry »