Skip to ContentSkip to Main Site NavigationSkip to Section NavigationSkip to Quick LinksSkip to Site Utility Navigation
Jun20

When an error isn’t.

johnw
in Web Development

For the past two weeks I’ve been working on a project that makes use of Microsoft’s new AJAX controls for .Net.  These controls add a bit of snazziness to a website and help to increase usability and appearance.  With the completion of the User Interface data load, I turned my attention to fleshing out the action buttons on the screen.  That’s when progress came to a screeching halt.  When clicking on a button (any button), a nasty .Net error message would appear.  This message was appearing before any of the pages code could execute on the postback.  After researching the error message on the web, I came to the conclusion that this was a known issue others had run into and that some people had some work arounds.  However the example code for the work arounds was in Visual C# and not in the visual basic that this project was using.   After several hours of migrating the code, I got a sample page that worked in the same manner   the projects page.  When I applied the new techniques to project page, the error still occurred.  This aroused my suspicions, so I did what doctor’s do for surgery:  when in doubt: rip it out, thinking that maybe some portion of my code was blowing up the page. I begain by removing all of my custom event processing code:  error still occurred.  I then removed all non useful HTML:  error still occurred.  Next went all of the .Net textbox, literals, combo boxes etc:  error still occured.  When I finally got down to exact match to my working example:  the error still occured.  Ah ha I thought, something has realy snafued on the page.  So I deleted everything from the page, copied the example code over, and tested:  button click works, no error.  I started adding portions of my code back ( I had saved my original code before deleting code snippets), with each successive addition working fine.  When I had all my original code back, the page worked fine, no error.  So after a day of researching and coding my page, it was back to where I started.

 The only explanation for original error kept seeing is this:  The page I was working on at some point had been saved as a Unix type file without the standard PC Carriage return/linefeed combo.  I believe this confused the IIS when it parsed the file resulting in the original error message.  When I copied the code, I saved it with notepad, thereby putting in the CR/LF’s.  When the code was copied back, IIS could parse it correctly resulting in no error.

 So after a day of research, recoding, testing.  I’m back to were I started know to try saving the file in notepad before I start fixing an error.

Bookmark this article!

TechnoratiStumbleUponDel.icio.usDigg


Leave a Reply



Beacon Technologies, Inc.
164B Thatcher Rd.
Greensboro, NC  27409
toll-free: 877.602.3617
local: 336.931.1295

Information

Beacon Technologies specializes in ecommerce website development, Website design, content management systems (Cascade Server), custom software development, hosting, Search Engine Optimization and Google Analytics. Beacon has provided innovative Internet and website marketing solutions to hundreds of successful clients. Our customer-focused attitude and exceptional drive for excellence sets us apart from other Greensboro and Charlotte Web Site Design and Development, Custom Software Development, Ecommerce Website Development, and Search Engine Optimization Firms. We set the bar high for creative design and development practices and always take pride in our work. Contact Beacon today to talk with an expert about how we can provide a solution for you.

Entries (RSS) and Comments (RSS).

Beacon Technologies, Inc. Web Blog