Friday, January 06, 2006

Rick Strahl says: Get Excited About IIS 7.0.  Having seen it myself I wholeheartedly agree. 

1/6/2006 9:05:05 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, December 01, 2005

Like many others I am trying Google Analytics.  I first heard of the JavaScript tracking technique with LiveStats 7.  One feature that kept me from liking the technique they use for tracking is that it is difficult to track file downloads.  I work with a lot of content management systems that would require quite a bit of modification to add the required scripts to file download links.  However, the information you can get from this tracking technique is otherwise far superior to anything you can ever get from  traditional log analysis.  Ideally I would like to dynamically add the tracking code to all download links in my content.  The 2 ideas floating in my head at the moment are:

#1  Add an ISAPI filter in IIS that would parse all output and add the tracking code to any download links that match RegEx patterns.  Perhaps all PDF download links for example.

#2  If possible, use JavaScript injected in the content pages to dynamically add events like onClick to elements like the anchor tag.  I already have to inject the tracker scripts so it would be great if I could inject a page parser script as well. 

Anyone have other ideas or thoughts on the possibility of these options?  I don't do ISAPI so #1 is out for me unless I can hire it out.

12/1/2005 11:47:57 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, November 23, 2005

It seems like forever ago that I started recommending Fredrik Normen's Permission Manager.  Recently I was tasked to find a way to restrict nodes in a SiteMap based on Permission.  Today I completed that task and thought I would share it with the world.  First of all, I appoligize for writing the code in VB.NET (employers standard), but you can all compile it and reference it from C# so get over it.

What I did to create the PermissionXmlSiteMapProvider was to inherit directly from XmlSiteMapProvider and then extend 2 methods.  First of all I extended the Initialize method so that I could verify that it was configured properly.  Since it is dependent on the presence of Permission Manager and it properly working I added a simple check to verify that it has a provider.

The second method to override for the addtion of Permission to a SiteNode was IsAccessibleToUser.  Thankfully the siteNode can have extra attributes on it without complaint.  I used that to check for the permission attribute.  If it is there then a call to Permission Manager is done for the named permission and the currently logged in user.

After configuring my applications to use my new Provider I restrict access to nodes as easy as this:

<siteMapNode url="Edit.aspx" title="Edit" permission="Modify" />

Since I built on top of the XmlSiteMapProvider I also get the ability to do Roles restriction and a combination of Roles and permission:

<siteMapNode url="Delete.aspx" title="Delete" Roles="Admins, Editors" permission="Delete" />

It is important to note a few things that I ran into while working on this solution.  You must enable Security Trimming.  If you will restrict based on Roles you also must enable RoleManager.  Restricting via Roles is a little quirky as described in the MSDN Site Map Providers document.  Specifically review the Security Trimming section.

Here is the siteMap section of Web.config that implements the PermssionXmlSiteMapProvider:

<siteMap enabled="true" defaultProvider="PersmissionXmlSiteMapProvider">
  <
providers>
    <
add name="PersmissionXmlSiteMapProvider
           
type="IDCL.Web.Security.PersmissionXmlSiteMapProvider, IDCL.Web"
           
description="Permission xml site map provider"
          
securityTrimmingEnabled="true"
          
siteMapFile="Web.sitemap"/>
  providers>
siteMap>

Obviously you also need to have Permission Manager installed and configured or this will not work.

Here is the code for the provider:

Imports System
Imports System.Web
Imports System.Configuration.Provider
Imports System.Web.Configuration
Imports Nsquared2.Security

Public Class PersmissionXmlSiteMapProvider
Inherits XmlSiteMapProvider

Public Overrides Sub Initialize(ByVal name As String, ByVal config As System.Collections.Specialized.NameValueCollection)

' Verify that config isn't null
If config Is Nothing Then
  Throw New ArgumentNullException("config")
End If

' Verify that Permission Manager is configured
If PermissionManager.Provider Is Nothing Then
  Throw New ProviderException("Permission Manager default provider missing.")
End If

' Add a default "description" attribute to config if the
' attribute doesn't exist or is empty
If String.IsNullOrEmpty(config("description")) Then
  config.Remove("description")
  config.Add(
"description", "PermissionXmlSiteMap provider")
End If

' Call the base class's Initialize method
MyBase.Initialize(name, config)
End Sub

Public Overrides Function IsAccessibleToUser(ByVal context As System.Web.HttpContext, ByVal node As System.Web.SiteMapNode) As Boolean

  Dim authorized As Boolean = MyBase.IsAccessibleToUser(context, node)

  'Pull the permission out of the sitemap node as an attribute
  Dim Permission As String = node.Item("permission")
  If Not Permission Is Nothing And authorized Then
    If context.User.Identity.IsAuthenticated Then
      ' Only check permission for known users
      Return PermissionManager.HasUserPermission(context.User.Identity.Name, Permission)
    Else
      ' The presence of a permission requires a known user
      Return False
    End If
  End If

Return authorized

End Function
End
Class

The PermissionSiteMapProvider.zip file with this article includes the Provider solution and a sample web.config

11/23/2005 4:27:33 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, November 22, 2005
I love my Zen Micro.  Tiger Direct has one now for $129.99 after rebate.  Get one of these and then sign up for Yahoo Music Unlimited for a year while the price is still only $59.88.  You won't be disappointed!
11/22/2005 8:13:31 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, November 10, 2005

Today I discovered that Microsoft is answering the community rant against losing web projects in VS 2005.  They have introduced Web Deployment Projects as an add-in for VS 2005.  They have essentially wrapped MS Build into a project type for the web.  Most exciting is that they did us right and took it beyond just providing a way to do exclusions and assembly naming.  My favorite new thing is the ability to do configuration management as part of the build process.  I can now have multiple configuration documents that target different deployment options.  Thank you ScottGu and the ASP.NET team!  This is exactly the kind of thing that we needed!

11/10/2005 10:02:31 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Monday, November 07, 2005

Today is the official launch date for Microsoft Visual Studio 2005 and SQL 2005.  The team at DotNetNuke surprised us all be releasing their newest builds today as well.  Most surprising was the 4.0 release which runs on the .NET 2.0 framework.  I hadn't expected that for a few months still, but I am thrilled to see it.  I will be pushing hard at the office now to move from Beta 2 to the final release of .NET 2.0 so that we can run DNN 4.0 and begin building ASP.NET 2.0 modules.  Thanks DNN crew for your relentless efforts on this product.

11/7/2005 11:32:53 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Thursday, October 27, 2005

DotNetNuke (DNN) has an ISearchable interface that module developers can implement to allow their content to be indexed by the internal search system. 

This system has some significant limitations with the way it handles indexing.  Since it is not crawler driven it does not index anything except the text explicitly fed to it through modules that implement ISearchable.  You could give your page a great title and the search will never find it.  In fact the only thing I like about the ISearchable solution is that is can be made security aware and that it is provider based.  Of course if you attempt to use a different provider you are still limited by the overall solution, so even that is not great.

My next big frustration with ISearchable is that it is used to tap into the built-in Syndication feature for modules.  If you want the RSS feed for your module to work with the integrated syndication option then you have to implement ISearchable.  However there is a major problem in the implementation.  The links in the RSS can only get you back as far as the module itself.  If you look at the announcements module RSS output you will see what I mean.  The item links should get you to the articles, not just the list of articles.  I attempted to use this for syndication on a recent module and ran into this brick wall.  The solution is to write you own RSS output and forget about ISearchable for syndication.  Hopefully DNN will include a new interface specifically for the syndication feature in the future.  DNN team, if you are listening I would be happy to write this functionality if you will include it in the core!

My recommendation at this point is to forget about ISearchable completely.  For search and syndication it is very weak and simplistic.  My favorite alternative at this point is my own implementation of EasySearchASP into DNN.  On my new DNNSecrets site I am using the articles module from Scott McCulloch.  It happens to implement ISearchable.  I have added the EasySearchASP module to the search results page so you can compare the built in results with this much improved alternative.  Of course EasySearchASP is not free, but I think it is worth it to provide site users with a search that works!

I would love to hear your feedback!  What do you think of the ISearchable interface?  How do you like the EasySearchASP alternative?

10/27/2005 8:49:10 PM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [10]  |  Trackback
 Tuesday, October 25, 2005
I just got an Email about the new certification tracks.  For those of you who are MCSD you will have 2 new exams to get the premiere developer cert.  It looks like I would have to change jobs to get the Architecture cert.  Oh well, we will leave that one for Hanselman and Vasters.
10/25/2005 8:24:27 PM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, September 15, 2005
Today I discovered that Google finally launched a blog specific search engine.  Exactly 2 years ago I was at the PDC in Los Angeles with my buddy Richard Hundhausen at a small Google sponsored party.  Richard told them they needed a blog specific search engine.  It took them far too long, but I give credit to the idea to Richard!
9/15/2005 8:36:07 AM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Sunday, September 04, 2005

Occasionally I have posted things here that fit with reason #3 for naming this blog Option Strict. 

"#3 LIFE: Truth is not relative, optional, or determined by popular opinion."

Since most of my posts are technology related and I have a lot of things on my mind that pertain to much more important things in life I have started a new blog.  I am trying a new service from Yahoo as the host.  The blog is titled "You are the Church : Stop going, start being".  The posts will generally fit into exploring what it means to follow Jesus.

Here is the introduction post to the new blog.

Jesus is all I need

I have decided to start a new blog focused on Jesus.  I have had many thoughts and conversations lately that I want to share.  I hope that they encourage and even challenge you to find life in none but Him.  I look forward to having a ongoing dialog with those who find this blog and feel like joining in.
9/4/2005 2:10:05 PM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Tuesday, August 16, 2005

The August 1st, 2005 edition of InfoWorld has an interesting article about a new technology that looks like it will kill NAS (Network attached storage) as we know it today.  Currently NAS devices have drive controllers embedded in them and function like mini file servers on the network.  Zetera has created a solution that lets you put drives on the network that act like a SAN (Storage Attached Network).  The IP network becomes the pipeline directly to the disk.  This provides 2 awesome features.

#1 No controller needed in the drive enclosure significantly reducing cost and improving performance.
#2 The drives are seen to the local PC just like any physically attached hard disk, but without special, expensive hardware.

Additionally these drives can be mirrored and support other RAID configurations.

Netgear has a box coming any day that will host 2 IDE drives on the network using this technology.  It is slated at $129 retail and I can't wait to get one.  I look forward to seeing how it performs with applications an other things like that loaded onto it.  It may be the ideal data drive in the sky.  It would be interesting is the drive could be mounted before the OS loads, but I don't see how that would possible without a special NIC that could tell your BIOS it was a drive controller.  They are probably working on that if they don't have it already.

 

8/16/2005 8:35:45 AM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Saturday, August 13, 2005

I am often asked why I have switched from using Rainbow Portal to DotNetNuke.  I promised I would answer that. 

 

Both products have matured and maintain some distinctions.  Rainbow (RB) is written in C# and DotNetNuke (DNN) is in VB.NET.  That no longer matters to me because I am not working on the core of either product.  Also, I recommend that unless you can get your code added to the core product or you are planning to support your own branch then you should avoid touching the product source code as well.  If you change a copy of the product you set yourself up for challenges with future upgrades.  Extensibility projects or modules can be written in the .NET language of your choice so I do not consider the language argument to be valid anymore.

 

The other major distinction that might be worth mentioning is localization.  From the beginning RB has supported localization and it is the only 1 of the 2 products that currently allows for easy content localization.  Both products now support localization of menus and commands fairly well.  DNN is aware of their deficiency here and they plan to address it as some point.

 

Usability is the biggest reason I now use DNN.  When I first tried version 3 I was amazed at how quickly I could add a page (tab) and fill it with modules.  I was further impressed by the content editor’s experience.  In many places where you are creating a link you get a common control that easily lets you choose between linking to a page in your site,  a file on you site or a URI offsite,.  The file dialog really won me over.  It is very common for users to want to upload a PDF or Word document and then create a link to it.  In DNN you never have to leave the link edit page to accomplish all of that.  With RB it takes several clicks and some intermediate end user training to handle the simple document upload and link creation process.  It is so painful in RB that my team typically does it for the content managers.

 

The other major reason for my switch was the community.  I was fine with RB because I know the people who created and maintain it.  However, those I work with and who manage the many websites at Idaho Commerce and Labor have no relationship with RB’s creators.  If I were to take a new job or simply wanted to find some training resources for them it begins to get ugly fast.  The DNN community is so large now that you can find just about any help you need without calling up one of the core team. 

 

Largely due to the size of the DNN community I also found a rich and active market for extensibility of the product.  Mostly I am referring to the huge number of 3rd party modules that are available at very low prices.  Often I have requests for new features on our websites and with RB I always had to replay with a number of hours it would take to custom build that functionality.  With DNN I now replay typically with a list of 3rd party modules and their purchase price.  The prices are very palatable to almost any DNN user and often you can find working solutions for free.

 

I should also mention that I have found DNN skinning to be reasonably easy and far more desirable than classic RB skinning.  I know that RB now has the ZEN skinning engine, but I am very happy with the DNN solution and skinning must remain reasonable simple for any solution to work well.  I know that RB ZEN took some magic in the page lifecycle to make it work.  DNN is much simpler in its implementation with standard .NET user controls as Skin Objects.

 

A brief note also needs to be included here about the roadmap in DNN.  Namely, they have one and they try to stick to it.

 

Personally I can see no reason to go back to RB and every reason to believe that DNN will be a great solution for some time.  It already is an amazing content management tool and application development platform.  I view DNN less as an option and more as the default foundation for nearly all sites and applications.  The best way to decide between RB and DNN is to spend a few minutes with each.  I think you will be surprised to find how much better DNN really is.

8/13/2005 9:06:38 AM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, August 04, 2005

This morning I noticed that our local independent ad paper (more ads than news) the Boise Weekly has an article on Google.  The nugget of relevance I got from the article was that there is a way to search books with Google.  After a little Googling to find the search I landed on print.google.com.  There are many books not yet indexed, but also many that are.  Next time you are looking for something you read in a book give it a try.  It is certainly faster than flipping through the pages manually.

8/4/2005 7:32:08 AM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, July 25, 2005

I was unable to make the first Code Camp for Portland.  My supervisor however decided at the last minute that it was worth checking out.  He reports that it was great.  When I asked him if it was as good as a commercial conference he said that he thought so.  Perhaps even better.  And that comes from a guy who was just at TechEd 6 weeks ago.

Congratulations to Jason Mauer, the Portland area .NET user groups, speakers and everyone who put in the effort to make it happen!

7/25/2005 7:43:27 PM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Tuesday, July 12, 2005

Yesterday News.com gave the DotNetNuke (DNN) community a boost when it headlined an article about Microsoft and Open Source.  Congratulations Shaun and DNN for creating a product that is getting this kind of attention.  You deserve it.

If you have not yet given DNN a run then what in the world are you thinking?  DNN is no longer a hobbyists web management toy.  It has matured to a point where it can rightly be called an Enterprise Application management and hosting framework.  If you are still doing custom web sites without a tool like DNN you have more to worry about than being outsourced to India.

7/12/2005 7:22:45 AM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Saturday, July 02, 2005
The Portland .NET community is hosting their first Code Camp!  Anyone from Boise thinking about going?  It looks like it will be a fantastic weekend over there.
7/2/2005 5:30:52 PM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [4]  |  Trackback

A friend of mine, Max Karpov, is partnering with Microsoft to host a Portals code camp.  The material looks fantastic and I know the speaker is excellent!  I met him at VS Live! back in February and have considered him a friend ever since.  If you can make it to Charlotte, North Carolina on August 20th then you will not want to miss the event.

FREE Portal Development mini-Code Camp covering SharePoint, DotNetNuke and Portal Framework ASP.NET 2.0

Overview of the event

Theme: Web Portal Application development with Microsoft technologies.  Sponsorship by Microsoft and my company, Faith Interactive.

Web Portals are not new to the scene, but enterprise adoptions to our technologies on a larger scale are just now beginning to take place. Microsoft has a number of products and technologies on the market to empower users to build web portals. SharePoint (SharePoint Portal Server and Windows SharePoint Services) technologies are one of these products. The SharePoint community has grown and embraced the open-source nature of developing these products. One product that will be demonstrated was developed by Jan Tielen. His product is called SmartPart Web Part. Microsoft doesn’t provide official support but thousands of developers have embraced the development of SharePoint portals through the use of it.

In areas where SharePoint products fall short, for example ease of UI customization through skins and custom login mechanize, open-source DotNetNuke portal is a great solution. I will be sharing from my production experience (1) why I choose this product for large portal implementation in big corporations and (2) the lessons learned from my experiences. 

Technology will never become stagnant and we can predict that the next version of ASP.NET 2.0 is just around the corner. It will include Portal Framework out-of-the box. The ability to code today in such a way that allows a smooth migration path is very important, so we will be examining the newer features of Web Parts framework and the best choices of technologies available today in order to escape the headache of a complete rewrite of portals.

Yes, the cost of the event is completely free and the quality can be likened to that of TechEd or VSLive.

Agenda Details (Subject to Change)

Imagine a day jam-packed with fun that has the potential to fill you to the brim with web application portal technologies. We will be starting at 9:00 am and wrapping up by 7:00pm. Below are the titles of each track and a detailed explanation of what each will cover.

Portal Design Patterns

This initial session will set the tone for the rest of the day. I will uncover common design patterns using and building web portal applications. We will look at the problem from the perspective of a generic viewpoint in which we will isolate ourselves from the nitty-gritty implementation specifics of coding. Don’t fret.  There will be more than enough code in the sessions following. You will leave not only with source-code good enough for production applications but also with the Design Pattern knowledge that transcends throughout technologies today.  This session will also prove why technologies capable of managing information, such as SharePoint, will continue to be around for many years to come. It will lay the foundation for the rest of our sessions.

SharePoint (Web Parts, SmartPart, Document Libraries)

SharePoint Technologies consist of many parts and implement solutions for a wide variety of problems.  How can we grasp such diverse technologies? This question will be answered as we walk through some of the topics listed below:

  • Code Access Security Configuration
  • SmartPart Web Part and User Controls
  • SharePoint Recycle Bin for document libraries
  • WPPackager to deploy Web Parts
  • Migration strategies between Development/Staging/Production
  • Tips and Tricks for Web Part Development/Deployment

At the end of the day you will not only be able to develop/deploy custom Web Part but you will also become familiarized with the use of SmartPart development framework. All of our tips and tricks for customizing SharePoint are from on-the-scene production implementations.

ASP.NET 1.x DotNetNuke Portal (Modules)

Today, if you’re faced with the decision to implement web portal and you cringe at the idea or are unfamiliar with the process of how to implement SharePoint technologies you can use Open-Source product DotNetNuke Portal. (For more information, read DotNetNuke book).  I will dismiss the myth that Visual Basic.NET code of DotNetNuke , isn’t too dangerous and can in fact be used by C#  and even COBOL developers.

I will even go so far as to make a strong point to not modify the core portal code but rather use it as SharePoint and customize the UI and modules. The issues we will uncover are listed below:

  • DotNetNuke Architecture in plain English
  • How to extending DotNetNuke core engine at your own risk.
  • Build and Deploying core DotNetNuke portal engine without a source-code
  • Power of DotNetNuke Skin engine revealed User Interface Customization.
  • DotNetNuke Modules to customize functionality of the portal

ASP.NET 2.0 Portal Frameworks (Web Parts)

What will the technologies of tomorrow bring?  How can we be prepared? The main purpose of this session is to prepare you to write code that can easily be modified to work under the newer ASP.NET 2.0.

  • Master Page and Web Part Page Framework
  • Cons and Pros for Web Part Development
  • Web Part Properties for Customization and Personalization
  • Web Part Communication
  • Providers explained

We hope this wets your appetite.  See you there!

Remember to fill in your evaluation forms at the end of the day for our drawing!!

7/2/2005 4:49:15 PM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback