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
 Tuesday, June 14, 2005

A few years ago I become aware of the fact that it is truly amazing how long our Creator allows us to live.  So early in life we begin to rebel against Him.  These body's we are encased in wreak with depravity and are so far from their potential.  It is often hard to believe (but I certainly do) that we humans are made in the image and likeness of God.  It is so easy to see our failure, weakness, depression, and sorrow.

Today I want to publicly acknowledge my thankfulness to Jesus Christ for creating, sustaining and preserving my littlest girl Grace.  She turns 1 today.  We had an incident a couple months ago where she got a penny lodged in her throat and she could have easily died.  Her life was spared from that.  What is truly amazing though is not that God spares us from accidents, but that His Grace is sufficient to spare us from the incredible wrath we earned for ourselves by not trusting and following Him.

Thank you Jesus for your great love and the grace which you constantly pour out on us.  We do not deserve it!  I do not deserve it!

Family | Life
6/14/2005 12:58:27 PM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [7]  |  Trackback
 Wednesday, June 08, 2005

Typically Vue offers discount certification exams at TechEd so this year I decided to complete my MCSD.  I had been very lazy putting off the final 70-300 exam on solution architectures.  Now that I have taken it I know I had nothing to worry about.  Someone described it as a reading comprehension test and I concur.  There are a few questions you need to make technology decisions on.  You also need to understand what kinds of things would be on different types of design docs.  I had 3 scenerios and 30 questions.  I am glad to be finished with it.  Perhaps my next certification will be the Architecture route.  They are announcing that certification here at TechEd.

For anyone else considering certification I have great news.  First if you are at TechEd you can probably still take an exam for half price.  Second, if you fail you can retake an exam for free.  That offer comes from Microsoft and has been extended through the summer.  You do not have to be at TechEd for that one.

6/8/2005 12:29:51 PM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Friday, June 03, 2005

So, I have a new plan for Tech Ed this year.  I find that attending like 75 different session over the course of a week is more than I can even begin to absorb.  This year I will focus on Smart Client technology since it is not something I have spent much time looking at in the past.  ASP.NET is great, but I am tired of state management issues.  I want to do smart client applications.  I want to fully exploit serialization.  I want to cache a lot of data on the users machine, not the web server.  Expect to find me hanging around sessions with Tim Huckaby and Rocky Lhotka this year.

Oh, so the point of this post.  I was reading up on some blogs to prepare for the week.  I discovered a brilliant plan by the Microsoft RD's.  Instead of full 1 hour plus sessions they are doing something called Grok Talk.  These 10 minutes gigs are more like technology drive bys.  I look forward to catching a few of these between the fights over the good ice cream bars.  Don't worry Rory and Scott, I am saving the baby carrots for you.

6/3/2005 7:15:20 PM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback

You just can't have too many free food and drink events at these conferences.

Expo Hall Reception
Monday, June 6 6:00pm – 9:00pm Hall A/B

Microsoft Tech·Ed 2005 Attendee Party
Thursday, June 9 7:30pm – 11:00pm Universal Studios Orlando

I am sure some more open events will happen to fill in the gaps for Tuesday and Wednesday.  There are several private parties going on.  If you have not been invited to any then you need to become better friends with the people who hold the invitations.  I will let you figure out how it works on your own.

6/3/2005 6:35:28 PM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback

The first Tech Ed Party / Nerd Dinner is tomorrow night:  Join the Party with Palermo at the Pebody.

4PM - Arrival begins.  meet and greet.  Discuss conference sessions, etc.  Networking.
6PM - Geek Dinner.  I have reserved for 20, so I will need actual names for people to expect.
7:30PM - Drinks and conversation at the hotel bar.
Depart whenever.

6/3/2005 6:19:10 PM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback

After a long day on airplanes I have arrived in Orlando.  For those who have not left for Tech Ed yet here are a couple tips:

Pack an extra bag for hauling home all your shirts and other swag. 
Its rainy here.  Pack a rain jacket.
Look for me in then INETA community lounge.  I will be there Monday and Wednesday mornings as well as other times throughout the week.  Say hello!

6/3/2005 6:16:26 PM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, June 01, 2005

Today I had a question from one of our developers about bridging ASP and ASP.NET applications and how to handle the security.  What I always recommend for all .NET web applications is that people use what is built-in.  Forms authentication works very well, already has security for things like authentication tickets, and it already handles checking authorization by just adding the <authorization> tag in web.config. 

Many ASP applications already have the concept of a userID and Roles.  In February I presented a session at VS Live that included some sample code that will easily address setting up forms authentication with roles for ASP.NET.  Lets jump right into it in a basic walk-through.

#1 Web.config settings.  These basic settings tell the framework that all unknown users should be redirected to the Logon.aspx page.  If the users are known (authenticated) then they can browse the other pages in the application.

<authentication mode="Forms">
<forms loginUrl="Logon.aspx" name="myAuthCookie" timeout="60" path= "/"></forms>
</authentication>

<authorization>
<deny users="?" />
<allow users="*" /> <!-- Allow all users -->
</authorization>

#2 Logon.aspx.  We could have a username and password input form or any kind of input we want to use to validate the user.  Since I am talking about a solution here that makes it easy to share authentication between classic ASP and ASP.NET we will leave the ASPX page itself blank and handle the check in code.  My recommendation is that the ASP classic application would instead trust the .NET authentication.  For that you might simply set an extra cookie from .NET that the ASP classic could read.  It really depends on how your ASP application validates users.  You would simply want to have the ASP.NET code duplicate the current ASP mechanism so when the user hits ASP pages they do not know any difference.  In other words, the ASP code would still check for a specific cookie or something like that. 

#2a Logon.aspx.cs.  In the code behind the for the authentication page is where all the real work happens.  Lets look at it in detail for the given scenario.

private void Page_Load(object sender, System.EventArgs e)
{
string userID = "";

// Check the ASP classic authentication cookie array or whatever you use in ASP to know the user is logged in
if (!(Request.Cookies("MyApplication") == null))
{
// Assuming here if authenticated then we also have a userID
userID = Request.Cookies("MyApplication").Values.Get("userID")
}

if (userID == "")
{
// unknown user. Send them back to classic ASP login page
Response.Redirect("login.asp");
}
else
{
// We have a userID from the ASP application. Use it to create an authentication ticket
// Get a pipe delimited string of the groups (Roles) that the user belongs to.
// Typical ASP applications store a list of roles in a database table. Hard coded here for sample.
string groups = "Editors|Registered Users|Newsletters";

// Create a forms authentication ticket that we can stuff the userID and Roles into
FormsAuthenticationTicket authTicket =
new FormsAuthenticationTicket(1,
userID,
DateTime.Now,
DateTime.Now.AddMinutes(60),
false, groups);
// Encrypt the ticket.
String encryptedTicket = FormsAuthentication.Encrypt(authTicket);

// Stuff the ticket into a cookie
HttpCookie authCookie =
new HttpCookie(FormsAuthentication.FormsCookieName,
encryptedTicket);
Response.Cookies.Add(authCookie);

// Return the user to the requested page now that an authentication ticket is created
Response.Redirect(FormsAuthentication.GetRedirectUrl(userID, false));
}
}

#3 Global.asax.cs.  This is where the magic of .NET forms authentication really happens.  If you are not stuffing the roles into the authentication ticket then much of this whole process can be greatly simplified.  Putting the Roles into the ticket will give us an easy way to apply them to the current user on each request.  Lets take a look.

protected void Application_AuthenticateRequest(Object sender, EventArgs e)
{
// Extract the forms authentication cookie
string cookieName = FormsAuthentication.FormsCookieName;
HttpCookie authCookie = Context.Request.Cookies[cookieName];

if(null == authCookie)
{
// There is no authentication cookie.
return;
}

FormsAuthenticationTicket authTicket = null;
try
{
authTicket = FormsAuthentication.Decrypt(authCookie.Value);
}
catch(Exception ex)
{
// Log exception details (omitted for simplicity)
return;
}

if (null == authTicket)
{
// Cookie failed to decrypt.
return;
}

// When the ticket was created, the UserData property was assigned a
// pipe delimited string of group names.
String[] groups = authTicket.UserData.Split(new char[]{'|'});

// Create an Identity object
GenericIdentity id = new GenericIdentity(authTicket.Name, "TrustedASPAuthentication");

// This principal will flow throughout the request.
GenericPrincipal principal = new GenericPrincipal(id, groups);

// Attach the new principal object to the current HttpContext object
Context.User = principal;
}


That is really about all there is to it.  By using the built-in authentication and authorization tools in ASP.NET and stuffing the roles into the ticket and then the current principal your code can leverage the built-in methods for checking Role membership. 

User.IsInRole("Editors") would return true for us since "Editors" is one of the roles I hard coded the user to be in.

I hope that someone finds this brief article helpful as an introduction into using Forms authentication and Role authorization in ASP.NET.

6/1/2005 11:46:11 AM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [5]  |  Trackback
 Friday, May 20, 2005

I stumbled on Rick Laplante's blog entry today where he gives some details on how Microsoft is responding to customer feedback about Team System.  He links to a couple of important charts that will help us all make decisions about which versions to buy.  The other exciting piece of news is that each of the Team System role sku's will include a 5 developer license of Team Foundation Server.  That should help the small shops find it easy to get started with.

Compare Visual Studio 2005 Team System Software Editions

MSDN Subscriptions for Visual Studio 2005

5/20/2005 12:11:40 PM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, May 17, 2005

This information simply must be propagated on the net.  I have been going back on forth with Creative support via Email and they have suggested the standard stuff, all of which I tried.  After I upgraded my Zen Micro to support subscription media via their latest firmware I ran into a serious problem.  My laptop would no longer recognize the device.  It showed up in device manager, but no software would acknowledge it.  I am so glad to have this solved.  I really did not want to play for format c: game on my machine to get this working.

So here is the fix that I finally discovered at: http://hardware.mcse.ms/message94329.html

1. Log in as an administrator (if you are not already logged in that way).

2. Go to Start, Run and type "regedit" (without the quotes).

3. When the registry editor starts, navigate to the following location in
the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum

4. Right-click the Enum hive and select Permissions.

5. In the permissions dialog, add the Everyone group.

6. Give the Everyone group Read access.

Close the registry editor and connect the Personal Media Center device.

5/17/2005 9:45:12 PM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Monday, May 16, 2005

Last Friday I decided to see how well the 30 day return policy at Best Buy would work.  I returned my Samsung MP3 player and they gladly exchanged it for whatever I wanted.  As previously mentioned I decided to go for the Creative Zen Micro since it supports subscription DRM services.  BestBuy.com has the player $10 cheaper than the store and they had no problem taking the extra $10 off during the trade in.  Best Buy gets a +1 for this!

Of course I could not wait to rip into my new device and give it a spin.  All was well until I did the latest flash upgrade.  This was required for it to support subscription music.  After the upgrade my laptop refused to see the device.  I assumed it was defective and returned it to Best Buy and got it replaced, again with no problems.  You can imagine how bummed I was when the 2nd Zen had the same problem as the first.  After searching the net for others with the same problem I found that I was not alone.  Since Creative Tech support is closed on weekends I decided to wait until today to call them.  I brought the device to the office to see if my work PC liked it.  Guess what, no problems.  Now I have an interesting dilemma.  My cool MP3 player will not work with my home PC.  Next thing is to rebuild the home PC and see if that takes care of the problem.  Forget calling Tech Support, at least for now.

Microsoft, Creative and other players in the subscription audio world are going to have to make this stuff work flawlessly or they may find MP3 players thrown through the Windows.  I don't mind being on the bleeding edge of technology, but when my very recent hardware and completely up to date software do not work together I am not a happy boy!

5/16/2005 9:04:29 AM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Friday, May 13, 2005

About 3 weeks ago I decided it was time to join the MP3 revolution.  I did some research and decided that I wanted to go with portability over extreme storage size.  Initially I thought I would go for a 60 Gig Zen Xtra.  iPod is absolutely not a consideration for me because I prefer WMA format and I don't want to load iTunes just so I can use it.  I ended up walking out of Best Buy with the Samsung YP-MT6Z (1 Gig).  I went to the store thinking that I would prefer the Creative Zen Micro because I wanted to store several albums at a time.  When I saw the size of the flash based devices I changed my mind.  The in stock Zen only came in black did not look appealing to me either.

The Samsung player has been fantastic.  I am still running on the battery that came with it in the box.  They claim 42 hours on a single AA battery and I am convinced that must be accurate.  My player still shows no sign of battery weakness.  I have loaded about 10 albums on it in addition to several hours of spoken audio.  I give a solid A-.  Read on to learn why I cannot rate it higher.

Yesterday I read that Yahoo had a new subscription music service.  I decided to give it a run because the price point was only $4.99 /mo.  I was excited to start downloading anything I wanted to listen to.  With a click I get almost any album I can imagine.  I am now convinced that CD based music as we currently know it is going to disappear in the near future.  I will go so far as to predict that even MP3 players as we know them today will change.  What I believe will happen is that we will end up with devices like car stereos and cell phones that have some flash memory for caching a short playlist.  That playlist will sync with a subscription service whenever the device can get connectivity to the Internet.  Wireless broadband technologies will enable this.  Devices will even allow you to request songs on demand, probably through a speech interface.

Now that I have tasted the beauty of subscription music on demand at an affordable price point I have a huge complaint about my WMA/MP3 Player.  It does not support DRM10 or whatever the standard is for enabling subscription content on portable devices.  The current list of devices supporting subscriptions is very short.  There are only 13 devices in the list.  None of them are high capacity flash devices.  Matter of fact none of them are flash devices at all except a cell phone.  My plan now is to see how far I can get with the 30 day return policy at Best Buy.  If they will take back the Samsung I am going to get the Zen Micro.  In my opinion the Micro is the best option for a portable device that supports subscription music and everything else I want in a player.  I hope that we don't have to wait long for the industry to catch up with DRM standards and devices.  At $5/mo. I will probably become a subscriber for life and never buy another CD again.  Instead I will outfit my home, vehicles, and my pocket for the Any Music, Any Time future!

5/13/2005 8:51:55 AM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, May 11, 2005

I have been having a discussion with one of our developers about SSL.  He is updating some code and wanted to make sure that anyone who used the application would be doing so via SSL.  I believe the discussion will be valuable to many so I wanted to share some tips.

 

There are a couple of simple ways to guarantee that users are using SSL.

 

#1 In IIS you can set the application to require SSL so anyone trying to access it over HTTP will get an error.  I do not like this option for 2 reasons.  It requires extra IIS configuration to implement and I like to avoid throwing errors if possible.

#2 Applications can check for the use of SSL and force a redirect if it is not being used.  This is my preferred and recommended approach for all applications that involve sensitive data. 

 

Here is some simple VB.NET ASP.NET code that does the trick for option #2.

 

‘ Force users of this application to come in using SSL

If Not Request.IsSecureConnection Then Response.Redirect(Request.Url.ToString.Replace("http:", "https:"))

 

The biggest question this creates is how to handle the development and testing environments where SSL certificates may not be installed.  I have good news for you there.  Microsoft has a couple of tools for creating self-signed certificates that are prefect for development environments.  You can easily install a test certificate on your own development machines.

 

The IIS 6.0 Resource Kit includes a tool called SelfSSL that you can use to make certificates.  I prefer to use MakeCert.  I use it enough that I put together a simple Create_Cert.BAT file to make it even easier to use.  The file takes in the machine name as a parameter (%1%).  You can find documentation on the various options in MSDN.

 

makecert -r -pe -n "CN=%1%" -b 01/01/2000 -e 01/01/2036 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 -nscp

  • Copy the MakeCert.exe tool and create the Create_Cert.bat file on your machine.
  • Open a Command Prompt window and change to the directory where you put the makecert.exe and the create_cert.bat files.
  • Execute the create_cert.bat using the machine name of your PC as a parameter.  Typically we use LOCALHOST on our local machines. (ex. C:\tools\create_cert.bat localhost)
  • In IIS you can now set the Default Web Site to use your test SSL certificate. 
    My Computer -> (right-click) Manage -> Services and Applications -> Internet Information Server -> (right-click)Default Web Site -> Properties -> Directory Security -> Server Certificate – Assign Existing.

I hope you agree with me that it is easy to develop and securely interact with customers over with SSL.  If you are looking for affordable SSL certificates for production servers you can now get them for as little as $29.95 at www.GoDaddy.com.

 

 

 

5/11/2005 9:11:08 AM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Friday, May 06, 2005

Last year Forbes ranked Boise #7 in the list of Best Metros for Business and Careers.  This year my home town hits #1!  As an employee of Idaho Commerce and Labor I know that Boise and Idaho are both doing well in large part because of the leadership in my own agency and within State government.  Pay a visit to Idaho this summer and see why so many of us love it here!

5/6/2005 9:42:58 AM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Friday, April 22, 2005

The IIS 7.0 lab was wrapped up with a look at the Windows Activation Service (WAS) and an introduction to Indigo and how the 2 work together. Essentially, Indigo is able to be hosted by anything that can act as a service host. This includes not only IIS, but also Windows Services, Enterprise Services, or even an EXE.

I had never heard of WAS until this week. I believe it is something that every IIS administrator and developer should understand the basics of. I will attempt to summarize here without too many technicalities. (I will mess it up if I try to be too specific) With IIS 7.0 the W3SVC that handles http (remember this is just a communication protocol) has been separated from the service which manages configuration and process management. The separate service is WAS. W3SVC in IIS 7.0 has a dependency on WAS, but WAS has no dependencies on W3SVC. What this means is that IIS should no longer be thought of as a "web" server. We already see it hosting services such as remoting, so keep that in mind as you look at how IIS is improving as a first class service host. I'd like to propose that we consider IIS 7.0 as THE service host. Of course those who need transaction support will still want to remain friends with Enterprise Services. I am starting to wonder if the best way to understand IIS 7.0 is to first look at WAS and then look at W3SVC as just another in the line of services that can be activated on demand by a service host.

In addition to loading configuration, WAS is a manager. Like all good managers it tells its servants, or in this case services, when to start and stop, and which cubicles (application pools) they are to function in. In the case of a request coming in on the http binding WAS starts up a W3WP just as IIS 6.0 does today. If there is already a running W3WP servicing the appropriate application pool then WAS can skip the starting up of a new one. Today IIS 6.0 gives us some very powerful health monitoring that allows us to recycle worker process or kill application pools in which failing code is running. This same concept moves forward in IIS 7.0, and is now able to be applied to any process WAS is managing. This may be W3WP for a web application or it may be the Indigo Net TCP service. Given the power of worker process management and the failure protections we see in IIS 6.0 now, combined with the modular architecture of IIS 7.0, I nominate IIS 7.0 WAS as the process host of choice for Indigo. You know I really should dig deeper to see if WAS can replace Enterprise Services for executing managed code and providing transactional support. Comments anyone? The combination of .NET garbage collection and WAS worker process management makes me wonder why anyone would want to write code managed outside of IIS and .NET for distributed applications.

Let me go a bit deeper into some of the advantages of WAS as an Indigo host and W3WP service manager. ASP.NET developers are familiar with the concept of application domains. These act essentially like process boundaries. Within an application domain things like state and session can be shared. Across application domains this requires cross domain calls, security checks, etc. By hosting Indigo services in IIS they are able to participate fully in the same application domains that ASP.NET applications participate in. A single application can for example expose its state and services through a standard browser application, a web service, and now Indigo services and others. The ability to support service oriented architectures really comes to life when every system that wants to connect to a given service can participate in the same process and application boundary. Thomas Deml demonstrated a very simple example of an Winforms application using an Indigo service hosted in IIS. The service was able to return a list of all active requests in an application domain. The Indigo service showed up right alongside the http services being requested and handled in the same process. It was clear that an http and a standard tcp request were both being handled within the same application domain.

A few more pieces of goodness that I took away from this mornings presentation:

  • state, globalization, membership and roles all can be shared by Indigo applications in addition to ASP.NET applications.
  • Unified deployment model (Indigo services are complied on the fly like asp.net)
  • new listeners along side http: Indigo Net.TCP Listener, Indigo Net.Pipe Listener, MSMQ Listener
  • WAS has a listener adapter interface for extensibility
  • IIS 6.0 rapid fail protection and other IIS 6.0 recycling features now extended to all WAS hosted services
  • Indigo destined to run on XP and 2003
4/22/2005 10:18:17 AM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [5]  |  Trackback
 Thursday, April 21, 2005

One feature of ASP.NET configuration files and the new configuration files for IIS 7.0 is an attribute known as configSource.  For the elements that support this you will have a few different options for dealing with configuration.  This value in this attribute can point to any file path that is lower in hierarchy, but may not be higher or on a different disk.

With this feature you can manage configuration sections in separate files.  Also, in IIS 7.0 you can include another attribute to flag the configuration not to cause an application restart when the configSource file changes.  Perhaps that will be in ASP.NET 2.0, but I have not discovered it yet.  By default it will cause a restart of the application just as web.config changes do.

4/21/2005 10:14:39 AM (Mountain Daylight Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback

22.April.2005 Update: I have changed my feature request concerning delegated administration.  I would like to be able to delegate that site and application owners both be able to create new applications within their physical folder hierarchy.  The creation of virtual directories can remain a server administrator function.

Today the focus of the IIS 7.0 DevLabs centered around new monitoring and diagnostics features as well as security.

Monitoring and Diagnostics apparently is an expansion of some new things that have been released with Windows 2003 Service Pack 1.  I was not aware of any new monitoring features in this service pack so I now have some new things to explore that I can use today!  I am told the best place to start to get a handle on the new features is the webcast: IIS 6.0 Service Pack 1 Tracing: Inside and Out.  In addition to this I imagine that some of the new performance and health monitoring features in ASP.NET 2.0 will also be merged in.  This area of IIS and ASP.NET development is something I have not spent much time, but it is certainly needed.  It has been far too difficult to troubleshoot IIS hosted applications.

IIS 7.0 is going to allow us to get information on the state of all running sites, application pools, worker processes, and application domains.  Additionally it looks like we will get programmatic control of starting and stopping some of these services at levels that are lower than the site.  The ability to drill into the currently executing requests through the Admin Tool and WMI is going to finally enable us to easily see which applications are hogging the CPU and memory.

The ASP.NET tracing model has made its way into IIS and both can actually be combined into a single log.  Essentially IIS becomes and ASP.NET trace listener if you want to configure it that way.  By merging the tracing we get a complete picture into the request/response cycle with all trace details in order and in context.  A fantastic feature that will be included with IIS is the ability to automatically log tracing details for failed requests.  For example, if the application does not respond, is too slow to respond, or responds with an error, the auto-tracing feature can take care of guranteeing that the trace details get recorded. There is an admin service that runs outside of the IIS server itself, so even if the application fails completely, trace data still gets written, which apparently is not the case with ASP.NET alone.  Modules participating in the IIS pipeline can be both providers and consumers of tracing output.  Administrators will appreciate the ease with which they can enable or disable tracing through the admin tool.

Security has been greatly enhanced as I have previously alluded to.  Today we dove deeper into some of the scenarios and looked at how to start with totally locked down server and slowly add functionality to it as needed.  This differs greatly for current defaults where most IIS functionality is enabled out of the box.  IIS 6 certainly improved on this over IIS 5, but the modular architecture of IIS 7 takes this idea to the extreme.  Limiting the installed modules reduces the attack surface and patch requirements to only those features that are installed.  For example, if you plan to only server static content you would not need to worry about attacks and patches for ASP or ASP.NET.

Wearing my site and server administrator hat I get very excited about the new security delegation features as I mentioned yesterday.  An additional and very helpful aspect of this includes the ability to delegate administration to non-Windows users.  That will be fantastic for hosting scenarios.  Delegation follows the standard hierarchy of site and application. Hmm, I wonder if non-Windows uses can be configured as server admins?  Comments IIS team?  Currently only server admins are able to create virtual directories and applications.  Personally I see this as a huge mistake.  As a consumer of hosting services I have to have the ability to create IIS applications within my hosting space so that I can run applications like dasBlog and others in a sub folder of my site.  If you agree then join me in asking for delegated administration of virtual directories and applications.  At the moment this is my 2nd biggest request for the IIS team.

Putting my ASP.NET developer hat (favorite) back on I'd like to buy Scott Guthrie at least a case of beer (or whatever his favorite beverage is) for merging the authentication an authorization of IIS and ASP.NET.  (Share it with the team doing the work!)  Finally the authentication options are all configured in only 1 place.  In addition I can just interact with the reuesting User in the context and not be concerned about how that user was authenticated.  Further we finally have a solution the problem of applications that want to first check for a Windows user and then fail over to forms authentication.  Today that scenario requires configuring a page to use Windows authentication in IIS and then handling a security exception and and it gets messier from there.

Good stuff abounds in the IIS 7.0 security picture:

  • Impersonation has been improved so that is not so confusing about which account the application is running under.
  • All authentication mechanisms can be applied to all content, including ASP.NET 2.0 membership authentication solutions.

Note to self: Research ADFS (Active Directory Federated Services) and how it may tie into a custom SSO solution.

URLScan and some of the other tools currently available to tighten security and assist with URL authorization have been replaced by, as one would imagine by now, powerful new configuration elements and of course corresponding modules.

  • The features of URL Scan have been built in and enhanced.
  • System policy can enforce authorization and serving rules.
  • There are 12 new 404 error sub status codes to help determine the rules blocking access.
  • Authorization is granular all the way down to the URL level.
  • Rules can be deployed with the application as expected when using config files.
  • File extensions can be restricted.
  • Verbs can be restricted. (POST, GET, etc)
  • Specific files and folders can be protected from being served. This can be accomplished with "hidden namespaces" or sequences.  Sequences are string patterns that allow you to block say all URI's that contain "bin" or something like that.  This enables easy blocking of specific patterns that may exploit vulnerabilities as they come up.

Tomorrow the DevLab will wrap up and I will head home.  Stay tuned for the final post in the series.

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