December 2009 - Posts

SQL Server encountered error 0x80070422 while communicating with full-text filter daemon host (FDHost) process.

When trying to do a full text search with SQL Server 2008 I received this error:

SQL Server encountered error 0x80070422 while communicating with full-text filter daemon host (FDHost) process. Make sure that the FDHost process is running. To re-start the FDHost process, run the sp_fulltext_service 'restart_all_fdhosts' command or restart the SQL Server instance.

I was able to track this down to the SQL Full-text Filter Daemon Launcher service being disabled.  Enabling and starting the service resolved the issue for me.

image

It is interesting to note that the service is set to a Startup Type of Manual but after a restart of my machine the service is started, so SQL Server 2008 must be starting it.  Having the service disabled probably prevented SQL Server from starting it the first time I went to run a full-text search.

See this post (SQL Server encountered error 0x80070422 (FIXED)) for the same error message but I did not do all the steps he did (I just enabled and started the service).



How to change the Target Framework Version for a Visual Basic Project

Today I received the following warning message from Visual Studio while adding a reference in a Visual Basic project:

image

The Target Framework version for the project ‘XXXX’ is higher than the current Target Framework version. 
Would you like to add this reference to your project anyway?

This warning message makes complete sense since the Visual Basic project I was working on is targeting the .NET Framework 2.0 and the project that was being referenced targeted the .NET Framework 3.5.  The only issue was that I was not able to figure out how to change the Target Framework Version in a Visual Basic project.

In a C# project it is pretty easy; right-click on the project and choose properties and in the Application tab (vertical tab) you will see the Target Framework dropdown box:

image

But in Visual Basic it is hidden.  Here is where I found how to change the Target Framework version after searching for a bit:

Right-click on the project and choose properties and then select the Compile tab (vertical tab).
image

At the bottom of the Project > Compile tab you will find an Advanced Compile Options… button.
image

In this dialog called the Advanced Compiler Settings is where you will find how to change the Target Framework version for Visual Basic.

image



GDI+ Error when converting Tiff to Jpeg: Parameter is not valid

One of the web applications that I work on is Instant Church Directory, a website that helps churches create a church photo directory.  Since the main focus of the application is to create a photo directory, customers are uploading all sorts of images into Instant Church Directory and the application needs to correctly convert and store the images and insert them in the final output, which is a PDF.

Since the web application was launched in September 2008 we have had an issue with some Tiff images that are uploaded and throw a System.ArgumentException when the image is converted to a Jpeg.

System.ArgumentException: Parameter is not valid. at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams) at System.Drawing.Image.Save(Stream stream, ImageFormat format)

Today I was finally able to track it down to the Tiff image being created (or modified) by Adobe Photoshop and Adobe Photoshop is adding extra Property Items (meta data tags) into the image.

With the help of Bob Powell’s tool: Discovering the Property Items present in an image, I was able to see that the Adobe Photoshop Tiff images included several additional property items that were not present in other Tiff images that worked.  Removing the tags from the original image prior to converting it to a Jpeg resolved the issue.

Here is a list of all of the Microsoft Windows GDI+ image property tags in numerical order

The PropertyTagICCProfile is id 0x8773 and the other tag that I removed to resolve this issue is id 0x935C (this Property Item is not defined in the list above but it has a header in it with “Adobe Photoshop Document Data Block”).  Property Items 0x02BC and 0x8649 are also not defined in the GDI+ list above and also are added by Adobe Photoshop but they did not cause any issues so I just left them (although if removing the first two do not work for you then try removing the other two also). 

Here is the code that I used to remove the offending Property Items from the Tiff image before converting it to a Jpeg in order to prevent the GDI+ Parameter is not valid exception:

// Check if this is a Tiff file
if (bmp.RawFormat.Guid.Equals(ImageFormat.Tiff.Guid))
{
    //loop through all of the Properties
    //looking for the offending property items added by Photoshop
    foreach (PropertyItem pItem in bmp.PropertyItems)
    {
        switch (pItem.Id)
        {
            //ICC Profile tag (PropertyTagICCProfile)
            //Remove this tag for Tiff to be converted to Jpeg.
            case 0x8773:
                bmp.RemovePropertyItem(0x8773);
                break;

            //Unknown tag added by Adobe Photoshop
            //"Adobe Photoshop Document Data Block".
            //Removing this tag for Tiff to be converted to Jpeg
            case 0x935C:
                bmp.RemovePropertyItem(0x935C);
                break;

            default:
                break;
        }
    }
}

//convert the image to jpeg
System.IO.MemoryStream ms = new System.IO.MemoryStream();
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
bmp.Dispose();
bmp = new Bitmap(ms);

Technorati Tags: ,,


Amazon is offering free one-day shipping for the Kindle

I love this.  Amazon is offering free one-day shipping for their Kindle starting tomorrow December 23.  This means you can buy the Kindle up until midnight (EST) on December 23, 2009 and still have it delivered in time for Christmas.  (There is free 2-day shipping if you buy it today.)  What an awesome way to bring in new customers. 

Kudos to the Amazon marketing team for coming up with this marketing idea.  But I think the real credit should go to all of the Amazon people who made the free one-day shipping a reality.  I am sure tons of marketing people have had the idea to use free one-day shipping right before Christmas to promote a product but have not had the behind the scenes infrastructure to actually pull it off.

Check out the count down clock on their home page too:

image

Technorati Tags: ,


StackOverflow to Google Index in 30 minutes

This is pretty amazing.  I asked a question on StackOverflow and 30 minutes later (while I was still trying to find the answer on my own) I found my question indexed in Google’s search results.  WOW!

image

image

Bing didn’t have my StackOverflow question… but it did have an answer for me.

+1 for Google getting my StackOverflow question indexed so fast.
+10 for Bing getting me the answer.

Technorati Tags: ,,


jQuery: How to check if button is disabled

You can use jQuery to trigger a button click from the client.  In this certain situation, I needed to make sure the button was not disabled prior to clicking.  In jQuery you can use the “is” function to check if the button is disabled like this:

<script type="text/javascript">
    $(document).ready(function() {
    if ($('#StartButton').is(':disabled') == false) {
            $('#StartButton').click();
        }
    });
</script>

 

Technorati Tags:


Changing up how my Someday/Maybes are organized

I am a big fan of Getting Things Done (GTD) and highly recommend the GTD book and the methodology to everyone and anyone. 

I do not consider myself a GTD Black belt yet but I am continually progressing and getting better and better at GTD each and everyday.  One of the areas of GTD that I consider to be my weakest is the Organize part of GTD.  I tend to resist moving projects and next actions that are truly someday/maybes into my someday/maybe list.  This is because my someday/maybe list has become so large that I do not review it regularly and no longer is it a trusted part of my GTD system.

But I am also a big fan of keeping things flat.  I want to keep the overhead associated with running a GTD system at a minimum and having everything flat is a huge win for me in this area.  Up until now I had a single someday/maybe section (I use OneNote) for all of my someday/maybes but it definitely has become overwhelming and I am resisting putting things into the blackhole that is my someday/maybe list.

I am going to try separating them into the various roles that I have:

  • Developer
  • Husband
  • Father
  • Homeowner
  • Entrepreneur

image

I will see if this will allow me to keep my Next Action and Project list clean by feeling completely comfortable moving a stale item into my someday/maybe list (now that I can review these regularly… something I was not doing to my someday/maybes which is why I resisted moving items there in the first place).

Technorati Tags: ,


Amazon Same Day Shipping

Back in October I heard that Amazon was introducing same day shipping delivery for some cities. Today I received an email for being an Amazon Prime member reminding me that Amazon has the ability to deliver an item to me within the same day.  But what is really amazing is the cut-off times; in Seattle you can order an item up to 1PM and get it delivered to you that same day:

image

That is amazing!  Talk about reducing the friction in buying… Amazon is an expert!  Just ask me how many items I bought for Christmas through Amazon Prime just because I get free two-day shipping.

Technorati Tags:


Where to find the Subversion Binaries (svn.exe)?

I was setting up CruiseControl.NET for the Vaasnet automated build system and I needed the Subversion binaries.  This is my first project that I had used Subversion for source control and up until now I had just been using TortoiseSVN for interacting with the source control repository. 

CruiseControl.NET needs the Subversion binaries since this is how it communicates with your Subversion repository (through svn.exe).  Finding just the binaries ended up being a particularly difficult task.  Eventually I figured it out… posting here for anyone else that also runs into this issue:

  1. Start here: Tigris.org – Getting Subversion
  2. Head down to the Windows section and click on the Tigris.org link:
    • image
  3. Look for the latest version MSI installer (at the time this post was written v. 1.6.6)
    • image
    • Name: Setup-Subversion-1.6.6.msi
  4. Run this installation app and you will get svn.exe installed on your machine.
    • On Windows Server 2008 64-bit the default install path will be:
      • C:\Program Files (x86)\Subversion\bin\svn.exe

Hopefully this will help someone else in the future.

EDIT (2011-01-25): Alec Taylor found up to date ones here:

EDIT (2012-01-27):

See http://nightlybuilds.tortoisesvn.net/  for instructions on the correct folder for the stable release.  The "latest" folder is the nightly build.

Technorati Tags: ,


URL Authorization role service required for IIS7 system.webServer/security/authorization

Why isn’t IIS7 authorization working in my asp.net website?  I was trying to secure a folder in my asp.net application using the IIS7 system.webServer/security/authorization configuration settings.  In the past you could do this through the ASP.NET configuration by adding an authorization section to the system.web section in your web.config.   But now with IIS7, you can use the new system.webServer/security/authorization section to specify authorization rules.  The benefit of system.webServer authorization over system.web authorization is that the former applies for all requests to that particular location, the latter only protects asp.net requests (requests that come through the asp.net pipeline).

So, since I am developing this application on IIS7, I wanted to use the new IIS7 system.webServer authorization section to protect a particular folder.  To do this, I added the following section to my web.config file:

<location path="admin">
  <system.webServer>
    <security>
      <authorization>
        <remove users="*" roles="" verbs="" />
        <add accessType="Allow" users="" roles="administrators" />
      </authorization>
    </security>
  </system.webServer>
</location>

and tested the url http://localhost/admin and… it didn’t work.  What should have happened is I should have been redirected to the forms authentication login page, but instead I was served the content under the /admin folder.  Not what I wanted; the /admin folder should now require an authenticated user and the forms authentication identity to be part of the administrators role.

What is going on?!?!?  Everything looked correct.  I confirmed that IIS authentication was set correctly: anonymous and forms authentication only.  I confirmed that the system.web/authorization section was working.  I tried in multiple browsers to make sure it wasn’t a cookie or a caching issue.  Still I was left scratching my head… why were settings in the IIS7 system.webServer/security/authorization not getting picked up?

Finally, with the help of Scott Forsyth, I checked the Server Manager IIS Roles that were enabled.  Server Manager > Roles > Web Server (IIS) > Add Role Services

image

image

Notice that the URL Authorization role service is not installed. 

image

 

That was it.  IIS7 did not have the role service installed so it was not understanding that section of the web.config file.

After installing the IIS URL Authorization role service, a request to http://localhost/admin redirected to the forms authentication login page and required a user that was in the administrators role.



More Posts Next page »

Search

Go

This Blog

News

Syndication