Why does Agile Development work better than the Waterfall Development method?

by jasonvonruden 22. May 2013 23:26

One of the problems with waterfall development method that agile development solves is: planning too far in advance of doing the actual work.

WHY is this bad????

I came across quote by Stephen Vincent Bené that explains “the WHY” way better than I ever could.

"If you take a flat map And move wooden blocks upon it strategically, The thing looks well, the blocks behave as they should. The science of war is moving live men like blocks. And getting the blocks into place at a fixed moment. But it takes time to mold your men into blocks And flat maps turn into country where creeks and gullies Hamper your wooden squares.  They stick in the brush, They are tired and rest, they straggle after ripe blackberries, And you cannot lift them up in your hand and move them. It is all so clear in the maps, so clear in the mind, But the orders are slow, the men in the blocks are slow To move, when they start they take too long on the way-- The General loses his stars and the block-men die In unstrategic defiance of martial law Because still used to just being men, not block-parts." – Stephen Vincent Bené , John Brown's Body (1928)

Stephen Vincent Bené is an American author, poet, short story writer, and novelist. Benét is best known for his book-length narrative poem of the American Civil War, John Brown's Body (1928)  



Windows 8 boot failure and Automatic Repair failure because disk is locked

by jasonvonruden 24. April 2013 13:12

For some reason after 5 months of using windows 8 my desktop suddenly out the the blue failed to boot complaining about MBR missing. I decided to see how the windows 8 install disc would handle recreating the hard drives Boot Sector and MBR. 

To my surprise the Automatic Repair feature was no help and it error out complaining about a very weird error that made no sense. 

“The drive where Windows is installed is locked. Unlock the drive and try again.” 


I was surprised that the searching the web was not very helpful.  After a long time I finally found a solution that work.

The Solution that worked for me:

  1. Boot from the Windows 8 Install Disk
  2. Choose Troubleshoot option
  3. Choose Advanced options
  4. Choose Command Prompt
  5. Use dos commands to fix and rebuild Boot Sector and MBR
    • Bootrec /fixmbr
    • Bootrec /fixboot
    • Bootrec /rebuildbcd

Not sure how the average computer user would ever be able to find and fix their computer when presented this error due to all the misleading blog posts and advice for Boot and MBR Issues that are on the web.


Windows 8

Windows 8 Start Screen is an ** Epic Fail ** (Good bye and Good Riddance)

by jasonvonruden 2. February 2013 01:52

After 3 months of using Windows 8, I can’t take it anymore, I hate the new start screen.  Here is what I did to restore the Windows 7 Desktop Experience on Windows 8 with free applications.  In the end I needed 2 applications Classic Shell – Start button for Windows 8 and Windows 8 – Skip Metro Suite applications to boot directly to the Desktop and completely disable all edge panels, not just hide them! All of them will be disabled, including square start button at bottom-left corner.

Now Life is good!!!!

The New Windows 8 Start Screen is an ** Epic Fail **   (On a non touch enabled device like a laptop or desktop)

Here is more information about the free applications:

Classic Shell – Start button for Windows 8


Classic Shell is a collection of usability enhancements for Windows
Highly customizable start menu with multiple styles and skins
Start button for Windows 7 and Windows 8
Toolbar and status bar for Windows Explorer
Caption and status bar for Internet Explorer


Windows 8 – Skip Metro Suite


Maybe you already known what Windows 8 won’t allow you to boot directly to Classic Desktop. Instead of that you have to click on “Desktop” tile every time you logged in. This is very annoying behavior for all of us who prefer to work with Class Desktop instead of Metro Start Screen. So I decide to fix it.
Skip Metro Suite for Windows 8 allows you to boot directly to Classic Desktop in Windows 8 RTM and Release Preview.Also it allows you completely disable all edge panels, not just hide them! All of them will be disabled, including square start button at bottom-left corner.


Windows 8

Performance Analysis of Server Logs Tool

by jasonvonruden 1. January 2013 02:36

Performance Analysis of Server Logs Tool


Ever have a Server performance problem, but don't know what performance counters to collect or how to analyze them? The PAL (Performance Analysis of Logs) tool is a powerful tool that reads in a performance monitor counter log and analyzes it using known thresholds.


  • Thresholds files for most of the major Microsoft products such as IIS, MOSS, SQL Server, BizTalk, Exchange, and Active Directory.
  • An easy to use GUI interface which makes creating batch files for the PAL.ps1 script.
  • A GUI editor for creating or editing your own threshold files.
  • Creates an HTML based report for ease of copy/pasting into other applications.
  • Analyzes performance counter logs for thresholds using thresholds that change their criteria based on the computer's role or hardware specs.


** Log4Net Epic Fail ** (Not fixed 10+ months later WHY?)

by jasonvonruden 30. December 2012 13:26

After struggling with LOG4NET SILENTLY JUST STOPWORKING and log4Net dependency problems causing broken builds on and off for the past 10 months, just figured out WHY!!!  Check out this blog post from February 2012: http://haacked.com/archive/2012/02/16/changing-a-strong-name-is-a-major-breaking-change.aspx

WORST OF ALL It Is root cause that cost real $$,$$$+ money to fix, a problem cause by log4net 10 months ago…

If you do not remove Log4Net 1.2.11 version from your projects and stay with 1.2.10 or you will break any other 3rd party library dependencies using 1.2.10.

For example:  Common Logging or Spring.NET. breaks just by using Nuget and  updating dependencies

Here is WHY! (Check out the comments to the reference blog post)

  • They changed their strong name (which is definitively the baddest idea one can have).
  • They changed the signature of log4net.Config.XmlConfigurator.Configure from 'returns void' to 'returns ICollection', which is backward compatibility breaker. I now get some type loader exception saying it can't find method 'log4net.Config.XmlConfigurator.Configure' because another library uses 1.2.10 signature of the Configure method.

I am ripping out Log4Net from all of my projects… Good thing I am using IOC dependency Injection , SOLID principles and Test Driven Development methodologies…  I will be done in about 15 minutes so I do not care if they fix it and clearly they will not….. LOG4NET EPIC FAIL… Shame Shame…


Configure Log4Net in Code

by jasonvonruden 28. November 2012 15:39

One of the most annoying things when trying to debug Log4Net logging problems is trying to get the XML configuration setup correctly. By using a code only solution you can avoid the whole mess with XML, web.config, or app.config changes. 

Here is a code only solution for Log4Net solution for logging to a database or file appender.

The Logging and Email Helper class to be incorporated into for example MVC project that allows for IOC containers and MOQ mocking framework… more on that on a future blog post.

The LoggingHelper.cs Class

using System;

namespace ManagerTools.Utils.Logging
    public class LoggingHelper
        private readonly ILogging _Logging;
        private readonly ISendEmail _SendEmail;
        private readonly string _ApplicationDisplayName;

        public LoggingHelper(ILogging logging, ISendEmail sendEmail, string applicationDisplayName)
            _Logging = logging;
            _SendEmail = sendEmail;
            _ApplicationDisplayName = applicationDisplayName;

        public void EmailApplicationException(Exception exception)
            string applicationHeaderText = string.Format("{0}: Error", _ApplicationDisplayName);
            const string USE_DEFAULT_FROM_EMAIL = "";
            string body = exception.ToString();
            _SendEmail.SendMail(USE_DEFAULT_FROM_EMAIL, applicationHeaderText, body);

        public void EmailApplicationSendTo(string toEmail, string fromEmail, string fromEmailDisplay, string subject, string body )
            _SendEmail.SendMail(toEmail, fromEmail, fromEmailDisplay, subject, body);

        public void LogApplicationException(Exception exception)
            string applicationHeaderText = string.Format("{0}: Error", _ApplicationDisplayName);
            _Logging.LogException(applicationHeaderText, exception);

        public void LogApplicationWarning(string message)

        public void LogApplicationInfo(string message)

        public void LogApplicationProgress(string message)

        public void LogApplicationDebug(string message)


The ILogging.cs Interface:

using System;

namespace ManagerTools.Utils.Logging
    public interface ILogging
        void LogException(string message);
        void LogException(string message, Exception exception);
        void LogProgress(string message);
        void LogInfo(string message);
        void LogDegug(string message);
        void LogWarning(string message);

The Logging.cs Class

using System;
using System.Data;
using System.IO;
using log4net;
using log4net.Appender;
using log4net.Layout;
using log4net.Repository.Hierarchy;

namespace ManagerTools.Utils.Logging
    public class Logging : ILogging
        private readonly ILog _Logger;

        public Logging(ILog iLog, string loggingFolderPath)
            var fileAppender = GetFileAppender(loggingFolderPath);
            _Logger = iLog;

        public Logging(ILog iLog)
            AdoNetAppender adoNetAppender = GetAdoNetAppender();
            _Logger = iLog;

        private void InitializeHierarchyLogManager()
            var hierarchy = (Hierarchy)LogManager.GetRepository();

        private AdoNetAppender GetAdoNetAppender()
            var adoNetAppender = new AdoNetAppender
                    ConnectionString = "<Enter Your Connection String Here or pass it in as a constructor argument>",
                    ConnectionType = "System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
                    CommandText = "INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)",

            AdoNetAppenderParameter logDateParameter = new AdoNetAppenderParameter();
            logDateParameter.DbType = DbType.DateTime;
            logDateParameter.ParameterName = "@log_date";
            logDateParameter.Layout = new RawTimeStampLayout();

            AdoNetAppenderParameter threadParameter = new AdoNetAppenderParameter();
            threadParameter.DbType = DbType.String;
            threadParameter.Size = 255;
            threadParameter.ParameterName = "@thread";
            threadParameter.Layout = new Layout2RawLayoutAdapter(GetConversionPatternLayout("thread"));

            AdoNetAppenderParameter logLevelParameter = new AdoNetAppenderParameter();
            logLevelParameter.DbType = DbType.String;
            logLevelParameter.Size = 50;
            logLevelParameter.ParameterName = "@log_level";
            logLevelParameter.Layout = new Layout2RawLayoutAdapter(GetConversionPatternLayout("level"));

            AdoNetAppenderParameter loggerParameter = new AdoNetAppenderParameter();
            loggerParameter.DbType = DbType.String;
            loggerParameter.Size = 255;
            loggerParameter.ParameterName = "@logger";
            loggerParameter.Layout = new Layout2RawLayoutAdapter(GetConversionPatternLayout("logger"));

            AdoNetAppenderParameter messageParameter = new AdoNetAppenderParameter();
            messageParameter.DbType = DbType.String;
            messageParameter.Size = 4000;
            messageParameter.ParameterName = "@message";
            messageParameter.Layout = new Layout2RawLayoutAdapter(GetConversionPatternLayout("message"));

            AdoNetAppenderParameter exceptionParameter = new AdoNetAppenderParameter();
            exceptionParameter.DbType = DbType.String;
            exceptionParameter.Size = 2000;
            exceptionParameter.ParameterName = "@exception";
            exceptionParameter.Layout = new Layout2RawLayoutAdapter(GetConversionPatternLayout("exception"));

            return adoNetAppender;

        private FileAppender GetFileAppender(string loggingFolderPath)
            var fileAppender = new FileAppender
                AppendToFile = true,
                LockingModel = new FileAppender.MinimalLock(),
                File = Path.Combine(loggingFolderPath, "ApplicationLog.txt"),
                Layout = GetPatternLayout()
            return fileAppender;

        private PatternLayout GetPatternLayout()
            var patterLayout = new PatternLayout
                ConversionPattern = "%d [%2%t] %-5p [%-10c]   %m%n%n"
            return patterLayout;

        private PatternLayout GetConversionPatternLayout(string pattern)
            var patternLayout = new PatternLayout
                ConversionPattern =  string.Format("%{0}", pattern),
            return patternLayout;

        public void LogException(string message)

        public void LogException(string message, Exception exception)
            _Logger.Error(message, exception);

        public void LogInfo(string message)

        public void LogProgress(string message)

        public void LogDegug(string message)

        public void LogWarning(string message)



Windows 8: Use Disk Cleanup to Remove Windows.old Folder and Other Previous Windows Installation Files

by jasonvonruden 26. August 2012 06:23

After I did the in-place Upgraded to Windows 8 from Windows 7 it did not take long to for me to decide to that I was never going back to Windows 7.  This led me to figure out what to do to about the over 10 GB of Windows 8 Upgrade Uninstall Files including the Windows.old folder which can not be deleted manually due to file lock Issues.

Enter: Disk Cleanup’ : Clean up System File option to remove the Windows 8 Upgrade Uninstall Files in a few clicks.

  1. You can find Disk Cleanup by typing:  WIN Key and start typing Disk Cleanup
  2. Click the Disk Cleanup’s “Clean up System Files” Button in the middle of the screen.
  3. Check the box for Previous Windows Installation(s)
  4. Click “OK” button and click the “Delete” Confirmation button.



Windows 8

Windows 8 RTM–Install Experiences ** A Success **

by jasonvonruden 26. August 2012 05:38

After some careful thought I decided to in place upgrade my main development Windows 7 computer to Windows 8 instead of a clean install from scratch which is what I normally do.  I just installed Windows 7 around 3 month ago so it did not have a chance to build up the normal cruft  that slows windows down over time. In the end the upgrade was so successful that I decided to upgrade my families main Windows 7 desktop computer also which also was a successful and painless in place upgrade. 

See my Blog post on my Experiences with Using Windows: Windows 8: My Favorite Shortcut Keys and Productivity Tips

Now for the not so good stuff about what did not go so well:

Windows Updates Broke (Development Computer only), Needed Repair System Integration with some applications, Visual Studio 2012 Issues, Windows Live Family Safety Issues, and finally Adobe Flash Player plugin incompatibilities with Windows 8 / IE10 and some websites. Most of these issues would be a problem with any OS upgrade. (See below)

Compatible Application Surprises:

  • Acronis True Image 11 is compatible with Windows 8 and this is Weird because Acronis True Image 2012  is NOT compatible with Windows 8

Incompatible Applications – Forced Uninstall Before Upgrade

  • Acronis True Image 2012  - Not compatible
  • Microsoft Security Essentials - Not compatible (looks like it is built into Windows Defender now)
  • Intel BlueTooth Driver - Not compatible

After Install Application Issues

  • Windows Update Broken -  Error Code 8024A000 -  Here was my solution to fix the Issue
  • Peazip – Needed Repair System Integration  with “File Explorer” – Easy to Fix
  • Virtual Box Network Device Driver Broken – Re-install Needed
    • Now that Windows 8 has Hyper-V Built in I uninstalled Virtual Box
  • LogMeIn Hamachi  - Network Settings where lost but still works
  • Visual Studio 2012 – Requires SqlServer Express 2008 R2  for VS 2010 solution files even though I had Sql Server 2008 installed and this was a big surprise to me!!!
  • Media Monkey – Reinstall to fix System Integration  with “File Explorer” causing slow MP3 file launch and playback times.
  • Windows Live Family Safety (Compatibility warnings) – Change to Microsoft Family Safety.
  • Adobe Flash Player “This content requires a newer version of the Flash Player” and IE 10 compatibility  issues on some websites and http://get.adobe.com/flashplayer/ broken from IE10.


Windows 8

Windows 8: My Favorite Shortcut Keys and Productivity Tips

by jasonvonruden 26. August 2012 04:51

With all new versions of windows there are a ton of new things to get used to and Windows 8 sure has some major changes that you will need to get used to.  At first I thought that I would not like it and find it hard to get use to the changes.  However I was pleasantly surprised how quickly I got used to the new Windows 8 start screen and the split from the desktop. I have learned to increase productivity, I needed to reduce or eliminate the use of the mouse to do things in windows. Also check out this great blog post Windows 8 productivity: Who moved my cheese? Oh, there it is. that inspired this blog post.

Here is what worked For Me

  1. Use the built-in shortcut keys!  (My favorites are listed below)
  2. Launch applications with no mouse: Launchy is a free cross-platform utility designed to help you forget about your start menu, the icons on your desktop, and even your file manager.  Once Launchy has been started, it hides in the background. You bring it forward by holding the alt key (apple on Mac, and ctrl on Linux) and tapping the space key. You can then type in a few keys of the program you are searching for and hit enter once it has been found. 

Launchy on Windows 8

  • In Windows 8 using the Alt – Space shortcut key from the start screen (anywhere in windows) will immediately take you to the desktop with launchy open and with a few more keys you can launch your favorite application and No Mouse Needed!   For example: I can launch firefox from anywhere with only 4 keys and my hands never leave the keyboard.  (ALT – SPACE - F – Enter Key)
  • As an added bonus Launchy remembers your application launch preferences including the last application you launch making application launching even faster.
  • Doubles as a quick calculator for math 1+1, 5*5, and etc will show in the answer in the launch window.
  • Has a plugin model for quick launching of other things like websites and etc.

Collection of Useful shortcut keys

  • Win – Start Screen
  • Win , Any key  - Start Screen and then Search Applications Screen
  • Win + Q –  Another way to get to the Search Applications Screen.
  • Win+D – Desktop   
  • Win+X - Administrative Tools 
  • Alt-Tab - Switch between Apps
  • Win-Tab - Switch between Full Screen Apps “Metro applications only”
  • Win+W - Search Control Panel and Settings stuff
  • Win+F - Search Files  
  • Win+C - Charms (right side menu) then arrows to move and enter to launch.
  • Win + Z – opens the App Bar for the current Metro application.
  • Win + H – opens the Metro Share panel.
  • Win , Esc - If you hit the Windows Key, you can hit Escape to go back.
  • Win+L - Lock Computer
  • Win+K – Devices
  • Win+E – Explorer
  • Win+R – Run
  • Win+(period) - Alternate sides to "snap" Metro Apps. Add shift to reverse it. 
  • Ctrl+Scroll - Can Name Groups
  • Win+Plus  - Magnifier/Zoom In
  • Win+Minus - Magnifier/Zoom Out
  • Win+Arrows - Snap desktop apps to the sides
  • Win+PageUp or Win+PageDn - Move full screen apps to other monitors.

Other Good Windows 8 -  Blog Posts 


Windows 8

Windows 8: Fix Windows Updates Error Code 8024A000

by jasonvonruden 25. August 2012 13:48

After upgrading windows 7 to Windows 8 RTM the upgrade completed successfully and when I ran windows update I received the Windows Updates Error Code 8024A000. 

I was surprised to see the new “Windows Update Error Troubleshooter”  that attempted to resolve problems that prevent me from using Windows Update  and it automated some of the common task to fix windows updates issues. 

Unfortunately the new  “Windows Update Error Troubleshooter” it did not fix my error Code 8024A000 I had to fall back on the same method used on Windows 7 and Vista.  There are several blog post that detail a command line solution to fix the issue.  I ran the commands below from a command line prompt as an administrator.  I actually copied the commands into a .bat batch script to run from the command prompt.

Blog posts for previous Windows Versions

Commands needed to fix Windows Updates Error Code 8024A000 on Windows 8 – RTM

net stop wuauserv
net stop bits
net stop cryptsvc

regsvr32 c:\windows\system32\vbscript.dll /s
regsvr32 c:\windows\system32\mshtml.dll /s              
regsvr32 c:\windows\system32\msjava.dll /s
regsvr32 c:\windows\system32\jscript.dll /s
regsvr32 c:\windows\system32\msxml.dll /s
regsvr32 c:\windows\system32\actxprxy.dll /s
regsvr32 c:\windows\system32\shdocvw.dll /s
regsvr32 wuapi.dll /s
regsvr32 wuaueng1.dll /s
regsvr32 wuaueng.dll /s
regsvr32 wucltui.dll /s
regsvr32 wups2.dll /s
regsvr32 wups.dll /s
regsvr32 wuweb.dll /s
regsvr32 Softpub.dll /s
regsvr32 Mssip32.dll /s
regsvr32 Initpki.dll /s
regsvr32 softpub.dll /s
regsvr32 wintrust.dll /s
regsvr32 initpki.dll /s
regsvr32 dssenh.dll /s
regsvr32 rsaenh.dll /s
regsvr32 gpkcsp.dll /s
regsvr32 sccbase.dll /s
regsvr32 slbcsp.dll /s
regsvr32 cryptdlg.dll /s
regsvr32 Urlmon.dll /s
regsvr32 Shdocvw.dll /s
regsvr32 Msjava.dll /s
regsvr32 Actxprxy.dll /s
regsvr32 Oleaut32.dll /s
regsvr32 Mshtml.dll /s
regsvr32 msxml.dll /s
regsvr32 msxml2.dll /s
regsvr32 msxml3.dll /s
regsvr32 Browseui.dll /s
regsvr32 shell32.dll /s
regsvr32 wuapi.dll /s
regsvr32 wuaueng.dll /s
regsvr32 wuaueng1.dll /s
regsvr32 wucltui.dll /s
regsvr32 wups.dll /s
regsvr32 wuweb.dll /s
regsvr32 jscript.dll /s
regsvr32 atl.dll /s
regsvr32 Mssip32.dll /s

net start wuauserv
net start bits
net start cryptsvc


Windows 8

LINQ is awesome solution for creating efficient queries with dynamic WHERE conditions

by jasonvonruden 25. January 2011 14:16

I have been using this method for a long time and I just want to share an example of applying dynamic “WHERE” conditions to make more efficient queries.

For example you could create a query using the “LIKE” verb to handle a query with multiple where clauses when you have the potential of having only 1 parameter and you are expecting the other parameter to wildcard.  You will quickly find out that if field that you are wildcarding with just “%” is null you will not match on it when you where expecting a match. This example of applying dynamic “WHERE” conditions totally solves that solution and it is much cleaner code as an added bonus.

Example of just using ‘LIKE’ conditions:

As you can see the query will be less efficient because you are filtering an a column that you may not need to based on the input parameters provided. Must include the function to convert nulls into empty strings, yuck.

FROM XrfReservation r
WHERE ISNULL(r.ReservationProject,'') like :dd and
      ISNULL(r.ReservationName,'') like :di and
ORDER BY r.ReservationProject, r.ReservationName

Example of of applying dynamic “WHERE” conditions:

As I hope that you will see this code looks nicer and is more efficient!

// Get XrfReservations By ReservationProject and ReservationName
public IList<XrfReservation> GetXrfReservationsByProjectName(string _reservationproject, string _reservationname, int _resultpage, int _resultpagesize)
    //Paging Logic
    int firstResult = 0;
    if (_resultpage > 1)
        firstResult = (_resultpage - 1) * _resultpagesize;
    //Linq - base query
    var xrfReservations = from r in _Session.Query<XrfReservation>()
                          select r;
    //Linq: Apply where clauses
    if (!string.IsNullOrEmpty(_reservationproject))
        xrfReservations = xrfReservations.Where(_w => _w.ReservationProject == reservationProject);
    if (!string.IsNullOrEmpty(_reservationname))
        xrfReservations = xrfReservations.Where(_w => _w.ReservationName == _reservationname);
    //Linq Apply order by.
    var xrfReservationsOrderBy = from o in xrfReservations orderby o.ReservationProject, o.ReservationName select o;
    //Linq: Apply paging.
    IList<XrfReservation> xrfReservationsList = xrfReservationsOrderBy.Skip(firstResult).Take(_resultpagesize);
    //Execute Query and return list of data
    return xrfReservationsList.ToList();

Tags: , ,

c# | LINQ | NHibernate

SharePoint SIG - InfoPath with SharePoint Code and Slides

by jasonvonruden 17. November 2010 02:49

The recent WI .NET Users Group  - SharePoint Special Interest Group (SharePoint SIG) was a lot of fun yesterday. I spoke about using InfoPath with SharePoint to enhance your users SharePoint experience.

InfoPath allows you to collect and store form data directly in SharePoint and best of all the actual data is stored as xml. Once the form is stored in a SharePoint form library you can expose any of the form’s data as columns on SharePoint views. InfoPath has the ability to on form load get data from web services, dynamically get and send data to web services based on user interaction, display context sensitive help, and finally submit the form directly into SharePoint so that the user does not have to worry about where to save the form. Think of InfoPath as a Microsoft Word template on steroids! My personal favorite InfoPath feature which is missing from Microsoft Word is unlimited repeatable sections.

My source code includes a complete solution consisting of an InfoPath form that receives data from a locally running  web service.


Use SharpZipLIb to create zip file directly from database without saving any temporary files on the hard disk

by jasonvonruden 28. July 2010 00:13

The Goal

I needed to package up inspection photos into a zip file and make them available for download directly from a website.   The inspection photos are stored not stored in the file system, instead they are stored in a MySql database via NHibernate. 

My Approach

Every example that I could find involved reading the database, writing out the files to a temporary working directory on the hard disk,  zip up the files using SharpZipLib, and then delete the temporary files.  

This seemed like a lot of extra work!

So I decided to create my zip file completely in-memory and skip writing out the files to working directory on disk.


  1. Determine if inspection has any photo attachments.
  2. Create Zip File Memory Streams using SharpZipLib a .NET compression library that supports Zip files using both stored and deflate compression methods, PKZIP 2.0 style and AES encryption, tar with GNU long filename extensions, gzip, zlib and raw deflate, as well as BZip2.
  3. Read every photo on the database and create zip entries in memory streams.
  4. Finalize the zip file.
  5. Return the zip file to the user via website http response stream.

Generate Inspection Photo Zip File

//Generate Inspection Photo Zip File
public byte[] GenerateInspectionPhotosZipFile(Inspection _inspection)
    //Open Zip File.
    MemoryStream zipOutMemoryStream = new MemoryStream();
    ZipOutputStream zipOutStream = new ZipOutputStream(zipOutMemoryStream);
    //Add Photos to Zip File.
    foreach (var inspectionAttachment in _inspection.fkInspectionAttachments)
        if (inspectionAttachment.Attachment != null && inspectionAttachment.Attachment.Length > 0)
            MemoryStream photoMemoryStream = new MemoryStream(inspectionAttachment.Attachment);
            ZipEntry entry = new ZipEntry(inspectionAttachment.AttachmentName);
            byte[] photoBytesBuffer = photoMemoryStream.ToArray();
            zipOutStream.Write(photoBytesBuffer, 0, photoBytesBuffer.Length);
    byte[] responseBytes = zipOutMemoryStream.ToArray();
    //Return Null on Empty Zip File
    const int ZIP_FILE_EMPTY = 22;
    if (responseBytes.Length <= ZIP_FILE_EMPTY)
        return null;
    return responseBytes;

Return Photo to User Via Http Output Response Stream

 //Build Inspection Photo Zip File
 private void GenerateInspectionPhotosZipFile(NHibernateDataProvider _provider, Inspection _inspection)
     //Generate Inspection Photos.
     byte[] responseBytes = _provider.GenerateInspectionPhotosZipFile(_inspection);
     //Return Zipfile in Response Output Stream
     if (responseBytes != null)
         //Response Return Zip File
         Response.ContentType = "application/zip";
         Response.AppendHeader("Content-Disposition", string.Format("attachment; filename=InspectionPhotos_{0}_{1}_{2}.zip", _inspection.Id.Inspectionid, _inspection.Bankid, _inspection.Processorid));
         Response.OutputStream.Write(responseBytes, 0, responseBytes.Length);


c# | NHibernate

Display SharePoint List Contents Outside of SharePoint using LINQ to SharePoint

by jasonvonruden 23. July 2010 12:48

My Project was to create a contacts search page for a SharePoint 2007 list library. Out of the box I could not find SharePoint built in support for searching a list library in a user friendly way.  Creating a SharePoint webpart was not an option at this time due to the pain involved in setting up the development environment and deploying the wepart to SharePoint 2007.

To accomplish this task in the required timeframe, I decided to create the contacts search page on an existing ASP.NET Website and use LINQ to SharePoint to communicate with SharePoint 2007 in an authenticated domain environment with anonymous access disabled.  The ASP.NET webpage can then be embedded in SharePoint using the built-in webpage viewer webpart.


  • SharePoint, for this project SharePoint 2007.
  • ASP.NET Website on an internal IIS web server.
  • LINQ to SharePoint which provides a custom query provider for LINQ that allows you to query SharePoint lists using the familiar LINQ syntax. 


  1. Download LINQ to SharePoint and Install.
  2. Navigate to LINQ to SharePoint install location. Default location:  “C:\Program Files\BdsSoft LINQ to SharePoint”
  3. Run SPMetal.exe to generate c# LINQ class based on the SharePoint library.
  4. Create SharePoint Data Access Layer Project: Project source:

  5. SharePointDataAccessLayer
  6. Create SharePointDataProvider.cs class.  The trickiest part figuring out how to pass the was Domain Service User Account’s User Name, Password, and Domain to LINQ To SharePoint.  I also found out that the Domain Service User Account must have full permissions to the SharePoint list library for SharePoint’s data services to work for “LINQ To SharePoint” access.

    SharePointDataProvider.cs Source Listing:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Net;
    using FrameworkCore;
    using BdsSoft.SharePoint.Linq;
    using FrameworkData;
    namespace SharePointCore
        public class SharePointDataProvider : IDisposable
            private readonly NetworkCredential _networkCredential;
            public SharePointDataProvider(NHibernateDataProviderIg _providerm)
                //Get Sharepoint Credentials
                XrfSetting xrfSettingsUserName = _providerm.GetXrfSettingByName("NetworkServiceAccount-UserName");
                XrfSetting xrfSettingPassword = _providerm.GetXrfSettingByName("NetworkServiceAccount-Password");
                XrfSetting xrfSettingDomain = _providerm.GetXrfSettingByName("NetworkServiceAccount-Domain");
                string sharepointUserName = _providerm.EncryptDecryptText(null, xrfSettingsUserName.SettingText);
                string sharepointPassword = _providerm.EncryptDecryptText(null, xrfSettingPassword.SettingText);
                string sharepointDomain = _providerm.EncryptDecryptText(null, xrfSettingDomain.SettingText);
                _networkCredential = new NetworkCredential(sharepointUserName, sharepointPassword, sharepointDomain);    
            public void Dispose()
            // Get Sharepoint Regulatory Contacts List Items
            public IEnumerable<Contacts> GetSharePointRegulatoryContacts(string _name, string _firmcompany)
                //Initialize Vaiables
                IEnumerable<Contacts> contacts = null;
                const string SHAREPOINT_SITE_REGULATORY = "http://YourSharePointServer/Sites/SiteName/";
                var sharePointDataContext = new SharePointDataContext(new Uri(SHAREPOINT_SITE_REGULATORY));
                sharePointDataContext.Credentials = _networkCredential;
                var contactsDataContext = sharePointDataContext.GetList<Contacts>();
                contacts = (from c in contactsDataContext select c).AsEnumerable();
                //Apply Filters
                const string DEFAULT_WILDCARD_TYPE = "Contains";
                string name = _name == null ? string.Empty : _name.Replace("*", "%").ToLower();
                string firmCompany = _firmcompany == null ? string.Empty : _firmcompany.Replace("*", "%").ToLower();
                if (!string.IsNullOrEmpty(_name))
                    string wildcardType = DetermineFilterWildcardType(name, DEFAULT_WILDCARD_TYPE);
                    if (wildcardType == "Equals")
                        contacts = (from c in contacts where c.Name.ToLower() == name select c);
                    else if (wildcardType == "StartsWith")
                        contacts = (from c in contacts where c.Name.ToLower().StartsWith(name) select c);
                    else if (wildcardType == "EndsWith")
                        contacts = (from c in contacts where c.Name.ToLower().EndsWith(name) select c);
                    else if (wildcardType == "Contains")
                        contacts = (from c in contacts where c.Name.ToLower().Contains(name) select c);
                if (!string.IsNullOrEmpty(_firmcompany))
                    string wildcardType = DetermineFilterWildcardType(firmCompany, DEFAULT_WILDCARD_TYPE);
                    if (wildcardType == "Equals")
                        contacts = (from c in contacts where c.FirmCompany.ToLower() == firmCompany select c);
                    else if (wildcardType == "StartsWith")
                        contacts = (from c in contacts where c.FirmCompany.ToLower().StartsWith(firmCompany) select c);
                    else if (wildcardType == "EndsWith")
                        contacts = (from c in contacts where c.FirmCompany.ToLower().EndsWith(firmCompany) select c);
                    else if (wildcardType == "Contains")
                        contacts = (from c in contacts where c.FirmCompany.ToLower().Contains(firmCompany) select c);
                return contacts ?? new List<Contacts>();
            // Determine Filter Wildcard Type Routine
            private static string DetermineFilterWildcardType(string _inputvalue, string _defaultwildcardtype)
                if (!_inputvalue.Contains("%"))
                    return _defaultwildcardtype;
                if (_inputvalue.StartsWith("%") && _inputvalue.EndsWith("%"))
                    return "Contains";
                if (_inputvalue.EndsWith("%"))
                    return "StartsWith";
                if (_inputvalue.StartsWith("%"))
                    return "EndsWith";
                return _defaultwildcardtype;
  7. Create ASP.NET Contacts Search webpage using the SharePointCore Data Access project.

    ContactsSearch.aspx.cs webpage code-behind Source Listing:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web.UI.WebControls;
    using FrameworkCore;
    using SharePointCore;
    namespace BdsgIgWeb.Groups.Bpa
        public partial class ContactsSearch : System.Web.UI.Page
            // Page Load
            protected void Page_Load(object _sender, EventArgs _e)
                if (!Page.IsPostBack)
                    //Get Sharepoint Credentials
                    NHibernateDataProviderIg providerM = new NHibernateDataProviderIg(NHibernateStaticSessionManager.SessionFactoryM.GetCurrentSession());
                    //Get Regulatory Contacts List
                    using (var sharePointDataProvider = new SharePointDataProvider(providerM))
                        const string NAME_EMPTY = null;
                        const string FIRM_COMPANY_EMPTY = null;
                        //Get Contacts
                        IEnumerable<Contacts> contacts = sharePointDataProvider.GetSharePointRegulatoryContacts(NAME_EMPTY, FIRM_COMPANY_EMPTY);
                        //Build Lookup Dropdown Values.
            // Build Program Lookup Values
            private void BuildLookupLists(IEnumerable<Contacts> _contacts)
                //Get Contact Names ComboBox Dropdown Values
                var contactNamesDistinct = (from c in _contacts
                                            orderby c.Name
                                            select new { Name = c.Name == null ? string.Empty : c.Name.Trim() }).Distinct();
                cbContactName.DataSource = contactNamesDistinct;
                cbContactName.DataTextField = "Name";
                cbContactName.DataValueField = "Name";
                cbContactName.Items.Insert(0, new ListItem("", null));
                cbContactName.Width = 200;
                //Get FirmCompany ComboBox Dropdown Values
                var firmCompanyNamesDistinct = (from c in _contacts
                                                orderby c.FirmCompany
                                                select new { FirmCompany = c.FirmCompany == null ? string.Empty : c.FirmCompany.Trim() }).Distinct();
                cbFirmCompanyName.DataSource = firmCompanyNamesDistinct;
                cbFirmCompanyName.DataTextField = "FirmCompany";
                cbFirmCompanyName.DataValueField = "FirmCompany";
                cbFirmCompanyName.Items.Insert(0, new ListItem("", null));
                cbFirmCompanyName.Width = 200;
            //Search Regulatory Contacts.
            protected void btnSearch_Click(object _sender, EventArgs _e)
            // Process Search Request
            private void ProcessSearchRequest()
                const int STRING_LENGTH_MAX = 150;
                NHibernateDataProviderIg providerM = new NHibernateDataProviderIg(NHibernateStaticSessionManager.SessionFactoryM.GetCurrentSession());
                //Get Regulatory Contacts List
                using (var sharePointDataProvider = new SharePointDataProvider(providerM))
                    //Get Contacts
                    IEnumerable<Contacts> contacts = sharePointDataProvider.GetSharePointRegulatoryContacts(cbContactName.Text, cbFirmCompanyName.Text);
                    //Apply Filters
                    var contactsfiltered = from c in contacts
                                           orderby c.Name, c.FirmCompany
                                           select new
                                                          Name = c.Name == null ? string.Empty : c.Name.Trim(),
                                                          ContactDetailsLink = string.Format("http://YourSharePointSite/Sites/SiteName/Lists/Contacts/DispForm.aspx?ID={0}", c.ID),
                                                          Title = c.Title == null ? string.Empty : c.Title.Trim(),
                                                          FirmCompany = c.FirmCompany == null ? string.Empty : c.FirmCompany.Trim(),
                                                          Phone = c.Phone == null ? string.Empty : c.Phone.Trim(),
                                                          Cell = c.Cell == null ? string.Empty : c.Cell.Trim(),
                                                          Email = c.Email == null ? string.Empty : c.Email.Trim(),
                                                          EmailMailTo = c.Email == null ? string.Empty : string.Format("mailto://{0}", c.Email.Trim()),
                                                          Address = c.Address == null ? string.Empty : c.Address.Trim(),
                                                          Notes = c.Notes == null ? string.Empty : bdsgIgFrameworkCoreWebUtils.TruncateAndRemoveRtfFromString(c.Notes, STRING_LENGTH_MAX)
                    gvContacts.DataSource = contactsfiltered;

Project source: 


Tags: , ,

c# | SharePoint | LINQ

AjaxControlToolkit ComboBox.Text User Entered Value is Missing When Enter Key is Pressed also the on change events are not called

by jasonvonruden 10. June 2010 04:55

The Issue

The AjaxControlToolkit ComboBox has a .Text attribute and a couple of server side events OnSelectedIndexChanged and OnTextChanged to deal with field changing.

However  the user entered value is missing in the .Text attribute on an enter key press and the “on change” events events are not called.


Issue Code Example:

private void BuildFileListDetails(NHibernateDataProvider _providerM)
    int resultsPage = Convert.ToInt32(ddlNavPageNumber.Text); 
    const int RESULTS_PAGE_SIZE = 100;
    //The Problem: AjaxControlToolkit ComboBox.Text User Entered Value Missing When Enter Key Pressed.
    string searchFileName= cbFileName.Text;  // The cbFileName.Text equals ""
    var xrfFiles = _providerM.GetXrfFiles(searchFileName, resultsPage, RESULTS_PAGE_SIZE);
    gvXrfFileList.DataSource = xrfFiles;

The Solution

You need to access the AjaxToolkit "ComboBox" imbedded TextBox control's .Text to access the value entered by user.

I ended up creating Utility Method to fix this issue that is executed before first use of the ComboBox.Text property. Since the AjaxToolKit ComboBox has a drop down sub component, I needed to check the drop down list to see if the new value already exists in the list and add it if it is missing before assigning the new text value.

Solution Code Example:

// Fix AjaxToolKit ComboBox Text when Enter Key is pressed bug.
public void FixAjaxToolKitComboBoxTextWhenEnterKeyIsPressedIssue(AjaxControlToolkit.ComboBox _combobox)
  TextBox textBox = _combobox.FindControl("TextBox") as TextBox;
  if (textBox != null)
      if (_combobox.Items.FindByText(textBox.Text) == null)
      _combobox.Text = textBox.Text;
/ Build File List Details.
rivate void BuildFileListDetails(NHibernateDataProvider _providerM)
   int resultsPage = Convert.ToInt32(ddlNavPageNumber.Text); 
   const int RESULTS_PAGE_SIZE = 100;
   string searchFileName = cbFileName.Text;
   var xrfFiles = _providerM.GetXrfFiles(searchFileName, resultsPage, RESULTS_PAGE_SIZE);
   gvXrfFileList.DataSource = xrfFiles;



Use Case Maker- free application to write organized use cases

by jasonvonruden 17. May 2010 21:10

Check out Case Maker a free application to capture use case information and create use case documentation.


Use Case Maker helps software developers to write organized use cases and to maintain related requirements.

  • Creation and handling of Package, Sub package, Actor and Use Case objects
  • Tree view objects organization
  • Glossary definition
  • Requirements definition
  • Assign detailed attributes to every type of objects
  • Information about use case state, priority, complexity, etc.
  • Flow of events handling of use case
  • Prose representation of use case
  • History handling of modification of state and implementation phases
  • Dynamic selection of defined objects during text creation and editing
  • References keeping between objects and textual instance
  • Automatic replace of names of objects in textual instances
  • Automatic removing of objects in textual instances
  • Save project into XML format
  • Export project into HTML multipage document
  • Export project into PDF document
  • Export project into RTF document
  • Export objects into XMI 1.1 format
  • Multilanguage support via XML configuration file
  • Packages, Actors and Use Cases can be reordered and renumbered
  • Dependency between use cases can be inserted into "Flow of events" section
  • Flow of events behavior and user interface has been redesigned to improve usability





Software Ideas Modeler-free visio alternative to create technical diagrams

by jasonvonruden 17. May 2010 20:59

If you are Looking to create development related technical documentation then this free Visio alternative is for you.  The custom activity based diagram templates look great and are easy to use.  An added bonus is that Software Ideas Modeler can export to EMF, WMF, SVG, PNG, PDF formats.

Software Ideas Modeler is a lightweight and powerful CASE Tool for the creation of UML diagrams and some others. Software Ideas Modeler is freeware (also for commercial-use).


Diagram Type Supported

* Activity diagram
* Class Diagram
* Communication diagram
* Component Diagram
* Composite Structure Diagram
* Deployment diagram
* Interaction Overview Diagram
* Object diagram
* Package Diagram
* Profile Diagram
* Sequence diagram
* State machine diagram
* Use case diagram

Main features:
* Fast and easy drawing of diagrams
* 13 types of UML diagrams
* 6 types of other diagrams (Data Flow, Mixed, CRC, Requirement, UI, ERD)
* Diagram styling
* Export to EMF, WMF, SVG, PNG, PDF
* Source code generating (C#, VB.NET, SQL DDL)
* Documentation generating






How do I add duplicate copies of a bookmark that already exist in Firefox

by jasonvonruden 13. May 2010 22:56

In Firefox version 3+ the Bookmarks > Bookmark this page does not support creating duplicate / multiple copies of the same bookmark that already exists.

Here is how to create duplicate bookmarks.

  1. On the bookmark on the bookmark menu, use right-click Copy
  2. Right-click in the folder where the copy is desired
  3. Select Paste



Moving Existing Wordpress Blog on Linux to Windows Hosting

by jasonvonruden 18. April 2010 12:20


After purchasing new windows web hosting for several new ASP.NET websites. I decided to also transferring my existing Fantastic Freeware Wordpress Blog that was hosted on the Linux Platform onto my new Windows based Hosting.  My preferred option was to convert the Wordpress blog to BlogEngine.NETusing BlogML XML format, but I ran into a lot of conversion issues. (See below)

The Bottom Line

In the end decided to move Fantastic Freeware Wordpress blog as is from Linux hosting to Windows Hosting with 404 redirect, because the default hosting company’s 404 redirect is prevents url rewriting from working.



  • The WordPress BlogML Export 1.0a for BlogML 2.0 is creating a BlogML XML file that is not compatible with the BlogEngine.NET import process which must be using BlogML 2.1Now it looks like I am going to have to dive into the source code and the XML. 
  • The RSS import was not an option because the blog has over 3000 entries and Search Engine Optimization (SEO) principles the URL must remain the same after the conversion.
  • The default hosting company’s 404 redirect was preventing url rewriting from working.

Tags: ,

ASP.NET | Wordpress

Wordpress Blog on Windows Hosting using Managed Fusion URL Rewriter

by jasonvonruden 18. April 2010 12:13

The free Managed Fusion URL Rewriteris one of the easiest url rewriters to setup and configure for use with a WordpressBlog or for your general URL Rewriting Needs.

What is Managed Fusion URL Rewriter

Managed Fusion URL Rewriter is a powerful URL manipulation engine based on the Apache mod_rewrite extension. It is designed, from the ground up to bring all the features of Apache mod_rewrite to IIS 6.0 and IIS 7.0. Managed Fusion Url Rewriter works with ASP.NET on Microsoft's Internet Information Server (IIS) 6.0 and Mono XPS Server and is fully supported, for all languages, in IIS 7.0, including ASP.NET and PHP. Managed Fusion Url Rewriter gives you the freedom to go beyond the standard URL schemes and develop your own scheme.


If your hosing provider has a default 404 redirect that overrides if a file is not found,  then URL Rewriting will not work, because the url rewrite engine will never see the request.  Please refer to my other blog post about The Easy Way to Setup Wordpress on Windows Hosting with Permalinks

How to Setup Managed Fusion URL Rewriter for Wordpress

  1. Follow the Managed Fusion URL Rewriter setup instructions.
  2. Configure the contents of the ManagedFusion.Rewriter.txt file. (See Below)
  3. Configure the contents of the web.config. (See Below)


RewriteEngine On
RewriteBase /
# wordpress admin folder rewrite rules
RewriteCond %{REQUEST_URI} ^wp-admin/
RewriteRule ^wp-admin/(.*) . /wp-admin/$1 [C]
# wordpress includes folder rewrite rules
RewriteCond %{REQUEST_URI} ^wp-includes/
RewriteRule ^wp-includes/(.*) . /wp-includes/$1 [C]
# wordpress general rewrite rules
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /index.php [L]


<?xml version="1.0"?>
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
        <section name="managedFusion.rewriter" type="ManagedFusion.Rewriter.Configuration.ManagedFusionRewriterSectionGroup"/>
    <managedFusion.rewriter xmlns="http://managedfusion.com/xsd/managedFusion/rewriter">
        <rules engine="Apache" />
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        <compilation debug="true">
                <add assembly="System.Core, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Data.DataSetExtensions, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Xml.Linq, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        <authentication mode="Windows"/>
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.
           <customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        <customErrors mode="Off">
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <remove verb="*" path="*.asmx"/>
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="RewriterModule" type="ManagedFusion.Rewriter.RewriterModule, ManagedFusion.Rewriter"/>           
            <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                <providerOption name="CompilerVersion" value="v3.5"/>
                <providerOption name="WarnAsError" value="false"/>
            <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                <providerOption name="CompilerVersion" value="v3.5"/>
                <providerOption name="OptionInfer" value="true"/>
                <providerOption name="WarnAsError" value="false"/>
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
        <validation validateIntegratedModeConfiguration="false"/>
            <remove name="ScriptModule"/>
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <remove name="WebServiceHandlerFactory-Integrated"/>
            <remove name="ScriptHandlerFactory"/>
            <remove name="ScriptHandlerFactoryAppServices"/>
            <remove name="ScriptResource"/>
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="" newVersion=""/>
                <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="" newVersion=""/>



The Easy Way to Setup Wordpress on Windows Hosting with Permalinks

by jasonvonruden 18. April 2010 12:11

If you search for how to setup a Wordpress blog using permalinks on windows hosting you will find a lot of hits referring to url rewriting which is very complex and confusing.

In the end going down the url rewriting path is a waste of time especially if you hosting company has a custom 404 redirect in place.

If you are still interested in url rewriting, please see my other blog entry about setting up a Wordpress Blog on Windows Hosting using Managed Fusion URL Rewriter

How-To Get Wordpress Permalinks working on Windows Hosting: 

  1. Install and configure Wordpress as you normally would, including your permalink settings.
  2. To get permalinks to work correctly with no url rewriting needed, change in the hosting control panel the 404 redirect to point Wordpress’s index.php.

That’s It!

Tags: , ,

ASP.NET | Wordpress

BlogEngine.NET Setup and Customization Adventures

by jasonvonruden 12. April 2010 20:46

The main reason that I picked BlogEngine.NET as the blog software for this website is because it is lightweight and easy to use.  I also found it is easy to customize the master page and CSS template to fit my needs.  The website was going to be a development blog so the Windows Live Writer and code snippet plug-in was a requirement.  I am planning to use the BlogML which is an open format derived from XML to store and restore the content of a blog to convert my Fantastic Freeware website from a Wordpress blog to BlogEngine.NET blog. 


What Did Not Worked

  • Converting ASP.NET Website into ASP.NET Web Application. It worked, but extensions feature no longer works, Dropped it because, it had no practical benefit.
  • Wordpress to Blogengine.NET conversion issues.  The WordPress BlogML Export 1.0a for BlogML 2.0 is creating a BlogML XML file that is not compatible with the BlogEngine.NET import process which must be using BlogML 2.1Now it looks like I am going to have to dive into the source code and the XML. (More on this in a future Post)


What Still Does Not Work

  • Resolved:  Windows Live Writer Issue: No spell checking (Firefox) - (Editor brakes Firefox's spell check feature) 

Tags: , ,

c# | General | Wordpress | ASP.NET