Monday, December 22, 2008

Important Blog I Used Today for Apache2 Configs and SSPI / LDAP

http://pteropus.blogspot.com/2008/04/securing-subversion-via-ldap.html

Sunday, December 14, 2008

Google Getting P0WN'D By PWO

Google's News, Alerts and E-Mail systems are getting totally pown'd on by a French company called "PWO" or PotterWorldOnline.

I am getting spammed like crazy via all my alerts by a company that Google knows distributes spyware.

I am this close to disabling Alerts because I cannot find a way to get Google to understand they've been tricked/hacked/beaten.

Thursday, October 30, 2008

SlickSpeed, From The Makers of MooTools

It compares the performance of various CSS selector implementations found in the various JavaScript web development libraries of the day (jQuery, ExtJS, MooTools, ect.)

http://mootools.net/slickspeed/

Wednesday, October 29, 2008

Good Blog To Read

http://blog.objectmentor.com/

Could not load type 'System.Web.Routing.StopRoutingHandler' from assembly 'System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

If you have upgraded from ASP.Net MVC Preview 3 to ASP.Net MVC Preview 5 and are recieving this error:

Could not load type 'System.Web.Routing.StopRoutingHandler' from assembly 'System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

The solution I found was from this ASP.Net Forums Post, about a Runtime error after upgraded to preview 5

Solved!

I had to remove and re-add the updated DLLs to my GAC:

C:\Program Files\Microsoft ASP.NET\ASP.NET MVC CodePlex Preview 5\Assemblies>gacutil -if System.Web.Routing.dll
C:\Program Files\Microsoft ASP.NET\ASP.NET MVC CodePlex Preview 5\Assemblies>gacutil -if System.Web.Abstractions.dll

Wednesday, October 22, 2008

Code Cohesion, Inappropriate Intimacy and Other Dirty Sounding Architecture Principals

Who said software architecture wasn't exciting? 

Take a look at this great MSDN article that my boss at work linked me to, Patterns in Practice: Cohesion and Coupling and another one, I found on my own with Google, about Inappropriate Intimacy, which is defined by the author as "classes become far too intimate and spend too much time delving in each others' private parts."

Software Organization, a common topic of discussion among my technical architect peers, is a critical important component of good implementations.  The platform's future capabilities for reuse, refactorability and maintainability are all set down early in the design and development as cohesion and coupling are either defeated, accepted or ignored completely.

Thursday, October 16, 2008

Apache 2.0 Configuration Redux

I was also reading this related post about creating secure Apache configurations.  Some background on my "Limit 0" is bad.

Security is paramount with public web servers and this article will give you a head start locking down your Apache2 config.

Error "XML request body is larger than the configured limit of 1000000" -- Subversion 1.5, Apache 2.0 and LimitXMLRequestBody 0

Recently, I started getting this error when doing Subversion "update" on a large folder in my repository called "branches"

XML request body is larger than the configured limit of 1000000

This is following up Subversion 1.5.2 upgrade and is occurring in Apache 2.0

The fix, for me, was to remove the limit on the XML request body by setting the following:

LimitXMLRequestBody 0

and the error was fixed.  Limit XML Request Body should not be set to 0 for public web servers, as that will open you up to Denial of Service (DoS) attacks, however, my SVN system is private to my development team and this setting was appropriate for my deployment.

Host Name:                 *** SUBVERSION SERVER ***
OS Name:                   Microsoft(R) Windows(R) Server 2003, Standard Edition
OS Version:                5.2.3790 Service Pack 1 Build 3790
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Member Server
OS Build Type:             Multiprocessor Free
Registered Owner:          Distributed Computing
Original Install Date:     8/4/2005, 2:50:21 PM
System Up Time:            225 Days, 13 Hours, 26 Minutes, 37 Seconds
System Manufacturer:       HP
System Model:              ProLiant DL380 G4
System Type:               X86-based PC
Processor(s):              2 Processor(s) Installed.
                           [01]: x86 Family 15 Model 4 Stepping 1 GenuineIntel ~3400 Mhz
                           [02]: x86 Family 15 Model 4 Stepping 1 GenuineIntel ~3400 Mhz
Input Locale:              en-us;English (United States)
Time Zone:                 (GMT-05:00) Eastern Time (US & Canada)
Total Physical Memory:     2,047 MB
Available Physical Memory: 295 MB
Page File: Max Size:       876 MB
Page File: Available:      1,606 MB


Friday, October 10, 2008

Existing ASP.Net MVC Starter Kits

ASP.Net MVC Starter Kit Ideas Of Mine

A short list of ASP.Net MVC Starter Kit Ideas of mine:

  • ASP.Net MVC AJAX with Pure jQuery
    • Page Regions
      • On Load
      • On Click
    • Modal / Normal AJAX Dialogs
    • AJAX Form POST to MVC Controller
  • ASP.Net MVC AJAX -- The Three Approaches (Postbacks Do NOT Count)
    • XHTML
    • XML
    • JSON
  • ASP.Net MVC ITEM Starter Kit
  • ASP.Net MVC LMS Starter Kit

Thursday, October 09, 2008

Some AJAX Items On Bugzilla

I was looking at this page (https://wiki.mozilla.org/Bugzilla:UE) and thinking about the improvements I deploy with Bugzilla and how they might be generally useful to all Bugzilla users.

A lot of this is inspired by my obsession with AJAX and jQuery, but more so, with the fact that I have deployed Bugzilla to hundreds, if not thousands, of users in my career and I have always been pleased -- both with the system as a platform and with my ability to customize it.
  • Client-Side Table Sorting -- Many tables today in Bugzilla cannot be sorted and are not Zebra'd
    • Bug List
    • User List
    • Classification / Product / Component Lists
    • Request Queue
    • Flags
    • Custom Fields
  • AJAX Content Hovers
    • These can replace links to "fields.html" and allow the user to get immediate information about products, components, resolutions and status
  • Search-As-You-Type and Revise Search From Search Results with an AJAX 'ctype' 
  • AJAX Hovers for "Defect #" or "Bug #" auto-linking.  Dynamic, beautiful and far more informative AJAX hover could display assignees, current status and (configurable?) information
  • Replace attachment iFrames with jQuery .ajax()

General Stuff I Change
  • Switching "Saved Searches" Into Drop-Down Menus to support large numbers of shared queries
  • Many Additional Bug Entry Templates
  • Customized Index.cgi
    • Include Index of Saved Searches
    • Canned Reports
    • Links To New Defect Forms
  • Add "Clone Defect With Same Product" Link
  • Reverse Blocks/Depends On for Clones
  • Add "Clone Defect To Same Product" Link to All Dependency Tree Bug Tree Nodes
  • Add a Knob "Assign & Accept This Defect Into My Queue"
    • This may be a function of my SVN and CVS hook scripts that require this state for defects to be used for commits.  This feature is probably only as useful as the Assigned/Accepted status is for the user
  • Increase the Whiteboard to a Textarea

ASP.NET MVC CodePlex Preview5 and Visual Studio 2008 SP1

As you have read in the Release Notes for ASP.Net MVC CodePlex Preview 5
the new release of MVC is not compatible with Service Pack 1 Beta. You must install SP1 (a long process) starting with a download from Microsoft.

The Preview 5 Release Notes say that you must install SP1 before you install ASP.Net MVC Preview 5, however, I found that installing SP1 on top of Preview 5 seems to work as well.

I am not certain that this is just the machines I was upgrading or all machines, but it did work for me.

jQuery'd Bugzilla

I have been working on re-doing Bugzilla's UI and my AJAX enhancements in jQuery.

Is anyone else working on this?

Upgrading From ASP.Net MVC Preview 3 to Preview 5

As you know, ASP.net MVC Preview 5 is on the streets.

Busy using Preview 3 to produce awesome web applications, I missed the upgrade to Preview 4.

I am upgrading two big MVC application built on Preview 3.  Here are the issues I found:

Html.ActionLink() Behavior Changed
  1. On This ActionLink and Preview5 Forum Post I found a Solution
  2. The fix is to change this:
     Html.ActionLink("Title", "Action", "Controller", new { id = this.ObjectID } );
to this:
     Html.ActionLink("Title", "Action", "Controller", new { id = this.ObjectID }, null );


Html.Hidden() Behavior Changed
  1. On this MVC UI Helper Article I thought I found a Solution, but no such luck
  2. My fix was to change this:
   Html.Hidden("ReviewId", this.ID);
to this
   Html.Hidden("ReviewId", this.ID.ToString());


Wednesday, August 13, 2008

TDD: Test-Driven Development with Visual Studio 2008 Unit Tests

Test driven development is a powerful concept and once you get it (aka, "Test Infected" [no, not like zombies!]) you'll never go back.

Nice page here with a break-down on how to get it running for Visual Studio 2008.  I am not exactly in love with MSTest so I'm really glad they're supporting NUnit (for the time being [it is Microsoft] at least.)

http://weblogs.asp.net/stephenwalther/archive/2008/03/19/tdd-test-driven-development-with-visual-studio-2008-unit-tests.aspx

Programming Environment, Now In Color

Theming and fonting your Visual Studio 2008 environment is very important to being a happy and productive programmer.

Here is some help for you ...

http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx

Tuesday, June 24, 2008

Photo Sharing Site Spam

Chuck,

I will be totally honest with you -- I am pretty happy with the photosites that I use right now.  Both support communities and drive print sales.

I use Pro.Pictage and Pro.SmugMug.  All total my clients spend in excess of $2,000 / month on these two sites combined.

Why do I love them so much?
  • FTP Upload.  My average wedding take is 10GB and I need a robust, scalable highly-batched upload system and the automated FTP system I have created supports my needs very well.
  • Album Design Service.  Pictage's free album design services provide me and my clients an invaluable feature above and beyond standard print ordering.
  • LightRoom Integration.  I will not / cannot take the time to apply tags outside of LightRoom.  My workflow is not flexible and I will not change it for any reason other than my own.  Therefore, I need a solution that fully integrates with my toolset for tagging images -- Pictage and SmugMug both support Adobe LightRoom integration.
Why do I hate them so much?
  • Expensive.  Pictage is $100 a month flat rate fee before you even buy anything.  That means I have to sell a lot to break even.
  • Slow Turn Around.  While free album designs are great, waiting 5 weeks to see the printed product arrive at the studio is a PITA.
  • Stupid User Interfaces.  Pictage's user interface is horrible.  I mean, unforgivably terrible.
Hope that helps :)

- Cory

Thursday, June 19, 2008

Do NOT Install "Microsoft Recipe Framework" In Visual Studio 2005

Why not?

  • It does not work correctly, and provides almost not real value.
  • It will increase your Visual Studio 2005 memory usage by approximately 50%
  • It can never be uninstalled even if you decide you do not like it

Sunday, June 15, 2008

ati2mtag -- Edid Checksum Error (DAL -- 43033)

One of my ATI-nVidia-AMD-WindowsXP workstations has recently developed some seriously stability issues.

I am using an ATI Radeon X1800 on with the AMD Athelon 64 X2 Dual Core 4400+. Not a brand new system, but not too old either.

The machine, under load, will spontaneously reboot and the only evidence of a system problem is an Event Log entry from "ati2mtag" stating Edid checksum error. This reboot (for me at least) would do one of these things:
  • put both monitors into PowerSave mode, freeze all input & disable NumLock -- but not reboot. In this case the soundcard would issue a loop of recent input make terrible screeching sounds
  • Freeze the output to the monitor (leaving the screen frozen, in either a screensaver or the UI of whatever was running), freeze mouse input & disable Keyboard/Numlock -- but not reboot. Sometimes, in this case the soundcard would issue a loop of recent input make terrible screeching sounds
  • Issue an immediate hard reset to the machine and reboot immediately without warning

I have upgraded my drivers, disabled Edid checking in Catalyst and it is still happening.

I am not certain but I believe it may be temperature related.

http://forums.techarena.in/showthread.php?t=882129
http://www.techsupportforum.com/hardware-support/video-card-support/207822-pc-restarting-occures-only-wc3-2.html
http://www.driverheaven.net/hardware-discussion-support/144512-x1650-issues.html

I performed about every settings change and drive update I could think of to resolve this issue. Once I disabled all EDID Checksum Error generating functionality, I was still having the sudden unplanned system reboots, but I had eliminated the Event Log entry.

So, following the temperature hunch I took the case part, cleaned everything, removed a few panels that were blocking air flow. Following these changes I monitored the VPU's core temperature via Catalyst's OverDrive control-panel, which allows you to view the temperature even if you are not enabling overclocking (which I am not.)

Removing all the dust and making some minor tweaks to the case reduced the temperature from 71C to 62C on average.

Friday, June 13, 2008

Bugzilla 3, Server-Push, FireFox2 and Symantec Endpoint Protection (or Other Anti-Virus / Firewalls)

Another random problem I had to fix today.

My organization recently upgraded to Symantec Endpoint Protection and I use Firefox2 and Bugzilla 3.0.2 (a lot!)

One solution is to add serverpush=0 to your URL, to Turn Off Server Push in Bugzilla Queries.

I ended up adding it to my "Query Defaults" query templates and hacking it in the MySQL database for some of my saved queries that I couldn't fix with the query templates.

I am going to have to fix this Bugzilla defect:

https://bugzilla.mozilla.org/show_bug.cgi?id=298995

Wednesday, June 11, 2008

Debugging AJAX Applications -- Use FireBug, End Your Troubles

  • Are you struggling with debugging AJAX applications? 
  • Has your code complexity gotten away from you? 
  • Are you looking at someone else's AJAX application wondering "How the heck?"
  • Trying to figure out why IE works and Firefox does not?

Firebug, available here, is the answer:

https://addons.mozilla.org/en-US/firefox/addon/1843

It is popular and rocks.

Average Review: 5/5
65,453 weekly downloads
5,446,199 total downloads

Get FireBug Now!

Tuesday, May 27, 2008

BizTalk Server 2006, BAM, BAM API, C# and Orchestrations

Some links about Microsoft BizTalk Server 2006

GenerateTypedBAMApi is a tool to automatically create a C# object that wraps your BAM API.  A page about it also here, by the author, http://blogs.msdn.com/darrenj/archive/2006/03/17/554049.aspx.

Using BAM API and the TPE together in an orchestration or larger BizTalk 2006 scenario.
Capturing BAM Data in BizTalk 2006 Orchestration when using a looping construct with repeated messages / BAM events.
Some somewhat useful stuff about how to get messages bodies out of the BAM Tracking DB programatically with an expression.

Monday, April 21, 2008

Create Screencast for Free

You can create screencasts at ScreenCastOMatic.

All you need is Java and a topic.

XHTML Target Attribute, Open New Windows With JavaScript

The XHTML Strict web standard has removed the "target=" attribute.

Here is an article about a (somewhat complex) way to handle this in a universal way with the DOM2 API and create valid XHTML that opens new windows where appropriate.

A less comprehensive approach, and the one I elected to use, was to add this to replace the "target" attribute:

onclick="this.target = '_blank';"

Is this not cheating?  We are not using the old HTML "target" attribute, but we are still adding something called "target" to our precious, and now valid, A-Href.

The answer is no. The Document Object Model (DOM), which governs the document objects and attributes that are available to JavaScript code, is a totally separate standard from (X)HTML.

Also consider that the DOM 2.0 standard that was published in January 2003 (well after XHTML 1.0, let alone HTML 4.0) still includes this attribute. It seems clear that while this attribute is slated to be phased out of (X)HTML, it will be available to JavaScript through the DOM for the foreseeable future.

Places To Use AJAX

This page, which I would call "Places to Utilize AJAX For Maximum Benefit" is a great list of ideas.

  1. Form driven interaction.

    Forms are slow. Damn slow. Editing a tag (the old way) on a del.icio.us bookmark? Click on the edit link to load the edit bookmark form page, then edit the field and hit submit to wait for the submission to go through, then return to the previous page and scroll down to find the bookmark to see if the tags look right. Ajax? Click on the edit link to instantly start changing tags, click on the submit button to asynchronously send off changes to the tags and quickly see in place what changed, no reloading the entire page.

    1. Form driven interaction- Subset:Linked Select Menus.

      Imagine a T-Shirt with 3 options; Size, Color, and Style. When tracking inventory for your product, you know you have Large, Red, Polo shirts in stock, but you're out of Small, Blue, T-Shirts… It is frustrating to the user to pick this combination and then receive an error on the checkout page stating that you are out of stock… and then have to go back to the selection process and reconfigure the item… Using AJAX, you can check the stock of the options as the user picks them and only return or show the items which are in stock.

    2. Form driven interaction- Subset: Autosave.

      Think of someone writing in Word. Which button do they use the most? Save.

      With javascript you can do one better. Not only can you have a save & continue that works just like the del.icio.us forms – you can autosave! Remember to tell the user this, as simply knowing this relaxes quite a lot of people. Properly explained count-down clocks are prefered, for obvious reasons.

  2. Deep hierarchical tree navigation.

    First of all, applications with deep hierarchical tree navigation are generally a nightmare. Simple flat topologies and search/tagging works very well in most circumstances. But if an application really calls for it, use Javascript to manage the topology ui, and Ajax to lessen the burden on the server by lazy loading deep hierarchy data. For example: it's way too time consuming to read discussion threads by clicking through and loading completely new pages to see a one line response.

  3. Rapid user-to-user communication.

    In a message posting application that creates immediate discussions between people, what really sucks is forcing the user to refresh the page over and over to see a reply. Replies should be instant, users shouldn't have to obsessively refresh. Even Gmail, which improves on the old hotmail/yahoo mail 'refresh inbox, refresh inbox' symptom, doesn't really push Ajax far enough yet in terms of notifying new mail instantly.

  4. Voting, Yes/No boxes, Ratings submissions.

    It's really too bad there are no consistent UI cues for Ajax submission, because submitting a vote or a yes/no response is so much less painful when the submission is handled through Ajax. By reducing the time and impact of clicking on things, Ajax applications become a lot more interactive – if it takes a 40 seconds to register a vote, most people would probably pass unless they really care. If it takes 1 second to vote, a much larger percentage of people are likely to vote.

  5. Filtering and involved data manipulation.

    Applying a filter, sorting by date, sorting by date and name, toggling on and off filters, etc. Any highly interactive data manipulation should really be done in Javascript instead of through a series of server requests. Finding and manipulating a lot of data is hard enough without waiting 30 seconds between each change in views, Ajax can really speed this up.

  6. Commonly entered text hints/autocompletion.

    Entering the same text phrases or predictable text phrases is something software/javascript can be good at helping out with. It's very useful in del.icio.us and GMail, for quickly adding tags/email addresses.

  7. Long Running Queries/Remote Calls

    If a query or a call to a remote webservice is going to take a long time that cannot be avoided, Ajax works well to manage the time a user waits for the call to return. For example, SWiK uses Ajax to fill in results from webservices detailing new projects: a user doesn't have to wait for Google webservice to return before starting to edit a new project

  8. Computationally Expensive Operations

    Unfortunately, Javascript has a tendency to be quite slow. Complex math or number crunching just isn't Javascript's forte. Additionally, heavy Javascript computation can slow the basic user interface to a crawl. An XMLHTTPRequest call can be helpful here, pushing expensive computations to beefier remote servers.

  9. Server Savings
  10. Sometimes, a process users do over and over on a site requires only a small amount of new data to be sent over the wire, but loading entire new pages can be a strain on the servers in bandwidth and resources. Ajax can be used to load pages more efficiently, as seen in various tests. Of course the ease of making new or multiple requests from the server using Ajax also means that it's easy to overtax server resources as well.

  11. Interactive Panning And Moving Over Data
  12. Moving and scanning over large data sets makes it impracticable to pre-load all of the data. Loading the data just ahead and just behind the user gives the appearance of the entire data set being accessible, and helps eliminate loading times. A great example of this is Google Maps' scrolling tiles system that gives the effect of moving over a map by picking up tiles behind and placing them ahead of the user, filling them with new data requested via Ajax.


Help for Microsoft Model-View-Controller (MSMVC) On Windows XP with IIS5 and ASP.Net 3.5

Using ASP.NET MVC on IIS 5

This is a note for people trying to use the MVC framework, and that are on Windows XP. If you dislike the ASP.NET development server that comes by default with Visual Studio as much as I do, you've switched your MVC application to work against IIS already. WinXP is running IIS 5, and you'll notice that the routing will stop working when you switch.

  1. Right-click your application virtual directory on inetmgr.exe.
  2. Properties->Virtual Directory Tab-> Configuration.
  3. Add a new mapping extension. The extension should be .*, which will be mapped to the Executable C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll, or the appropriate location on your computer (you can simply copy this from the mapping for .aspx files). On the mapping uncheck "check that file exists".
  4. 3 X OK and you're good to go.
  5. If you want, you can apply this setting to all your web sites. In step1, click on the "Default Web Site" node instead of your own virtual directory, and in step 2 go to the "Home Directory" tab. The rest is the same.

Now you've mapped every request on the web site to ASP.NET. To check that it works you can request a non existing html file on your web-site and see that the error you get is with an ASP.NET footer.


Using .NET 3.5 & MVC on IIS 5

Some information on .Net 3.5 here:
http://forums.asp.net/p/1183060/2010779.aspx

The thing to keep in mind is that .Net 3.5 is not a new version of .Net as far as IIS and ASP.Net are concerned.  You still enable the same ISAPI filters and such in IIS as you would for .Net 2.0

The major difference between the two types of applications is in the Web.Config, in particular, the CODEDOM configuration blocks.  These configurations will get the ASP.Net 2.0 framework to load the compilers and system libraries for ASP.Net 3.5 and everything will work fine.  The confusion continues under IIS6, but you can at least set up application pools to make it look like ASP.Net 3.5 is it's own thing.

http://www.hanselman.com/blog/PermaLink.aspx?guid=151607c0-3dc8-4567-a810-a558e129dd85


AJAX Link City

jqModal
jqModal is a tool to help you display notices, dialogs, and modal windows in a web browser. Looks are controlled by standard and designer friendly HTML and CSS, independent of the javascript. jqModal is flexible and tiny -- it is the Swiss Army Knife of a great "general purpose" window plugin for jQuery.
http://dev.iceburg.net/jquery/jqModal/

jqForm
The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX. The main methods, ajaxForm and ajaxSubmit, gather information from the form element to determine how to manage the submit process. Both of these methods support numerous options which allows you to have full control over how the data is submitted. Submitting a form with AJAX doesn't get any easier than this!
http://www.malsup.com/jquery/form/

Great AJAX Gotchas Page

But the specifics of Ajax development are equally perilous to basic application design. The siren's call of the XMLHTTPRequest object can lead many brave scripters to a demise on the rocky shoals of browser limitations and bugs.

http://swik.net/User:alex/Alex+Bosworth's+Weblog/Rocky+Shoals+of+Ajax+Development/dc2q

AJAX Mistakes List
Ajax is also a dangerous technology for web developers, its power introduces a huge amount of UI problems as well as server side state problems and server load problems. I've compiled a list of the many mistakes developers using Ajax often make.
http://alexbosworth.backpackit.com/pub/67688


Tuesday, April 08, 2008

Extending BizTalk 2006 with Custom XSLT

Hello,

We have been talking about how to use Custom XSLT in BizTalk 2006 to reduce the overall complexity of some transforms that are not easily or simply represented using built-in BizTalk 2006 mappers.

BizTalk Custom XSLT in Mapper
http://www.objectsharp.com/cs/blogs/matt/archive/2005/12/15/3668.aspx

Extending BizTalk Mapper with XSLT
http://msdn2.microsoft.com/en-us/library/aa560433.aspx

Debugging XSLT in Visual Studio 2005
http://www.masteringbiztalk.com/blogs/jon/PermaLink,guid,bc5e05f0-659f-4ace-a6fe-d864cdf1fbe2.aspx

Basic Custom XSLT Mapping
http://www.developer.com/net/article.php/3721871

Friday, April 04, 2008

CGI::Application and HTML::Template -- Better Than your MVC System

Once in a while I get to see something on the web that makes me think back to the early days of 1996 and my first work on web-based shopping carts using MVC.

http://www.perlmonks.org/index.pl?node_id=199411

He cross-references HTML::Template, CGI::Application and even touches on MivaMercheant / Redhat Interchange, et al.

WOOOT>>>

Thursday, April 03, 2008

WebService SOAP Security

Subject: RE: Questions regarding Web Service, SOAP Security

I would suggest SSL, a firewall rule specific to fixed client IP-range or server, and Digital Signatures.

If you are making use of C#, .Net 2.0 and WSE 2.0 (I think that is what I see in your repository?) I would suggest one of these two methods, depending on how easy they are for the calling organization to implement.

#1.  How to: Verify Digital Signatures of SOAP Messages Signed by an X.509 Certificate
http://msdn2.microsoft.com/en-us/library/ms824650.aspx

#2.  How to: Verify Digital Signatures of SOAP Messages Signed Using a User Name and Password
http://msdn2.microsoft.com/en-us/library/ms819945.aspx

How to: Add Security Credentials to a SOAP Message
http://msdn2.microsoft.com/en-us/library/ms819938.aspx

Using MessageSignature,
http://msdn2.microsoft.com/en-us/library/microsoft.web.services2.security.messagesignature.aspx
Instead of using the EncryptedData class, because SSL provides the overall encryption.

If you want to use WSE 3.0 instead, the setup is similar.

Writing a WCF Service would be a potential idea as well.  That would allow you to create the service once and specify this type of security behavior in configuration when exposing it as a WebService.

BizTalk 2006 : Consuming Web Services without Web References (Using WSDL.exe Instead)

Here is a how-to on creating WSDL proxies in C# and using them from BizTalk 2006 for "Web Services" that return invalid, non-existent or un-parsable WSDL (will work for SOAP-RPC.)

http://www.topxml.com/rbnews/Biztalk%20Adapters/re-58177_Consuming-Web-Services-in-BizTalk-Without-Web-Reference.aspx

Useful for "SOAP-Like" services that will not return WSDL files with the normal ?wsdl notation.

Thursday, March 27, 2008

Web Viewer for Subversion(SVN) Repository

Need a great way to look at the history, contents and changes in a Subversion (SVN) RepositoryTry Atlassian FishEye!

Optimizing BizTalk2006 Server -- The Saga

Saw this great pair of Microsoft BizTalk Server 2006 performance sites:


XmlReader Objects With No Root Element and Converting them to XmlDocument Objects

I had this problem this week where I had an XmlReader object coming back from an SQL stored procedure using "FOR XML AUTO, ELEMENTS" but that XML returned was a record set and could not be converted into a XmlDocument using the '.Load(XmlReader reader)' method because of the missing root element.


  SqlCommand cmd = new SqlCommand();

  cmd.CommandText = sQuery;

  cmd.Connection = oConn;

  cmd.CommandType = CommandType.Text;

  XmlReader xmlRead = cmd.ExecuteXmlReader();

 

  XPathDocument xp = new XPathDocument(xmlRead);

  XPathNavigator xn = xp.CreateNavigator();

  XmlDocument xd = new XmlDocument();

  XmlNode root = xd.CreateElement(sRootName);

  root.InnerXml = xn.OuterXml;

  xd.AppendChild(root);

  oConn.Close();

  return xd;


Or you could just use, as I found out later, FOR XML AUTO, ELEMENTS, ROOT('ElementName') which works even better and then no messing around with C#.

Upgrading to Bugzilla 3.0.2 from 2.x Release

[[ Editor's Note: This post was substaintially updated on 10/08/2008 in response to much discussion with other users reading this post and performing Bugzilla upgrades under Windows. Some comments on the post have been deleted as they were refering to the old post.]]

Upgrading Bugzilla to 3.0.2 is not all that difficult with the right approach, even with Windows 2003 and ActiveState Perl.

This blog post is about upgrading customized (in some cases, extreamly customized) versions of Bugzilla from 2.x to 3.x

If you are upgrading a vanilla release of 2.x to vanilla 3.x, you should use the vanilla instructions,
standard Bugzilla upgrading instructions.

The short answer is:
  1. Backup your installation folder,
  2. Replace it with the new download
  3. Backup your database and run checksetup.pl.

For my customized upgrades, I still use the "Tarball" upgrade and a copy of my MySQL database and the process is similar.

Setup
  • Back Up Your Database
    • mysqldump --opt -u bugs -p bugs > bugs.sql
  • Replace Bugzilla 2.x with 3.x
  • Copy your localconfig file
  • Copy your data directory
    • Delete 'templates'
  • Run checksetup.pl
    • Install all required modules
    • Allow checksetup to create tables
    • Cntr+C Before it does UTF-8
  • Run contrib/recode.pl
    • I used --charset=latin1 in Windows
    • Windows does not support Encode::Detect (sad!)
  • Run checksetup.pl again
    • Allow UTF-8 Scripts
    • Allow other database changes
Database Changes

The majority of the changes to the Bugzilla database will be performed by checksetup.pl

If you have made changes to the database, for example:
  • Adding New Tables
  • Adding New Columns To Bugzilla Tables
  • Adding Relationships Between Bugzilla Tables and New Tables
  • Changed Column Types on Bugzilla Tables
  • Written Stored Procedures Referencing Bugzilla Tables
These types of customizations may cause you problems during your upgrade because checksetup.pl does not know about them.
  • Review the Bugzilla Schema changes for your upgrade
  • I find that having a clean copy of the Bugzilla 3.x database around is helpful for some reason, so for my upgrades I use the following databases:
    • 'bugs' -- Bugzilla 2.1.16 Database
    • 'bugs3' -- Clean Install of Bugzilla 3.0.2
    • 'bugs3up' -- My Bugzilla 2.1.16 Copy, Upgrading to Bugzilla 3.0.2
  • Sometimes, I dropped the 'attachments' table from my 'bugs3up' database for testing, to speed things up
Some upgrade stradegies I have used when dealing with highly customized Bugzilla databases during the upgrade from 2.x to 3.x
  • Backing Up (With MySQLDump -- be careful!) your custom tables and dropping them before running checksetup.pl
  • Remove any non-standard referential integrity constraints that you have added. These are also backed up with MySQLDump
  • Use the referenced Bugzilla Upgrade Schema differencing tool to try to restore your Bugzilla 2.x database to as much of a vanilla 2.x state as possible. In some cases, I was able to restore my column types or original relationships to 2.x standards and the checksetup.pl was able to finish.
The goal of these strategies is to simplify your Bugzilla database to the point where checksetup.pl will understand it and can perform the wonderful upgrade magic on your database (which you do not want to try to do by hand.)

These changes will break your customized Bugzilla code, reporting systems, hook scripts or whatever else -- but they will unbreak the wonderful checksetup.pl

How To Issue A Self-Signed SSL Certificate for Microsoft IIS

Here is the Microsoft KB article with the step-by-step (mostly) instructions on how to install a self-signed SSL Certificate.

If you need a cert that will work for public access, you will need to buy a SSL Certificate from a trusted CA.  Check out this SSL FAQ for more details.

Monday, March 03, 2008

Windows Vista (In)Capable?

Saw a good story on ZDNet about the Windows Vista Capable branding fiasco that is currently sucking the life from Microsoft.

What went wrong? I'll tell you what went wrong: Microsoft execs - starting with Steve Ballmer - don't care enough about their customers. Which is too bad for the thousands of smart, hard working 'softies who do.

Another good blog post about inadequate executes in the CEO and CTO positions at big companies (all too common an issue) called "Time To Go" by the same guy about Steve Ballmer.

Steve Ballmer may be the worst CEO among large tech companies - now that Kevin Rollins got booted from Dell and Sanjay Kumar of CA is in jail. Put him in a room with Steve Jobs of Apple, John Chambers of Cisco and Mark Hurd of HP and he'd look like the bouncer, not a peer. He just isn't in their league and Microsoft is suffering for it.

I could not agree more with both of these posts.  Vista sucks even on good hardware.  Microsoft has grossly over estimated sales, launch date and performance of the OS for customers. 

I, for one, have gone back to XP -- at least all my devices have drivers and my machine is stable again.