# Tuesday, 16 October 2007

Well, it seems I just hit the "magic" border of moderating 10.000 posts since December 18th 2006. A nice achievement but the most important part of it is that it helps out people that are looking for an answer to their question.

Grz, Kris.

Tuesday, 16 October 2007 20:25:45 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Sunday, 14 October 2007

Since I see a lot of questions in the ASP.NET forums that make me believe that people don't always seem to find the information they're after I thought I pointed out to this page: Community support. It lists links to quickstart tutorials, videos, documentation, ...

Grz, Kris.

Sunday, 14 October 2007 18:42:04 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, 11 October 2007
Yesterday I went to the first of 5 sessions for my LEAP course. Taken from the website:

LEAP (Lead Enterprise Architect Program) is meant at complementing the existing skills and experience of aspiring architects with specific architect-level information about Microsoft technology. The acquired knowledge will help the aspiring architect in their day-to-day architectural work.

I found it to be very interesting. Most of the time courses are just sit and listen but this course is all about interaction. First we got some introduction talk and of course a course. Directly afterwards we were divided in groups to think about a possible solution for an architectural problem. After about an hour 2 groups defended their ideas towards each other. The group that I was in almost came out with the same idea like the other group and it was also very alike the approach that Microsoft came up with. I got to know new people, something I always like a lot since I'm not really social challenged. I'm looking forward to the next session already.

Grz, Kris.

Microsoft | SOA | LEAP
Thursday, 11 October 2007 21:24:28 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, 10 October 2007

Yep, a free eBook to download. I have yet to read it myself but already took a quick glance at it. You can download it here.

Also it's been a while since I blogged or been active on the ASP.NET forums. The main reason for this is that I got another project which requires me to travel about 3.5 hours a day minimum. It's an interesting project that uses SCRUM methodology but this means that there are also very tight deadlines to reckon with (and weekend work) and this weighs on my availability to do some digging and providing valuable content to my blog.

If someone knows a decent tutorial about NHibernate and the Validation Application Block that ships with Enterprise Library please leave a comment.

Grz, Kris.

Wednesday, 10 October 2007 08:48:25 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, 14 September 2007
Yes, you're reading correctly, I've bought a brand new macBook pro today. It's quite a new experience for me as I grew up with MS-DOS and Windows. But so far, I like it. I'll probably dual boot it with Windows Vista but I'm also interested in learning Mac OS X. Something I already found out is that it's a very silent notebook and that it doesn't warm up that much like my Dell Latitude D505 does. On the other hand it's still strange to only have 1 mouse button available and so far I haven't found the "End" key to jump to the last place on a line while typing.

In case you're wondering, it's the 15.4" edition, 2,4GHz edition. Up until now, I like what I see. 1 thing I like in particular is the background light on the keyboard.

Grz, Kris.

Friday, 14 September 2007 23:38:11 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [2]  | 

Always nice to see a working example when learning something new. I just noticed that the list of starter kits has grown. Be sure to check them out. It seems that there are already 3 versions of the Club Starter Kit, 1 created by Microsoft people and 2 extended versions by the community. Also take a look at the, just started, starterkits.org site.

Grz, Kris.

Technorati tags: , ,
Friday, 14 September 2007 09:26:30 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  | 
# Sunday, 09 September 2007

Standard out of the box ASP.NET 2.0 uses SQL Server Express for the Application Services (Membership, Roles, ...). However sometimes you don't want it to be like that because you don't want to pay extra for SQL Server to your hosting company. In the past you practically had to rewrite your application or at least the Data Access Layer to be able to use an alternative database. Thanks to the Provider model that's being used by ASP.NET 2.0 it's possible to develop an application while another team could create an alternative provider and afterwards use some configuration to let your application make use of this new provider.

So, when you're reading this, it means you're interested in changing your default SQL Server based applications services to Access. First of all make sure that you download the Sample Access Providers provided by Microsoft.
This is a .vsi file and you could run it to get installed. But rather then doing that, you simply rename the extension from vsi to zip. That's right, you simply rename it and use a zip utitlity, like the built in zip functionality of Windows to extract the files.

accessproviders01 
Figure 1: the unpacked Sample Access Providers

These are the files I got after extracting the .zip file. You see there's already a full blown ASPNetDB.mdb file in it that has the needed tables and queries to be able to support  the Application Services. Figure 2 shows what's already available. As you can see

accessproviders03
Figure 2: Overview of the available tables and queries in the accompanied Access database file.

After extracting the files we still need to compile the source code in order to be able to integrate the providers into our web application. If you have Visual Studio or Visual C# Express installed you open your IDE of choice. You navigate to the menu and click File, Open, Project/Solution. Once the dialog opens you navigate to where you extracted the contents of the zip file. Select the Access.csproj, see Figure 1, and click the Open button.

Once opened you can see the following in the solution (Figure 3). Now you just have to build the solution, preferably in Release mode.

accessproviders04
Figure 3: solution

Ok, the output of building the solution provides us with an assembly named SampleAccessProviders.dll. To find it back you just need to open a windows explorer and navigate to the place where you extracted the zip file to. There you should see a newly created subfolder called bin and in that one that's called Release. In the Release folder you'll find the built assembly.

Now that we have created the assembly it's time to actually use it. Open your Visual Studio or Visual Web Developer Express and create a new website. In the project you create a new subfolder called bin. After creation right click on it and choose Add existing item... from the context menu that appears. Navigate to the place where the built assembly is. Add it to the bin folder of the website project. After that repeat the same thing with the access database (ASPNetDB.mdb) file but this time put it in the dedicated folder App_Data which is one of the predefined ASP.NET 2.0 subfolders.

Open the web.config file of the website project. You'll need to make some adjustments here in order to be able to use it Access provider. When you take a look at figure 1 you'll see that the extracted zip file also contains a web.config. It already contains the needed parts so the only thing required is just to copy paste the needed configuration parts.
First of all the connectionstring to the access database:

    <connectionStrings>
        <add name="AccessFileName" connectionString="~/App_Data/ASPNetDB.mdb" providerName="System.Data.OleDb"/>
    </connectionStrings>

 Also be sure to change the authentication mode which defaults to Windows. Make it use Forms instead like this:

<authentication mode="Forms">
  <forms loginUrl="mylogin.aspx" defaultUrl="Login.aspx"/>
</authentication>

After that you can simply copy in the providers that you need. In this tutorial I'll only copy in the Membership provider part:

<membership defaultProvider="AccessMembershipProvider">
    <providers>
        <clear/>
        <add name="AccessMembershipProvider" 
                type="Samples.AccessProviders.AccessMembershipProvider, SampleAccessProviders" 
            connectionStringName="AccessFileName" 
            enablePasswordRetrieval="false" 
            enablePasswordReset="false" 
            requiresUniqueEmail="false" 
            requiresQuestionAndAnswer="false" 
            minRequiredPasswordLength="1" 
            minRequiredNonalphanumericCharacters="0" 
            applicationName="SampleSite" 
            hashAlgorithmType="SHA1" 
            passwordFormat="Hashed"/>
    </providers>
</membership>

Other provider parts, like the Roles and Profile, are just as easily copied.

Just to see if things are working is quite easy. Just open the ASP.NET Configuration Tool. You do that by navigating to the menu and click Website, ASP.NET Configuration. A browser opens with the tool in place. Click the fourth tab (Provider). Select the second link ("Select a different provider for each feature (advanced)). There you'll see that the access provider is selected (figure 4)

accessproviders05
Figure 4: Provider tab in the ASP.NET Configuration Tool

In the membership configuration you notice the <clear/> tag. This clears all previous settings from a hierarchical higher configuration. If you remove that particlar line you'll see that you get another radiobutton option that lists the default AspNetSqlMembershipProvider. If you would select that option SQL Server's used again. 

Grz, Kris.

Sunday, 09 September 2007 21:25:12 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  | 
# Friday, 31 August 2007

C#3.0 and LINQ offer new and compelling features to developers. You can get to know both better by taking a look at these hands on labs provided by Microsoft:

  • LINQ and language samples for Visual Studio 2008 Beta 2
  • LINQ Hands On Labs
  • C# 3.0 Language Enhancements Hands On Lab
  • Grz, Kris.

    Friday, 31 August 2007 18:01:16 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 

    VISUG offers a presentation, given by my buddy Gill Cleeren, on Silverlight. I'll be attending it and I hope to see several of my other friends there as well. If you're in the neighbourhood and have interest in this new technology be sure to be there. You can still register but hurry up as places are being filled up rapidly.

    The place to be is at Ordina in Schelle. To see who already registered take a look at the VISUG site.

    This is what'll be covered:

    • Introduction to XAML
    • Silverlight 1.0 with Javascript
    • Silverlight 1.1 with .net
    • Blend 2 and Silverlight
    • Features of the final platform to come

    Grz, Kris.

    Friday, 31 August 2007 16:30:29 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
    # Tuesday, 28 August 2007

    You just got to love this, when you download a starter kit, and run the .vsi file it doesn't only get into the available templates of Visual Studio 2005 but also in the templates of Visual Studio 2008 Beta 2, which I have installed side by side at the moment. When creating a new website, based on such a starter kit, I got to see this dialog:

    upgrade_visualstudio2008_vs

    I was thinking that I needed to copy paste the zip file, which gets created when you use the .vsi file to install, but it just installed on both locations. Great!

    Do you have an ASP.NET starter kit that you think that might be interesting for other people? If so please post it on the Announcements forum or you can upload it on this new dedicated site: http://starterkits.org/ which was created by my co-moderator/MVP Curt.

    Grz, Kris.

    Tuesday, 28 August 2007 21:52:48 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  |