BusinessRx Community

Dedicated to the advancement of software, technology and the people who devote their lives to it.

Welcome to BusinessRx Community Sign in | Join | Help
in Search

BusinessRx Reading List

These blog entries are written by industry experts and leaders. We consider this content to be a good read for any software developer or web technologist.

July 2006 - Posts

  • What's Wrong With This Code?

    The developer who wrote the following code expects to see "Hello World!" printed twice. What will the developer see, and why? (Hint: "Hello, World!" will only appear once).

    using System;

    class Program
    {
        
    static void Main()
        {
            
    Console.WriteLine(Child.Message);
            
    new Child();
            
    Console.WriteLine(Child.Message);
        }
    }

    class Parent
    {
        
    static Parent()
        {
            _message =
    "Hello!";
        }

        
    static public string Message
        {
            
    get { return _message; }
        }

        
    static protected string _message;
    }

    class Child : Parent
    {
        
    static Child()
        {
            _message =
    "Hello, World!";
        }
    }

  • Package Pages, User Controls, and Master Pages for Reuse

    Graham Dyson has an interesting project named WAPUL:

    "WAPUL is a part of a project I've been developing for creating libraries of user controls, pages and master pages (although currently no support for a master page using another master page). Its aim is to avoid bodging or extra leg work when distributing (i.e. just one .dll file)."

    Sharing controls and pages is a feature many people are looking for. Graham has a clever solution using code, a post-build step, and the aspnet_merge tool.

  • Common Gotcha: Slow VS 2005 Web Site Build Performance Because of “Dueling Assembly References”

    Symptom:

    When building a VS 2005 Web Site Project you experience very slow build times – where compilation seems to mysteriously pause for 30+ seconds (or even minutes), before continuing each time you do a build or F5 of the project.

    This compilation performance slow-down might be the result of a problem I call “dueling assembly references”.  This can occur when you setup multiple “automatic refresh enabled” file-system assembly references within your web site project to multiple assemblies that in turn share common assembly dependencies whose version numbers are different.  The post below describes this in more detail and how to fix it.

    Some background on how file-assembly references work:

    Developers using VS 2005 Web Site Projects can add references to assemblies in multiple ways.  When you right-click on a project and choose the “Add Reference” menu option, it provides a dialog like the one below that allows you to reference .NET assemblies registered in the GAC, class libraries built as projects in the same VS solution, COM components, and file-path based assemblies that you pick using the “Browse” tab of the “Add References” dialog:

    When you add a file-system based assembly reference using the “Browse” dialog above, VS 2005 Web Sites will copy the assembly picked into the \bin directory of the project as well as (by default) add a .refresh file into the \bin directory that contains a relative path string that points back to the original assembly path location:

    When you build the solution, VS will automatically check those assemblies with .refresh files to see if a newer version of the assembly is available, and if so automatically re-copy the assembly and re-compile the solution using it.  This avoids you having to manually update the assembly yourself every time it changes (it also avoids you having to check-in the assembly under source control).  If you don’t want this “automatic refresh” capability, you can delete the .refresh file – in which case VS will not check the timestamp nor update the assembly for you.

    Because assemblies often have dependent assembly references, Visual Studio will also automatically copy dependent assemblies that a reference assembly requires into the \bin directory of the target web-site as well.  For example: if you setup a file-based reference to ClassLibrary1.dll, which in turn uses an assembly called SharedLibrary.dll that resides in the same directory, Visual Studio will make sure both assemblies are copied into the Web Site’s \bin directory (note: if it didn’t do this then the app would fail to run).

    Dueling Assembly Reference Problem

    The problem I refer to as a “dueling reference” occurs when you setup multiple file-based references to assemblies from a VS 2005 Web Site Project that are each updated dynamically (using .refresh files), and which in turn have dependencies on different versions of a common shared assembly library.  

    For example, assume your web-site has a reference to AssemblyA.dll and AssemblyB.dll – which in turn each reference AssemblyC.dll.  This will work without problems if the referenced AssemblyC.dll is the same version for both AssemblyA.dll and AssemblyB.dll.  But it will cause problems if the AssemblyC.dll being used is different between the two:

    In cases where AssemblyC.dll is different, VS ends up copying the AssemblyC.dll file twice for each build – since it continually thinks that the assembly has been updated (once for each reference).  This ends up requiring all references to be recalculated by the compiler, and a full re-build to occur within the IDE.  This will cause build performance to slow down dramatically, and will cause builds to appear to pause as VS does this reference recalculation and fix-up on every single build.

    How to Fix This Problem

    There are a couple of ways to fix this problem:

    1) The “most correct” way to fix this issue is to make sure your class library references are built against the same version of any dependent assemblies.   This is good to-do not just to fix the above build performance problem, but also because it decreases the likelihood of introducing hard to figure out bugs in your application (at runtime only one version of the shared assembly is going to be used –so if you don’t fix this at least one of your dependent assemblies will end up running against an assembly it wasn’t built/unit-tested with).

    2) The “easiest quick fix” way to resolve this issue is to modify one or more of your assembly file-based references to not be “automatic refresh enabled”.  You can do this by deleting the .refresh files within your \bin directory that produce that shared conflict.  This will avoid having VS auto-update the assemblies, and so will prevent the dueling update conflict altogether.   You might find it useful to quickly disable this behavior by deleting the .refresh files as a stop-gap, and then re-enable the auto-refresh behavior once you fix the shared assembly conflicts.

    Note that VS 2005 Web Application Projects don’t have this dueling reference issue (since they don’t use .refresh files for file-assembly references).  So you won’t have this build-performance problem with it (instead it will just pick one version of the shared assembly to use).   However, you still want to be careful about cases where you have two components built against two separate versions of a shared assembly – since this can still cause hard to understand behavioral bugs at runtime that end up bypassing your carefully written unit-tests (which were run against a different version of the shared assembly).

    Hope this helps,

    Scott

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • Atlas “How Do I?” Video Series Begins

    Earlier this spring we published a really popular series of short, focused, online ASP.NET videos that we called the “How Do I?” series.  The series walked through how to use Visual Web Developer to take advantage of the cool new ASP.NET 2.0 features like Master Pages, Membership, Role Management, Profiles, 3-tier Data Access, Themes, Web Parts, etc.

    If you haven’t watched these videos yet, I'd highly recommend setting aside an hour or two to review them all (each video is only 10-15 minutes long).  They are a really great way to quickly obtain a very good understanding of the new ASP.NET 2.0 features and how they all fit together.  You can watch each video online for free here.

    The series was so popular that we asked Joe Stagner to join the ASP.NET team fulltime to help us produce even more.  Our plan is to have him publish a brand new ASP.NET “How Do I?” video on the www.asp.net web-site each week going forward from now on.

    The first set of videos that Joe is building out will cover how to use Atlas to build Ajax applications with ASP.NET.   This week he published the first two videos on this:

    You can watch them both on the www.asp.net site from this page.  Make sure to check back each week to watch new videos as they get published.

    Hope this helps,

    Scott

    P.S. For other good Atlas Samples + Tutorials, please read my previous post on Atlas Tutorials + Samples here.

    P.P.S. AlanL from Vertigo has been posting some really nice tutorials on how to use some of the controls within the Atlas Control Toolkit.  I’d recommend checking out these two great posts to read: Atlas: Creating Better Looking Checkboxes with the ToggleButtonExtender and Atlas: Creating a Confirmation Using the ModalPopup Extender

     

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • Dependency Property Notes

    I've run into dependency properties in both Windows Presentation Foundation and Windows Workflow Foundation. In trying to understand what they do, I ran across Drew Marsh's excellent introduction - "Avalon: Understanding DependencyObject and DependencyProperty". Drew's article has a WPF slant and I've mostly been seeing dependency properties from the workflow side.

    In WF, dependency properties enable three features:

    • Attached properties
    • Activity binding
    • Meta properties

    The attached property story in WF is similar to the attached property story in WPF - a parent object can add additional state to the children it manages. A WPF grid will attach Row and Column properties to its children. The dynamically attached properties allow the grid to store layout state in each child. In WF, the Conditioned Activity Group can attach a When property to each child. The When property holds a condition for the CAG to evaluate before running a child activity.

    Activity binding gives a dependency property an ActivityBind object to evaluate when asked for its value. The ActivityBind can point to other fields, properties, or methods of activities inside a workflow. One activity could bind its input properties to a previous activity's outputs. Binding makes the data flow a part of the workflow model.

    The behavior of meta properties caught me off guard. There are two types of dependency properties in WF activities: meta properties and instance properties. We set meta properties at design time and cannot change their value at runtime (they can't use binding, either). I think meta properties exist to guarantee the integrity of an activity. At runtime, I can't change the InterfaceType of a CallExternalMethod activity and screw up the rest of the parameter bindings because InterfaceType is a meta-property.  

    Dependency properties are easier to understand once you see the use cases. You have to wonder if we'd be talking about dependency properties a all if the mainstream CLR languages were more dynamic.

  • Rules to Better Software Development

    I found this great guide to .NET best practices the other day from SSW discussing recommended coding standards.  It provides a categorized list of best practices to follow when doing software (and specifically .NET) development.  You can read the .NET best practices guide here.  Very useful stuff. 

    Hope this helps,

    Scott

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • Review of the Creative Zen Vision:M

    I'm the owner of a new 30GB Zen Vision:M. The Vision:M is a portable media center and plays both MP3s and videos. The unit currently retails between $269 and $299.

    The 320x240 2.5'' LCD display looks remarkably good, even with the brightness setting at 50%. The Vision:M is a bit thicker and heavier compared to its iCompetitor, but has more color (262k versus 65k), and supports more file formats (DivX, XviD, MPEG 1/2/4, and WMV all play). I'll take function over form. The rechargeable Li-Ion battery lasted over 10 hours on a mix of video and audio (mostly audio).

    I did not install the bundled software. Windows Media Player 10 recognized the device and synchronized content without any fuss. I've synched music, TV shows from a Media Center, and movies in WMV and DivX format. Of course, not everything you can record with Media Center will synch with an external device, thanks to the pinheads at the MPAA.

    The only problem I've had is with an MSDN web cast. It seems there is an extra stream in the web casts and the stream confuses WMP. Fortunately, Marauderz M2PMCEncoderZX converts the MSDN file, and adds some additional options for anyone who is unhappy with the default conversion settings WMP uses for portable media centers.

    The Vision:M synchronizes and charges through a USB connection, but requires a small dongle to adapt the USB connector to the unit itself. A full USB re-charging takes about 4 hours. The dongle includes connections for a charging with a DC adapter, and an A/V out. Creative made life more difficult (and more expensive) by not using a standard camcorder pinout for the 3.5mm AV jack. A little bit of splicing can work around this problem.

    A touch pad on the front scrolls through menus. It can take some time to become accustomed to the touchpad, but the sensitivity is adjustable. The Vision:M also includes a microphone and FM stereo receiver (but no line input). A PIM is included that will sych with Outlook, although I haven't tried this feature (it requires an install of the bundled software, which I've have not tried).

    Overall, thumbs up for the Creative Zen Vision:M.

  • FireFox Updates with no Warning in middle of Work

    I'm all for really trying to push updates needed for security on people by default, as long as there are options to disable that "feature", but it seems FireFox is a little overzealous.  Apparently the FireFox team just released v1.5.0.5, and so browser automatically found that update and installed it, which was the default setting.  What's the problem?  I had several pages open, and I was doing some real work in one (actively typing in an edit box), when with no warning all of my pages were simply closed and the install just started.  I cannot recall any application that doesn't give you a warning if you're currently woring in it before proceeding with an update, even when things are configured to be automatic with no user interaction.  Yes, I realize there is an option to ask me what I want to do instead of being automatic, but I think the difference should be that "ask me" does not do it automatically even when I'm not working, giving me complete control, while "automatic" should still give me a warning to save my work and close things if I am in the middle of things.  What do you think?
    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • Narrative JavaScript

    I stumbled across Narrative JavaScript this weekend.

    NJS uses a compiler to generate asynchronous JavaScript from procedural JavaScript. You write simple code with local variables and blocking operations. NJS takes the simple code and spits out JavaScript with all the callbacks and asynchronous goo. It's like programming with continuations.

    I wonder if Nikhil could add something like this to ScriptSharp.

  • Pickup Lines In .NET

    Imagine if everyone in the world knew .NET programming. The world might be a bit strange, but at least these pickup lines might work.

    If I were a generic collection, I'd be strongly typed for you.

    You must be the latest version, because I've been checking you out.

    I have a small problem. I put an object in a Dictionary, but I lost the key! Can you come back to my place and help me look for it?

    A TypeConverter just returned my heart, and it's ready to assign to you.

    Let's turn off option strict and do some late night binding.

    So, what's your hash code?

  • It's Getting Crowded in the ThreadPool

    It seems everybody loves the thread pool. The default scheduler in Windows Workflow uses the thread pool, as does ASP.NET and the BeginInvoke method of every delegate. There is only one pool per process, which seems a bit limiting with such a big party inside.

    Joe Duffy says there is a lot of work going into improving the ThreadPool in future versions of the base class library, I wonder if future versions will allow for some partitioning of work. .

    A couple people have asked me about custom thread pools. I do see the need in some scenarios, but writing a custom thread pool is hard. I generally point people to custom thread pools that smart people have already built:

    Jon Skeet has a custom thread pool class on this page. The pool is configurable and allows you to separate your threads from the threads in the system pool.

    Mike Woodring has a custom thread pool available on this page. The thread pool is configurable, instrumented, and has a great many features.

  • Recipe: Implementing Role Based Security with ASP.NET using Windows Authentication and SQL Server

    Problem

    You are building an Intranet expense report application for your organization, and want to enable role-based authentication and authorization capabilities within it.  Specifically, you want to create logical roles called “approvers”, “auditors”, and “administrators” for the application, and grant/deny end-users access to functionality within the application based on whether they are in these roles.

    Because your application is an Intranet solution, you want to use Windows Authentication to login the users accessing the application (avoiding them having to manually login).  However, because the roles you want to define are specific to your application, you do not want to define or store them within your network’s Windows Active Directory.  Instead, you want to define and store these roles within a database.  You then want to map Windows user accounts stored within Active Directory to these roles, and grant/deny access within the application based on them.

    In addition to using roles to authorize access to individual pages within the application, you want to dynamically filter the links displayed within the site’s menu navigation based on whether users have permissions (or not) to those links.  And lastly, you want to build-in a custom role-management administration UI directly within the expense report application for “expense app administrators” to manage these roles and control who has access to the capabilities of the app:

     

    Solution 

    I've put together a detailed post that walks through step-by-step how to implement all of this.  You can read it here, and download the completed sample I walk through how to build here.

    Hope this helps,

    Scott

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • Recipe: Dynamic Site Layout and Style Personalization with ASP.NET

    Problem:

    You want to enable end-users visiting your web-site to dynamically customize the look and feel of it.  Specifically, you want to enable them to choose different content layouts for the site, as well as different style experiences (colors, fonts, etc). 

    When building this customization system, you want to make sure you avoid duplicating logic throughout the multiple pages.  Instead, you want to be able to author the dynamic personalization logic once and have all pages inherit it.

    Solution:

    ASP.NET 2.0 makes dynamically customizing the UI experience of a web-site easy.  Specifically, it provides a flexible mechanism for defining page layouts using a feature called “Master Pages”.  It also provides a flexible mechanism for defining a page’s style look and feel via a feature called “Themes”. 

    What is nice about both “Master Pages” and “Themes” is that they can be configured either statically (by specifying the Master Page or Theme to use within an ASP.NET Page’s <% Page %> directive), or dynamically at runtime by setting the Page’s MasterPageFile and Theme properties via code.  This later approach can be easily used to enable dynamic user personalization of UI on a web-site.  The below walkthrough demonstrates how to implement this.  You can also download a complete sample that shows how to-do this here.

    Step 1: Create a New Web-Site

    Begin by starting a new web-site in either Visual Studio or Visual Web Developer (which is free).  Create two master page files called “Site1.Master” and “Site2.Master” within it. 

    We will use these two master-pages to provide two alternative layout views for the site that end-users will be able to pick between.  For the purposes of this sample we’ll keep each master file simple (although obviously you could add much more layout and content to each).  Here is a trivial example of what you could have in “Site1.Master” to start with for the purposes of this sample:

    <%@ Master Language="VB" CodeFile="Site1.master.vb" Inherits="Site1" %>

     

    <html>

    <head runat="server">

        <title>Site1 Template</title>

    </head>

    <body>

        <form id="form1" runat="server">

        <div>

            <h1>Site1 Master Template</h1>

       

            <asp:contentplaceholder id="MainContent" runat="server">

            </asp:contentplaceholder>

        </div>

        </form>

    </body>

    </html>

    After creating the two master-pages, add two new ASP.NET pages to the project – and choose to have them built using a Master Page.  Call these two new pages “Default.aspx” and “Personalize.aspx”, and have them be based on the Site1.Master template above. 

    Step 2: Add Two Themes to the Site

    Right-click on the Solution Explorer within VS and choose the “Add ASP.NET Folder->Theme” context menu option.  This will create a folder called “App_Themes” immediately underneath your application root directory.  You should then create two sub-folders underneath the “App_Themes” folder called “Blue” and “Red”.  This will define two separate themes for the site.  Within each theme folder you can add CSS stylesheets, images, and .skin files to customize the site’s appearance however you want.

    For the purposes of this sample, we’ll add a “blue.css” stylesheet under the “Blue” folder and a “red.css” stylesheet under the “Red” folder.  For now we’ll keep their implementations trivial and just set the background color for pages in them:

    body

    {

        background-color:blue;

    }

    Once this is done, our site project layout should look like this:

    Now we are ready to enable end-users visiting our site to dynamically personalize which Master Page file is used (allowing them to control the layout of the site), as well as which Theme/Stylesheet is used (allowing them to control the style of the site).

    Step 3: Enable ASP.NET Personalization

    We could save our visitors’ layout and style preferences in a variety of different places (within an http cookie, within a custom database, in a directory on the file-system, etc).  For the purposes of this sample, I’m going to use the new ASP.NET 2.0 Profile Personalization feature.  This allows me to easily save/retrieve information about users accessing the site with minimal code.

    You can use the ASP.NET Profile Personalization feature in combination with any authentication mechanism (Windows Authentication, Forms Authentication, Passport, or any other authentication approach you want).  For this sample I’m just going to use Windows Authentication to login and identify the user.  If you aren’t familiar with how Windows authentication works, please read my previous Enabling Windows Authentication Recipe.

    Once I’ve configured the site to use Windows Authentication, I can enable the ASP.NET Profile system by adding a <profile> section within my web.config file that lists the properties I want to store about users.  For the purposes of this sample I’m going to store two string properties:

    <profile>

      <properties>

        <add name="ThemePreference" type="string" defaultValue="Blue"/>

        <add name="MasterFilePreference" type="string" defaultValue="~/Site1.master"/>

      </properties>

    </profile>

    If you have SQL Express installed on your machine, then you are done.  ASP.NET will automatically provision a new SQL Express database within your app_data folder at runtime that has the appropriate Profile tables configured to save your profile data above.  You don’t need to take any additional steps to configure this.

    If you don’t have SQL Express installed, and instead want to use a SQL Server to store the Profile data, you’ll need to create a database within SQL to store the ASP.NET Application Service tables, and update your web.config file to point at the database.  The good news is that this is easy to-do.  If you haven’t done this before, please read my previous Configuring ASP.NET 2.0 Application Services to use SQL Recipe that demonstrates how to do this.

    Step 4: Building the Personalize.aspx Page

    Now that we have enabled ASP.NET Profile Personalization, we can go to work building a Personalize.aspx page that we can use to enable end-users on the site to dynamically pick which Master Page and Theme they want to use.  To do this we’ll add two <asp:dropdownlist> controls to the page to enable users to select the appropriate choices:

    <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">

     

        <h2>

            Pick your master file:

            <asp:DropDownList ID="ddlMasterFilePreference" runat="server">

                <asp:ListItem Text="Site Choice One" Value="~/Site1.Master" />

                <asp:ListItem Text="Site Choice Two" Value="~/Site2.Master" />

            </asp:DropDownList>

        </h2>

     

        <h2>

            Pick your theme preference:

            <asp:DropDownList ID="ddlThemePreference" runat="server">

                <asp:ListItem Text="Blue" />

                <asp:ListItem Text="Red" />

            </asp:DropDownList>

        </h2>

     

        <div>

            <asp:Button ID="UpdateBtn" runat="server" Text="Update" />

        </div>

     

    </asp:Content>

    Within the code-behind of the Personalize.aspx page we’ll then write this code to save and restore the selection to the ASP.NET Profile system:

    Partial Class Personalize

        Inherits System.Web.UI.Page

     

        Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

     

            If (Page.IsPostBack = False) Then

     

                ddlMasterFilePreference.SelectedValue = Profile.MasterFilePreference

                ddlThemePreference.SelectedValue = Profile.ThemePreference

     

            End If

     

        End Sub

     

        Sub UpdateBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles UpdateBtn.Click

     

            Profile.MasterFilePreference = ddlMasterFilePreference.SelectedValue

            Profile.ThemePreference = ddlThemePreference.SelectedValue

     

            Response.Redirect("default.aspx")

     

        End Sub

     

    End Class

    Notice that ASP.NET automatically adds a strongly-typed “Profile” object to our pages that we can use to easily get type-safe access to the Profile collection we defined within our web.config file previously.  It automatically handles saving/retrieving the user’s profile data from the configured profile database.

    When the Personalize.aspx page is visited, an end-user will now be able to pick which layout and style choice they want:

    When the end-user clicks “Update” their settings will be persisted in the ASP.NET Profile database automatically.  When they revisit the Personalize.aspx page later, their preferences will be retrieved and populated within the dropdownlists.

    Step 5: Building a Base Page Class to Personalize Page Content

    We want to avoid having to repeatedly add the same logic to set the Master Page and Theme on every page of the site.  We’ll instead create a base page class that encapsulates this functionality, and have each of the pages on our site inherit from it. 

    To-do this, we’ll create a new class called “MyBasePage” that will live within our app_code directory (if we are using the VS 2005 Web Site Project option):

    Imports System.Web.UI.Page

     

    Public Class MyBasePage

        Inherits System.Web.UI.Page

     

        Protected Overrides Sub OnPreInit(ByVal e As System.EventArgs)

     

            MyBase.OnPreInit(e)

     

            Dim MyProfile As System.Web.Profile.ProfileBase

            MyProfile = HttpContext.Current.Profile

     

            Me.MasterPageFile = MyProfile.GetPropertyValue("MasterFilePreference")

            Me.Theme = MyProfile.GetPropertyValue("ThemePreference")

     

        End Sub

     

    End Class

    The above class inherits the base ASP.NET Page Class (System.Web.UI.Page), and overrides the OnPreInit method (which is called when the “PreInit” event on a page executes).  Within this method we then set the page’s “MasterPageFile” and “Theme” properties with the values the user persisted within the ASP.NET Profile Store. 

    Note that when accessing the Profile data in the code above, I’m accessing it via the “GetPropertyValue()” helper method.  This code will work both within the web-site project, as well as any companion class-library projects I might want to use to store this base class in instead (enabling me to easily re-use it across multiple projects).

    Step 6: Using the Base Page Class within Pages

    Using the base page class we built above with pages is simple.  Just open the code-behind file of any of the pages within the site, and update its base class declaration from:

    Partial Class _Default

        Inherits System.Web.UI.Page

     

    End Class

    To instead be:

    Partial Class _Default

        Inherits MyBasePage

     

    End Class

    Now when the pages within our site run, the OnPreInit method within our base class will execute, and we’ll dynamically update the Page’s Master Page and Theme to reflect what the user has personalized.  For example:

    Or:

    This is all of the logic we need to enable dynamic layout and style personalization for the site.  We can now pass off the master page templates and CSS style-sheets to a designer to customize to make them as rich and attractive as we want.

    Summary

    The above walkthrough illustrates the basics of how you can enable rich site layout and style personalization.  It also demonstrates how you can encapsulate common page functionality within a base class that you can easily re-use across multiple pages in a site – a very useful approach that can be used far beyond just personalization.

    Click here to download a complete version of the sample that you can run and examine locally.

    Below are also some links/resources I recommend checking out to learn more about ASP.NET Master Pages, Themes, and Personalization:

    ASP.NET 2.0 Website Programming : Problem – Design – Solution: This is an outstanding book by Marco Bellinaso, and uses a great “real world example” approach to walkthrough how to best take advantage of ASP.NET 2.0 features (including Master Pages, Themes, Profiles and more).

    ASP.NET “How Do I” Videos: This is a great series of short 10-15 minute videos that you can watch online to learn ASP.NET concepts.  Included are several videos that show off Master Pages, Themes and Profiles.

    ASP.NET Master Page Articles: Two great articles by K. Scott Allen that talk about both the basics and the advanced scenarios involving ASP.NET 2.0 Master Pages.

    Free ASP.NET Design Template Downloads: Professionally designed site templates for ASP.NET that are XHTML compliant, and provide re-usable Master Pages and Themes that you can use in your own projects.

    Profiles in ASP.NET 2.0: A great article by K. Scott Allen about the new ASP.NET 2.0 Profile System.

    ProfileView Control: Joshua Flanagan has implemented a cool control that you can use in ASP.NET to provide an editing view of your profile personalization data.  You can download the control + its source code from this link.

    ASP.NET 2.0 SQL Table Profile Provider: An alternative Profile Provider implementation for ASP.NET 2.0 that allows you to save Profile properties in schematized Tables or SPROCs (rather than the default storage mechanism which is an XML blob).

    VS 2005 Web Application Project Profile Support: Available as a free download, this utility works with VS 2005 Web Application Projects and enables strongly-typed Profile objects to be used within them.

    Hope this helps,

    Scott

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • See how big those folders are

    Every couple weeks I end up wondering where all the space on my hard drive is and usually track it down to a Windows folder that seems way too large (5 gigs), and a profile that comes in at over 20 gigs. The problem is that Windows makes it incredibly difficult to track down what is taking up the most space, FolderSize for Windows [found via Darrell Norton] is a nice little utility that makes it easy to see how large each folder is so you can quickly track down what is taking up all that space.

    -James

  • Upcoming Free ASP.NET Team Webcasts -- "Live from Redmond"

    Earlier this spring the ASP.NET Team presented several great MSDN web-casts.  The response to those was so great that we've scheduled a bunch of new ASP.NET 2.0 talks over the next two months.  Below is a list of them, along with a registration URL that you can use to sign-up to watch them for free: 

    Date

    Title

    Speaker

    Registration URL

    25-Jul

    ASP.NET: An Overview of ASP.NET and Windows Workflow Foundation Integration

    Kashif Alam