Jason N. Gaylord
Social Distancing since 3/14
Visit JasonGaylord.com

Hello, I'm  jasongaylord Jason

I live with my family in the rolling hills of Northeastern Pennsylvania. I'm a web developer by trade, but have broad experience in various business areas. Want to know more about me?

Learn More

AJAX Tip: Don't forget about the Async Web Service Calls!

FireFox. Internet Explorer 8. Both have great JavaScript debugging tools. Thanks to those tools, I only spent 5 minutes on an issue that could have taken hours to figure out. It was one of those moments when you know its something simple but you can’t figure out what it is. I had a page that loaded web service data into an AjaxDataControl Repeater. After the web service call, I entered some JavaScript to grab a page parameter and choose the item on the page that was selected. When I ran the page, I received an error that the object was undefined. However, if I added an alert to check the parameter, the page loaded fine. After using one of the debug tools I saw that the data wasn’t populated yet. That’s because ASP.NET AJAX makes web service and WCF calls asynchronously. To resolve this issue, I moved the code from the page load method to the method assigned to the successful data binding.

Read More

LINQ to SQL and MS Small Business Server 2008 Talks at .NET Valley

The next .NET Valley User Group event will be on June 18th at Scranton University in Scranton, Pennsylvania. There will be two talks that evening. The first will begin at 6pm and will be presented by Michael Murphy. Michael will talk about the ins and outs of Microsoft Small Business Server 2008. The second talk will begin at 7:15pm or so and will be presented by yours truly. I will be talking about LINQ to SQL. To register for the event, please visit [http://dotnetvalley.com/events/eventdetails.aspx?eventid=59]http://dotnetvalley.com/events/eventdetails.aspx?eventid=59 “http://dotnetvalley.com/events/eventdetails.aspx?eventid=59”).

Read More

Performance Tip: Return Only Necessary Columns Using LINQ

I was running into an issue where one of my webmethods was taking a large amount of time to return a small set (5-10 objects). I was using LINQ to SQL. I noticed that the LINQ to SQL query was returning all of the rows. After looking into the table a bit further, I noticed that the table included some columns with a larger type (old text column, image column, etc). So, I decided to modify my select to contain just the columns I needed. It improved my response time from roughly 8 seconds to 250 milliseconds. Here’s a sample select statement:

Read More

A circular reference was detected while serializing an object of type 'FOO'

I ran into an issue earlier when trying to return an entity class through a web service for use in an AJAX page. After some quick research, I came across a post by Darren Neimke that referenced Rick Strahl’s post about LINQ to SQL and Serialization. For me, performing the first work-around and setting the relationship to ‘Friend’ worked.

Read More

Worldwide Developer Conference News

If you’re looking to pick up the latest happenings from the Worldwide Developer Conference, check out this: http://www.macrumorslive.com/.

Read More

DirecTV: The Saga Continues...

I received an email from DirecTV about my blog post on 6/2 (Note: this post is missing from my archives). They gave a 1-800 number and a 4-digit code so I can reach their team directly. I tried using that number and sat in a queue for nearly 20 minutes. Finally, someone answered and had no clue what my situation was. She placed me on hold for 5 minutes to review my account. Once she came back, she told me that I should have never ordered service with only 1 line. After my head spun completely around, I proceeded to ask her how DirecTV was going to fix this issue. She told me that “their” solution would be for me to purchase a Single Wire Multi-Switch (SWM) out of pocket. However, my one receiver wouldn’t work with it so I’d also have to upgrade that receiver to a DVR or HD receiver. In all, I’d be out $400. But, since I was a loyal customer, they’d provide me a $10 credit each month for 6 months. So, I’d still be out $340. I asked her repeatedly if this was what they told other customers and she said they usually don’t provide any credit. At this point I was extremely irate. 20 minutes later she offered a $10 credit each month for 12 months. I asked her to review with her supervisor and come back with her best offer before I switch service and after being on hold for 2 minutes, I was disconnected.

Read More

Need \"Out of the Box\" AJAX Functionality for Your Data Controls?

I’ve been using the Ajax Data Controls (ADC) for 9 months. I recently joined their development team to convert the controls to VS 2008/.NET 3.5. It’s a really cool control set that uses AJAX for the complete data transaction. The documentation is pretty deep and there are a few good examples. You should check it out by visiting http://dotnetslackers.com/projects/AjaxDataControls/. You can download the source and binary on CodePlex by visiting http://www.codeplex.com/AjaxDataControls.

Read More

Establishing a VPN on Windows Mobile 5

Many have found it difficult to establish a VPN connection on Windows Mobile 5. There are quite a few blog posts out there with instructions, but none are really that complete. Before you can establish a connection from your mobile device, you need to establish a VPN server. For my purposes, I’ve setup Routing and Remoting Access on a Windows Server 2003 box (Windows Server 2008 procedure). This is pretty simple to do and there weren’t any settings I needed to modify. Then, on the user account in my domain, I had to right-click and go to properties. There is a section under the Account tab called Account Properties.

Read More

Retrieving SQL Type Image Using LINQ

LINQ views the Image type in SQL Server as Binary. So, there are a few options that we have. We can either (a) modify our LINQ to SQL class and change the property to Byte() instead of Binary or we can (b) convert the Binary to an array. To do the latter, you can use a lambda expression to obtain the image you are looking for and grabbing just the image. Here’s an example:

Read More

ASP.NET MVC Preview 3 Announced

Scott Guthrie just posted about the 3rd preview of the ASP.NET MVC over on his blog. You can catch the full details here: http://weblogs.asp.net/scottgu/archive/2008/05/27/asp-net-mvc-preview-3-release.aspx.

Read More