Tagged: Google RSS

  • Steve Lydford 4:15 pm on February 7, 2011 Permalink | Reply
    Tags: ELMAH, errors, Google   

    Error Logging and Google Chrome 9.0 

    Today I created an ASP.NET MVC 3 default Web Application with the intention of testing a couple of ideas I had, without making a mess of any actual ‘live’ projects.

    Once the application had been created the next thing I did was to use (the brilliant) NuGet to install the (also brilliant) ELMAH error logging facility. I then ran the application and had a browse around by typing URLs into the Google Chrome Omnibox (Address Bar to you and me). I was somewhat surprised when I browsed to elmah.axd to see a whole bunch of errors, particularly as I hadn’t even had a chance to break anything yet!

     

    elmah

     

    I then recalled the checkbox I had ticked in the Options dialog in Chrome 9 to ‘Enable Instant for faster searching and browsing’.

     

    chrome_options

     

    It seems that, if I am not fast enough when typing URLs into the address bar, Chrome requests pages from my application that don’t exist and these are being logged by ELMAH. In fact, you can catch a brief glimpse of a 404 as you type, if you get the timing right. A quick test by disabling ‘Instant’ proves this theory.

    This will (should!) not be a problem for deployed sites, but is annoying for locally hosted applications as it makes it hard to ‘see the wood for trees’. If you are desperate to keep ‘Instant’ enabled you can, if you like, filter out the ‘not found’ errors programmatically during development with the following code:

     

    
    void ErrorLog_Filtering(object sender, ExceptionFilterEventArgs e)
    {
        if (Request.IsLocal)
        {
            if ((e.Exception.GetType() == typeof(HttpException)) && (((HttpException)e.Exception.GetBaseException()).GetHttpCode() == 404))
                e.Dismiss();
        }
    }
    

    You must bear in mind though that it you use this code it will filter out ALL 404 errors on the local machine during testing, so you should use another strategy to compensate for this.

    Digg This
    Reddit This
    Stumble Now!
    Buzz This
    Vote on DZone
    Share on Facebook
    Bookmark this on Delicious
    Kick It on DotNetKicks.com
    Shout it
    Share on LinkedIn
    Bookmark this on Technorati
    Post on Twitter
    Google Buzz (aka. Google Reader)
     
    • Betty 10:18 am on February 9, 2011 Permalink

      Surely they’re just HEAD requests and not full GET requests, couldn’t you filter it that way?

    • Steve Lydford 10:45 am on February 10, 2011 Permalink

      @ Betty. I was getting back 404 error pages as I typed, so surely full GET requests. As if, using the top line from the ELMAH screenshot abouve, I had actually browsed to http://localhost/e

  • Steve Lydford 1:29 pm on July 13, 2010 Permalink | Reply
    Tags: Android, Google   

    App Inventor for Android 

    Today Google Labs have started extending invitations to the public for use of their App Inventor for Android software.

    App Inventor for Android allows anyone to easily create mobile applications for Android phones and devices. It is a “no code” drag-and-drop style interface which is used to visually design the way an app looks and use building blocks to define behaviours.

    Blocks have been created for just about everything that can be done on an Android powered device. App Inventor can be used to perform user interactions, store data, send texts, get GPS data, access Google Maps and communicate with web sites such as Amazon and Twitter.

    It looks pretty cool, although as a programmer I have reservations about the whole “no code” business. I’ll give it a go though and report back with my findings. I’d also be interested to know if you have any good or bad experiences with it.

    The Android Marketplace is really beginning to gain ground on the Apple App Store, so this looks like it could be a great way to get in on the action for a small effort.

    Digg This
    Reddit This
    Stumble Now!
    Buzz This
    Vote on DZone
    Share on Facebook
    Bookmark this on Delicious
    Kick It on DotNetKicks.com
    Shout it
    Share on LinkedIn
    Bookmark this on Technorati
    Post on Twitter
    Google Buzz (aka. Google Reader)
     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
esc
cancel