Wednesday, April 02, 2008

Bill Burrows has created a series of videos on MVC and is now working on a new series based on Scott Guthrie's MVC tutorial posts (which are all in C#) but using VB instead. I was surprised to find a pointer to my recent MVC post as a "rare example" of MVC with VB (and it's only one little post so I found that to be sad) so I'm happy Bill is doing these. It gives a leg up to VB developers who find it hard to try to learn something that is VERY new and convert the C# syntax in their brain at the same time.

Here's the list of topics covered

  An Overview of the MVC Pattern
  Setting up the MVC Preview Environment
  URL Routing
  Setting up New Pages
  MVC Controller Actions 
  Creating HTML in Views 
  MVC - Putting it all together

Thanks to Beth for the heads up.

ASP.NET | VB
Wednesday, April 02, 2008 8:19:32 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, February 17, 2008

Remember how I recommended subscribing to the WebDevTools blog only a few weeks ago? (grin) Well, it continues to pay off!

Vishal Joshi has written a blog post about the tools for building MVC that will be previewed at MIX. Usually these goodies are shown first at MIX and then in blog posts.

Tooling Features Overview of ASP.NET MVC Framework for MIX 2008 shows some of the improvements made to the tools for creating MVC apps and more handily creating unit tests for them.

 

Sunday, February 17, 2008 1:18:28 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, February 09, 2008

I am, like to-oh-tally suscribed to the WebDevTools blog, dude! Here's why

[A New DevLife Post]

Saturday, February 09, 2008 11:57:35 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I seem to frequently point people to the technical story of MySpace as they went through the painful evolution that eventually led them to have a serious ASP.NET website to manage what is one of the highest traffic websites in the world. Even if it's not ASP.NET that you  choose, it's a good lesson in planning ahead. Read more...

[A New DevLife Post]

Saturday, February 09, 2008 11:55:43 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, February 07, 2008

One of the drawbacks with the partial postbacks in AJAX is that you can't go forward or back in your web browser to different states of the page created by the partial postbacks. Nor can you create a shortcut to one of the views.

The ASP.NET 3.5 Extensions has functionality in there to enable these scenarios. It's pretty simple to pull off thanks to the new tools.

Jonathan Carter has a great post on how to use this. It's just #1 of more to come so keep tuned. Jonathan is a new to Microsoft's Visual Studio Developer Platform and Evangelism team with the dream job of writing and speaking about all the cool things you can do in VS. You can tell by his post that he will be a great resource for us to learn new features.

Thursday, February 07, 2008 3:00:40 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, February 02, 2008

At VTdotNET's last meeting, we were happy to have Jeff McWherter share with us his hard-earned lessons about improving performance in asp.net apps. Jeff spends a lot of time dealing with this in his job and it was very obvious that he wasn't just sharing something he read about, but his very adept experience.

He started out by posing what may seem a redundant question, but is a really good way of getting people to focus on the issues. He asked for someone to explain the difference between web site performance and web site scalability.

These were the two topics he focused on as he delved into a number of performance bottlenecks as well as issues which prevent websites from being able to scale out. Jeff used a variety of performance measurement tools in the process which was very educational. Sure beats waiting for the server to come to it's knees as an indication that some changes might need to be made! Then of course he showed us lots of ways, some very simple, some more complex, to solve the problems displayed by the tools.

Often people focus on their specific asp.net code and don't consider out of scope processes that may be causing the problems such as a database query or a file download. I was happy that he made sure people were aware of SQLProfiler!

One of the tips that really hit home for me, because I was dealing with this problem, was if you have file download/upload functions in your application, split those off to another process, whether you can do that on another server or just in another app on your web server (e.g a web service). It's not just the time involved (which can be helped also by doing this asynchronously) but the resources involved. If multiple people are uploading or downloading at the same time, this could really pose a problem.

In these days where many of us are scrambling to learn the new technologies that are coming down the pipe, it is a huge benefit to have someone show us how to get more out of the tools that we are working with today with lessons that will apply to the tools of the future.

The day after the meeting, Jeff and his wife (who had spent a fun few days with us at our house) headed off to Smuggler's Notch to do some ice climbing and then were going to be on vacation for a while after that visiting friends around the Northeast.

I think he's back in Michigan now, so I'll be sure to get his list of resources from him and up on the VTdotNET site.

Saturday, February 02, 2008 9:25:02 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 
 Tuesday, January 22, 2008

I accidentally opened up a web application project as a website. That's not too hard to do. Just say you want to open a web site and point to the folder. It had been a while and I forgot that it was a WAP.

So I'm working on a web page and double click on a control and find myself in the markup with a new script tag and the .net code for the click event of the control. That wasn't good considering I already had some nice event handlers for that control in my code behind.

I spent a lot of time going back and forth trying to figure out why I couldn't get to my code behind.

I even remembered having this problem in the early days of Web App Project and the solution was to "convert to a Web Application Project" from the context menu in the solution explorer. But this option wasn't available.

I created a new web site and looked at the page directive and noticed that in the new website the parameter pointing to the code behind file was called CodeFile, but in my old site it was CodeBehind. Wierd.

So with that clue I googled those two words, came across Steve Smith's blog post about the opposite problem and realized my mistake!

Duh. :-)

Tuesday, January 22, 2008 8:36:14 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Monday, November 05, 2007

I finally discovered the UpdateProgress control for an easy way of getting an animated gif to display at the proper times on a page using ASP.NET AJAX. REad more...

[A New DevLife Post]

Monday, November 05, 2007 9:55:47 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, October 25, 2007

Scott Gutrhie introduces his next fun project, an MVC (Model-View-Controller) Framework for ASP.NEt. Read more...

[A New DevLife Post]

Thursday, October 25, 2007 7:01:09 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Thursday, June 28, 2007

I've been using Mike Volodarsky's patch for a while for sites that I am developing in IIS7 (no problems with file based development server) to get past debugger auto-attach problems. Now an official hotfix has been released.

Read more here

[A New DevLife Post]

Thursday, June 28, 2007 9:26:07 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, June 12, 2007

Recently, the VTdotNET website has been getting hit by some robot entering hyperlinks into the password text box of the login form.

ASP.NET catches this on the server side and pushes out this error:

System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (ctl00$ContentPlaceHolder1$LoginView1$Login1$Password="<A href=http://...").

Since I have errors emailed to me, I'm getting a LOT of these emails every day which was annoying.

So, I wanted to trap this on the client side using a validator.

While they may appear to be, login controls are not totally locked up. One of the smart tag options is to "Convert to Template". Once you do this, you can edit the control all you want.

So I added a RegularExpressionValidator control and entered the following regex for the ValidationExpression:

^((?!href|http).)+$

which won't allow strings that href or http. Then tied it to the password control and to the ValidationGroup for the whole login control. That way I get the validation during data entry AND when the user hits the login button.

I did the same for the User Name control.

This solved part of the problem. If you went to the actual login page, it was no longer possible to enter hyperlinks and postback. But the spam kept coming. I changed the name of the controls and put some more details in the error handler and saw that the name of the control reported in the error didn't change and that it wasn't even coming from the login page. But it was the ONLY login control in the entire website.

Then I got a little education from some who are less naive than I about the evil ways of spammers. Ryan Trudelle-Shwarz, Adam Sills and Dave Wanta filled out the picture for me. It's a nasty type of comment spam where a robot collects the postback info from your site and no longer needs to return there to do the actual entry and postback. There is still some mystery here for me since there never was a login control on the home page, but as Ryan suggested, the simplest thing to do is just filter out those errors so that I don't have to get them in my email box and forget about them.

ASP.NET Forum user keanxsoul has done some detective work along these lines and offers an interesting explanation about how the spammers are actually doing this.

 

Tuesday, June 12, 2007 9:01:52 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, June 01, 2007

Dan Wahlin and Matt Gibbs have a book just coming out about ASP.NET AJAX (Prof. Asp.NET 2.0 AJAX) from WROX. So Dan has now spent a LOT of time with AJAX and is very knowledgable. Then Silverlight comes out and boom - he's got a Silverlight ASP.NET AJAX app that is VERY cool. I'm supposed to be writing an article on Entity Framework right now, but boy do I want to continue playing with Silverlight.

 

Friday, June 01, 2007 7:42:29 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, May 07, 2007

The Silverlight Beta 1.0 (golive) has a problem wtih Firefox and apparently it's a FF bug that creates the problem. It completely prevents the embedded Silverlight app from being displayed on a web page.

Eric Sowell has a post explaining the problem and points to this MSDN forum thread which suggests a workaround which is a temporary hack.

Monday, May 07, 2007 12:10:52 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, April 23, 2007

I watched a short interview with Scott Guthrie and learned some interesting things about ASP.NET (such as it is the technology behind MySpace's 4 BILLION page views a day)... read more...

[A New DevLife Post]

Monday, April 23, 2007 11:20:00 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, March 20, 2007

There are two bumps in the road of debugging ASP.NET in Vista. The first is enabling Windows Authentication, which depends on properly installing IIS on your computer. The second is an issue with the debugger not being able to automatically attach to the process that is running your website. This is gotten around either by manually attaching each time (a huge pain in the rear that I got sick of in less than 30 minutes) or applying a quick patch that Mike Volodarsky, on Microsoft's IIS team whipped up.

Mike's blog post shows how to get past these bumps and more.

Tuesday, March 20, 2007 8:55:57 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, February 17, 2007

Joe Stagner re-recorded all of the How Do I? videos for AJAX that he had created during the Betas. Now they are all updated for the RTM version of AJAX.  THese are really valuable for getting started (and more) with AJAX. There are 23 videos. THat must have been some chore. Thanks for re-doing them, Joe.

Saturday, February 17, 2007 5:24:49 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

At this point I shouldn't be surprised by the valuable nuggets that are in the ASP.NET QuickStarts. Here's the latest one I wish I'd had taped to my wall for the past few years.

[A DevLife post]

Saturday, February 17, 2007 3:17:54 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, January 25, 2007

Scott Guthrie announced the release of AJAX and lists a bunch of helpful resources, especially for those migrating from earlier versions. read more

[A DevLife post]

Thursday, January 25, 2007 11:06:53 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, December 15, 2006

We're closing in on it!! :-)  Read more

[A DevLife post]

Friday, December 15, 2006 8:11:07 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, December 09, 2006

I've been using, writing about and talking about ASP.NET 2.0's OnClientClick mostly in relation to some of the Ink on the Web work I have been doing. OnClientClick (who's functionality you could achieve in the past with control attributes) allows you to associate client side script AND server side code to the click event of a button.

One thing I hadn't run into and therefore wasn't aware of was the OnClientClick conflicts with another one of ASP.NET 2.0's new features, Cross Page Postbacks. Teemu Keiski explains why the two won't work together in this blog post.



Don't Forget: www.acehaid.org
Saturday, December 09, 2006 2:00:00 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  |