FDF Toolkit 6, SSL, ASP.NET 2.0 Handler, and Internet Explorer cannot display the webpage

We run into an interesting problem today while working with FDF Toolkit 6 inside ASP.NET 2.0 HttpHandler. Internet Explorer 7 refused to open a pre-populated PDF form produced by the handler when communicating with the server over SSL.

We could see data coming to the client and AcroRd32.exe starting... however the browser continued to display "Internet Explorer cannot display the webpage" message. The same code worked well in IE without SSL or in FireFox with or without SSL.

The problem was related to caching. For some reason, any of the lines below cause IE not to be able to open an FDF form:

context.Response.CacheControl = "no-cache";
context.Response.AddHeader("pragma", "no-cache");
context.Response.Cache.SetCacheability(HttpCacheability.NoCache);

Removing these lines fixed the problem. Happy coding!

October book review: Ready, Set, Dominate

Michael Kennedy, Kent Harmon, Ed Minnock
Ready, Set, Dominate: Implement Toyota's set-based learning for developing products and nobody can catch you.

This is a continuation of the book I reviewed earlier this year: Product Development for the Lean Enterprise. The authors pick up the story of the Infrared Technologies Corporation (IRT) a year later. The company has piloted bits and pieces of the Toyota System with various levels of success. The progress is visible but it is not sufficient to achieve the company goals. To make matters worse, the Board of Directors has run out of patience with IRT's poor financial performance and has hired a new Chief Financial Officer to improve profits fast. The new CFO does not believe in product development transformation efforts and recommends a different strategy: selling non-profitable side of business, outsourcing manufacturing, reducing cost through an across-the-board workforce reduction, and using profits to buy high-growth and high-profit companies...

No doubt, IRT faces serious challenges: market share is shrinking, overhead is increasing, and profits are deteriorating. Will the company be able to turn the situation around? Read this book to find out!

In the form of a business novel, the authors allow us to experience a journey towards Lean Product Development with the focus on Lean Knowledge Management. They point out common implementation mistakes and show how to effectively integrate the flow of innovative knowledge into a planned cadence of product releases.

Included with the book are case studies of two companies that have been successful at understanding and applying Toyota principles. I would like to quote one of them: "... once the desired specification was put on paper, it was viewed as an absolute requirement. No variance from the goal was acceptable. Since the requirements were not a variable, the only variables left were time and money. That meant missed schedules and cost overrruns."

Happy reading!

September book review: Design Patterns

Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
Design Patterns: Elements of Reusable Object-Oriented Software

Design Patterns is one of my favourite technical books of all time. It has been highly influential on my understanding of object-oriented design and software engineering principles in general. It helped me hone my skills as a software architect early in my career and now serves as a reference material for many of my training sessions.

This book catalogs 23 commonly used design patterns:

  • Creational
    Abstract Factory, Builder, Factory Method, Prototype, and Singleton
  • Structural
    Adapter, Bridge, Composite, Decorator, Facade, Flyweight, and Proxy
  • Behavioral
    Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, and Visitor

For each pattern, the authors describe the design problem addressed, the circumstances in which the pattern is applicable, and the consequences of using the pattern to solve the problem.  Each pattern is supplied with relevant UML diagrams and simple C++ examples.

As design patterns are becoming mainstream, more and more books are published on this subject. You can easily find resources with examples in C#, Java, VB.NET, and other programming languages. My recommendation is to read the original book first.  I find it less prescriptive and more thought-provoking, leaving you with options for implementing design patterns in practice. Do not fall into the trap of thinking about patterns as prescriptive solutions to common design problems. Instead, think about each pattern as a multiple-step journey. At each step, you can and should review your design problem at hand as well as the trade-offs associated with using the pattern. You can stop, move to the next step, or to continue with implementation in a different direction. The choice is yours.

This is a must-read book for any software engineer and is highly recommended for first-line managers. As a minimum, it will allow you to speak with your team at a higher level of design abstraction.

To find more information about this book, click here. Happy reading!

From Subversion 1.4 to Subversion 1.5

Last week, we upgraded our development environment from Subversion 1.4 running on Apache 2.0 to Subversion 1.5 running on Apache 2.2. The primary reason for this upgrade is the support of relative URLs in the svn:externals property introduced in the new version of Subversion. 

The upgrade process was smooth and easy. Here are the steps we followed:   

  1. Stopped our existing Apache Server
  2. Backed up our Subversion repository 
  3. Downloaded and installed Apache 2.2.9
  4. Downloaded and installed Subverstion 1.5.2
  5. Configured httpd.conf configuration file for our new Apache server and started the server
  6. Upgraded our repository by executing svnadmin upgrade
  7. Upgraded our indexes by executing svn-populate-node-origins-index
  8. Upgraded client tools - we installed Tortoise 1.5.3 and Ankh 2.0
  9. Upgraded Team City automated build and continuous integration server to the latest version 3.1.2
A couple of notes... 
  • In the past, in order to use Windows authentication with Subversion we had to write a custom mod_auth_sspi.so. We did not have to do anything for 1.5. Loading modules in the correct order and referencing them from the Subversion application folder did the trick for us:     
LoadModule sspi_auth_module modules/mod_auth_sspi.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module C:/Apps/svn-win32-1.5.2/bin/mod_dav_svn.so
LoadModule authz_svn_module C:/Apps/svn-win32-1.5.2/bin/mod_authz_svn.so               
 
<Location /svn>
DAV svn
SVNPath C:\Dev\Repository

     AuthName "SVN Server"
     AuthType SSPI
     SSPIAuth On
     SSPIAuthoritative On
     SSPIDomain OURDOMAINNAME
AuthzSVNAccessFile "C:/Repository/conf/authz"
     SSPIOfferBasic on
     Require valid-user     
</Location>   

  • Team City 3.1.2 does support Subversion 1.5, but unfortunately does not support relative URL's in the svn:externals property. 

ReSharper 4.0 is finally released

It is finally here. The long waited ReSharper 4.0 has been released: http://www.jetbrains.com/resharper/.

Since we moved our .NET development to Visual Studio 2008 and .NET 3.5 at the end of last year, we have been using daily builds and betas of ReSharper 4.0. I am happy to see our favourite C# productivity tool released! 

May book review: Product Development for the Lean Enterprise

Welcome again. Here is what I picked for this month's review:

Michael N. Kennedy
Product Development for the Lean Enterprise: Why Toyota's system is four times more productive and how you can implement it.

I first learned about Toyota production and product development around 5 years ago. Their numbers are truly impressive:

  • Toyota is consistently named at the top in owner satisfaction surveys
  • Toyota's  milestone dates are never missed
  • Toyota's engineers and managers achieve incredible 80% of value-added productivity (vs. 20% auto industry average in the US)
What does Toyota do differently from everybody else? How can we apply their principles to IT? Product Development is substantially different from Manufacturing. Which one is a better fit for an IT organization? 

While there is plenty of information on wildly admired Toyota Production System (Lean Manufacturing), there is considerably less data on Lean Product Development (Knowledge-Based Development). In order to better understand how these two systems are different, take a look at the table below:

  Lean Manufacturing Lean Product Development
Cycle Time: Short (minutes, hours) Long (days, weeks)
Core Material: Physical material Knowledge and information
Teams: Smaller, focused Larger, more diverse
Focus: Focus is on executing predefined tasks and automation Focus is on defining new solutions and building knowledge and expertise

In his book, Michael Kennedy introduces the principles of and key elements behind Lean Product Development:

  • Set-Based Concurrent Engineering
  • System Design Leadership
  • Responsibility-Based Planning and Control
  • Expert Engineering Workforce

In an engaging and humorous manner, he explains how these principles can be adapted and implemented in your organization. The book is thought-provoking, sophisticated, and extremely fun to read.  It appeals to my sense of humor and has a plot and engaging characters that no reader will forget. It will keep you occupied until early morning hours... ;-)

Principles of Lean Manufacturing work well for IT maintenance and support. Lean Product Development fits well IT software development teams. If you are a technical or functional leader in an IT organization, this is a must-read book for you!  I am sure you will enjoy it.

Happy reading!

JavaScript tags cannot be self-closing

I was puzzled today by the following exception coming out of one of our web application: this._form has no properties. The exception occurred even on simple pages that had a form and a Script Manager tag. After troubleshooting the issue, I traced it down to the script tag on the site master page. Apparently, JavaScript tags cannot be self-closing.  

Replacing 

             <script language="javascript" type="text/javascript" src="my.js"/> 

with  

             <script language="javascript" type="text/javascript" src="my.js"></script>  

resolved the issue. Happy coding!

.NET 3.5, WCF, JSON, SSL, and HTTP Error Code 401

We run into an interesting problem today at work while working with JSON WCF Web Services built with Visual Studio 2008 and .NET 3.5.

The web application we are working on is to be released in a couple of weeks. It has been running fine on the test server for a number of iterations now, but today we installed an SSL certificate on this server and configured the application to require secure channel. Suddenly, the web application started to ask us for a username and password...

I looked closer into the logs and noticed the HTTP Error Code 401 (authorization error) coming back from web services when the web application requested our java script proxies. It turns out that in order to allow communication with the services via SSL, you need to configure additional binding configuration. See below our sample service model configuration. Hope it will save you a few hours of troubleshooting. 

<system.serviceModel>
    <behaviors
>
        <endpointBehaviors>
            <
behavior name="jsonBehavior">
                <enableWebScript />
            </
behavior>
        </endpointBehaviors>  

        <
serviceBehaviors>
            <behavior name="myServiceBehavior"
>
                <
serviceMetadata httpGetEnabled="true" httpGetUrl="" />  
                <serviceDebug includeExceptionDetailInFaults="true"
/>
                <serviceThrottling maxConcurrentCalls="100"
                                          maxConcurrentInstances="1000"
                                          maxConcurrentSessions="1000"/>
 
            </behavior
>
        </
serviceBehaviors> 
    </behaviors
>  

    <
bindings> 
        <webHttpBinding
>
            <
binding name="sslBinding"> 
                <security mode="Transport"
/>
            </
binding>
        </webHttpBinding> 
    </
bindings>  

    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
/>
        <
services> 
            <service behaviorConfiguration="myServiceBehavior"
 
                        name="CourseCatalog"

            
<endpoint contract="CourseCatalog"
                               address=""
                               behaviorConfiguration="jsonBehavior"
                               binding="webHttpBinding"
                               bindingConfiguration="sslBinding"/>
 
                <endpoint contract="IMetadataExchange
                               address="mex
                               binding="mexHttpBinding" />
  
            </service>
 
    </services

</system.serviceModel>

Happy coding!

March book review: Agile Principles, Patterns, and Practices in C#

Once again, it is time for our monthly book review.

Robert C. Martin and Micah Martin
Agile Principles, Patterns, and Practices in C#

A well written book on the subject of software design. The authors describe fundamental object-oriented principles, dig into a few design patterns, and even touch on agile methods while providing easy-to-follow examples in C#. Reading this book is like spending a day working together with a team of software developers where you can observe their development practices first hand.

While this book is not likely to become one of the classical books on object-oriented design, it is very practical and I recommend it to every .NET developer. For advanced readers, I highly recommend Robert Martin's original articles on OOP from 1990's. They are as valuable today as they were at the time when they were written.

Happy reading!

February book review: Domain Driven Design

Eric Evans
Domain Driven Design

I met Eric Evans in August of 2004, when his book had just came out and he was in Twin Cities at the Object Technology User Group (OTUG) talking about Ubiquitous Language, a language used by all team members to describe the domain model. I was very impressed with Eric's presentation. In very simple terms, he was able to find and explain the essence of what is often missing in domain implementations focused too much on technology.

You will not be disappointed with Eric's book. It describes patterns on how to explore a complex business domain and express it with a comprehensible software model. These patterns help me focus on central business problems while keeping the overall design of the systems understandable and manageable.

This is a must-read book for a business application designer and developer. Happy reading!

Welcome to ModelBlog

Thank you for visiting ModelBlog. We hope the time you spend with us will be both entertaining and worth your while. Have fun!

Authors

Search

Archive

Tags