# Monday, December 26, 2011

How to discover what font was used

Sometimes you’re working on a website and you get some images with text in them, but no one remembers what fonts was used in the image. No fear! There is a website call “What The Font” that will take your picture and tell you what font was used: http://new.myfonts.com/WhatTheFont/

#    Comments [0] |
# Monday, October 31, 2011

What’s new in .NET Framework 4.5

Just came across this great picture of what’s new in .NET Framework 4.5 (click for larger version):

WhatsNewNET45-en

#    Comments [4] |
# Thursday, February 17, 2011

Single hostname gets better search ranking

I just learned something about Search Engine Optimization: if you have two domains for the same site then this will negatively impact your site ranking.

So I have http://www.develop-one.net, but my provider also automatically offers http://develop-one.net as an address for the same site.

By implementing some code to offer a 301 Redirect to anyone visiting the site (most importantly any site crawler looking to index the site) will be forwarded to the www address.
A couple of lines of code in the master page did the trick.

if ( Request.Url.Host == "develop-one.net" )
{
    Response.Status="301 Moved Permanently";
    Response.AddHeader( "Location", @”http://www.develop-one.net” );
    Response.End();
}

#    Comments [1] |
# Friday, December 10, 2010

ASP.NET Stack Overflow leads to redirect to login page

I ran into a problem yesterday that took me a while to figure out and Bing and Google were no help, so here is a blog post for those unfortunate souls that run into the same issue.

Application:
ASP.NET website running on Internet Information Server using both Windows Authentication as well as Forms Authentication.

Symptoms:
A action on the site leads to some processing on the server. Suddenly, in mid processing, the browser will redirect to the login page (or attempt to get new Windows credentials).
Log files show no error what so ever, and try/catch around the code in the event handler does not catch a problem.

Cause:
A stack overflow on the server completely kills the process. There is no error handling. No entry in the log file. IIS steps in and starts up a new w3wp.exe process.
The browser detects that your session is lost and redirects to the login page to ask for credentials.

#    Comments [0] |
# Wednesday, March 10, 2010

Reading Excel files in a WCF service using OleDB requires 32bit process

I’ve been doing a little work on a WCF service that reads an Excel file. My development machine is running Windows 7 64bit and my service was deployed to IIS. I kept running into a problem with opening the OleDb connection to the Excel file: “Error: Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.”

Turns out that Office Jet provider will only run in 32bit. After changing my ASP.NET processes to run in 32bit everything ran just fine.

This KB article shows how to change ASP.NET to 32bit: http://support.microsoft.com/kb/894435/en-us

#    Comments [2] |
# Thursday, July 30, 2009

ASP.NET 4.0 beta 1 playground

Just got an email from my favorite Internet provider (aren’t they the real cloud?) and they’re offering a ASP.NET 4.0 beta playground.

Quote:

“DiscountASP.NET, in partnership with Microsoft offers a FREE ASP.NET 4 hosting sandbox for MsDeploy RC1 and Visual Studio 2010 beta 1 users to experience 1-Click publishing.
The sandbox hosting program is a limited program offered as an open beta on a first come first serve basis. The account comes with 50 MB of disk space and 50 MB of SQL Server 2008 database space. The FREE ASP.NET hosting sandbox supports .NET Framework 4.0 beta 1, which is not a go-live version. This platform is only intended for testing and should not be used for production purposes.”

Go to www.discountasp.net for more info.

discountasp

#    Comments [0] |
# Saturday, September 27, 2008

Promoting DiscountASP.NET

I just answered an email asking for a referral to a good hosting place, thought I'd blog about my experience with my hosting provider.

I've been running my blog and website with DiscountASP.NET for the last 3 years and never had an incident. They offer ASP.NET 3.5 hosting and usually offer options to test beta versions of ASP.NET or SQL Server as well, which is something I like. They're not the cheapest, but in my opinion, worth the money.

Click the banner to go to their site.

In the spirit of transparency: The link contains a referral code which will generate a kickback for me :-)

#    Comments [0] |
# Friday, November 23, 2007

ASP.NET 2.0: OnClientClick

When building a webapplication, have you ever wanted to display an alert asking a user whether he really, really wanted to delete some data?

In ASP.NET 2.0 this is made easy by the OnClientClick property on the button control.

Just enter the following JavaScript in the property and the user will have to confirm the action. If the user cancels, then the button will not perform a postback and the serverside event never even fires.

if (!confirm('Are you sure you want to delete this customer?')) return;

[11/27/2007] Update:

The code above will work if the button you're adding the OnClientClick to has UseSubmitBehavior="false" if not, then you should use:

if (!confirm('Are you sure you want to delete this customer?')) return false;

 

 



Being techno-savvy is good. For once, keeping up with innovations like wireless camera and making use of facilities like wireless routers is good and does pay off. However, that should not result in missing out on important practical issues like having a proper computer backup solution. While looking for a web hosting service, the feature that matters the most is the facility of online backup. People usually concentrate on other things like ip phones etc. However, unless the domain name registration is done with, this ignorance can be made up for.

#    Comments [2] |
# Wednesday, October 31, 2007

Using AJAX to make webpages more accessible, not just 'prettier'

The majority of the time when we look at AJAX we look at making websites more responsive, prettier, faster. Rarely do we (or at least I) think about accessibility features for people that are visually impaired, or deaf or otherwise less able to read my, usually, small print on a website.

Chris Blouch has released a JavaScript library which focusses on making the web 2.0 generation of website more accessible. He has posted a slidedeck from his session at the Ajax Experience Boston (October 26, 2007) online, and the library, including documentation, can be found here.

I particularly found his statistics slide an eye-opener...

Among adult computer users in the US:
  • 1 in 4 has a vision difficulty
  • 1 in 4 has a dexterity difficulty
  • 1 in 5 has a hearing difficulty
  • Projected to be 70M users by 2010
#    Comments [0] |
# Thursday, September 20, 2007

TRUVEO - Complete ASP.NET sample

I've completed a comprehensive sample application integrating Windows Communication Foundation, ASP.NET and TRUVEO search into a custom search engine. Check it out here.

#    Comments [0] |
# Friday, July 27, 2007

JSON

Having been in immersed in C# and .NET Framework stuff lately I've been missing out on some of the developments that have been going on in the webbrowser. I remember programming an application for a customer in 2002 which was allowed to target Internet Explorer 4.0 and use JavaScript in combination with something called XmlDataIslands and XmlHttpRequests. Last year this technology has been given new life and is now commonly refered to as Ajax.

Tied in with the evolution of JavaScript is JSON: JavaScript Object Notation.

I like to think of JSON as object serialization for JavaScript objects, much like XmlSerialization is one of the corner pieces of .NET.

Scott Mitchell and Atif Aziz do a good job of explaining JSON in a little more detail :-).

 

#    Comments [0] |
# Wednesday, May 09, 2007

AutoEventWireup

I recently got asked what the AutoEventWireup flag does that can be placed in the @Page directive of an ASP.NET page.

A quick Google pointed me to the blog of K. Scott Allen, who does an excellent job of describing it.

Go to: http://odetocode.com/Blogs/scott/archive/2006/02/16/2914.aspx.

#    Comments [1] |
# Wednesday, January 31, 2007

Site update using RssToolkit

I finally updated my website some. I now use the RssToolkit from Dmitry Robsman to display my latest blog posts on the front page of my business website (www.develop-one.com).

The RssToolkit allows you to define an RssDataSource using drag-and-drop, just enter the url of the feed and create a gridview which binds against the RssDataSource. It's great!

The code has been updated since last year, but it runs like a charm!

Go to: http://blogs.msdn.com/dmitryr/archive/2006/03/26/561200.aspx

Update:
The project has been moved from Dmitry's blog to CodePlex. Go to: http://www.codeplex.com/ASPNETRSSToolkit.

#    Comments [0] |

ASP.NET AJAX at DiscountASP.NET

My hosting provider send me an email today informing me that ASP.NET AJAX 1.0 is now available to all DiscountASP.NET customers. I guess I'll have to put some AJAX in my site, just because I can :-)

The message did contain an interesting warning though:

Microsoft officially released ASP.NET AJAX 1.0 and we have installed AJAX 1.0 in the webserver GAC.
(
More Info | KB Q10460)

Note: Microsoft has yanked out some features from the AJAX RTM and used the same version number for both v1.0 and the RTM. If you built apps with the RTM, they may not be backward compatible.

#    Comments [0] |
# Wednesday, January 24, 2007

ASP.NET AJAX v1.0 is available for download

ASP.NET AJAX v1.0 is available for download!

Go to: http://ajax.asp.net/default.aspx?tabid=47

About ASP.NET AJAX:

"ASP.NET AJAX is a free framework for quickly creating a new generation of more efficient, more interactive and highly-personalized Web experiences that work across all the most popular browsers.

With ASP.NET AJAX, you can:

  • Create next-generation interfaces with reusable AJAX components.
  • Enhance existing Web pages using powerful AJAX controls with support for all modern browsers.
  • Continue using Visual Studio 2005 to take your ASP.NET 2.0 sites to the next level.
  • Access remote services and data directly from the browser without writing a ton of complicated script.
  • Enjoy the benefits of a free framework with 24x7 technical support provided by Microsoft."
#    Comments [0] |
# Thursday, January 19, 2006

Embedded resources in ASP.NET

Just came across a deadlink on www.theserverside.net refering to a post by Kevin Jones about Embedded Resources in ASP.NET. Couldn't find the item on Kevin's blog, but a Google search brought me to http://haacked.com/archive/2005/04/29/2879.aspx which explains it pretty well.

Embedding Javascript in your assembly resource seems a great way to avoid deployment issues.

#    Comments [0] |
# Saturday, January 14, 2006

What's coming in 2006

Just a couple of links to stuff that's in beta right now:

WinFX, XAML and SDK
ASP.NET ATLAS
C# and LINQ
VB.NET and LINQ

#    Comments [0] |
# Monday, January 09, 2006

A favourites icon for my website

I always wondered how some sites managed to get their little logo in my list of Favourites. Turns out it is really quite easy, just add a favicon.ico file to the root of your website. Internet Explorer will pick it up automagically.

If you happen to have a different browser you can try:

<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">

Found it on Matthias Benkmann's website: http://www.winterdrache.de/freeware/png2ico/favicon.html

#    Comments [0] |