Aaron Boswell's Blog
My Links
Blog Stats
  • Posts - 4
  • Stories - 0
  • Comments - 0
  • Trackbacks - 2
Archives
Post Categories

Friday, March 04, 2005

We have just completed our first phase of work on Adventures and Travel in Mexico a travel website for those wanting a unique experience in Mexico. 

This portal was created using DotNetNuke and open source portal product. This product is a descendant of IBuySpy which was released very early (if not beta) days of the Microsoft .Net Framework.

The majority of the site content was constructed with a standard HTML/text module that allows administrators to edit content in a WYSIWYG editor.

We constructed several custom modules as well that provided features like:

  • Custom Menus (Top & Left Navigation, Footer Menus)
  • Image Links (users can click a picture to navigate to an internal or external page or file)
  • Enhanced Article Listings
  • Hotel Listings
  • Hotel / Air / Auto Rental Searching
  • Friendly Url Providers (create search engine friendly Urls for navigating to pages)
  • Flash Modules (show a Flash movie)

We worked collectively with a graphics design partner Stewart Design, who came up with the overall look and feel of the site.  They were able to produce quality HTML mock ups that were converted to Skins (page templates).  In addition, they assisted the client in learning how to select and size their website images to maintain a standard appearance.

In addition, our client was insightful to solicit the help of Red Indigo a search engine optimization firm.  Who provided priceless information on ways to restructure the site and portal to get the maximum ranking possible.

Altogether this was a wonderful experience with a great client.  They have been able to run with creating content, uploading images and putting together a beautiful site.

 

posted @ 2:33 PM | Feedback (0)

Friday, February 04, 2005

After having seen this same problem at more than one client, I thought it important to share this valuable piece of information with others.  When discovering it I was amazed that with all the .NET Web Services articles floating around, there is not any more mention of this important piece of information.

Let me start by describing the problem.  You are using web services to interact with an external system (either your own or an external source).  Everything works great in functional testing, but in load testing or (better yet) a production environment, under heavy load, requests to take an unusually long time or seem as though they are single threaded.

Contacting the 'owner' of the service you are consuming (this may be looking in the mirror), they will claim that they are fulfilling requests in compliance with service level agreements, but logging from your client application proves that this cannot be true.

The answer and cause lie in an http 1.1 specification intended to keep a user from saturating a web server.  To prevent this, part of RFC2616 states that clients should limit their connections to servers.

...
Clients that use persistent connections SHOULD limit the number of
   simultaneous connections that they maintain to a given server. A
   single-user client SHOULD NOT maintain more than 2 connections with
   any server or proxy. A proxy SHOULD use up to 2*N connections to
   another server or proxy, where N is the number of simultaneously
   active users. These guidelines are intended to improve HTTP response
   times and avoid congestion.
...

Unfortunately this becomes a problem when your intention is to make multiple requests. In the cases where I saw this problem, we had a wonderfully multi-threaded queue listener that concurrently processed long running requests and purposely throttled the number of concurrent connections to the host to comply with our agreement.  We complied and then some.

To 'fix' this problem, you must change the default setting for the maximum number of connections to the Internet host.  This can be done in the machine.config, web.config or application configuration files as shown:

<configuration>
   <system.net>
      <connectionManagement>
         <add name = "www.parivedasolutions.com" maxconnection = "4" />
         <add name = "*" maxconnection = "2" />
      </connectionManagement>
   </system.net>
</configuration>

See MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfconnectionmanagementelement.asp for more information

It can also be changed programmatically:

Uri con = new Uri ("http://www.parivedasolutions.com/");

// Use the FindServicePoint method to find an existing 
// ServicePoint object or to create a new one.  
ServicePoint servicePoint = ServicePointManager.FindServicePoint (con);
servicePoint.ConnectionLimit = 10;


See MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemnetservicepointmanagerclassfindservicepointtopic.asp for more information

 

Keep this in mind any time you are consuming web services.  It will save you countless hours of investigation.

I hope this helps others.  Spread the word.

 

posted @ 4:07 PM | Feedback (0)

Wednesday, August 25, 2004

When first working with regions (#region and #endregion) in C# and VisualStudio.Net, they seem to be one of the best IDE enhancements of VS.Net.  Code that once looked overwhelming now now looks much more readable.  Multiple monsterous methods are now automatically collapsed into an expandable box with a simple name like “Page Life Cycle Methods”.

After maintaining projects with runaway regions including nested regions, I have found that they can be unnecessary and even abused.  An understanding of the design and capability of a class is usually gained by reading the methods and properties it exposes.  Regions can hide this information behind meaningless tags.

A few shortcut keys Ctrl-M-L will expand all code, and Ctrl-M-O will collapse to definitions or just method signatures.  This is produces nearly the same result as a region, however it does not hide the underlying method or property names as the region tag does.  If regions ARE used, the Ctrl-M-O collapses to the region tag and once again hides all internal information.

I realize that regions have their place.  However, I would recommend relying on Ctrl-M-O to make things more readable at a high level. 

Let me know if anyone has opinions or tips that support or oppose.

 

posted @ 12:57 PM | Feedback (2)

Saturday, August 14, 2004

For anyone who hasn't already given it a try, I highly suggest checking out Resharper 1.0 by Jet Brains.  Anyone in the Java community will tell that their IntelliJ IDE has some great productivity boosts.  They have created a Visual Studio.Net add-in for C# that provides refactoring capabilities that make redesigning your solutions as simple as modeling with clay.  Many of these features will be included in VS.NET 2005, but if you need it now, they have it.  There is a free trial and $99 to buy.

I was able to completely restructure a 6 project solution, changing namespaces, moving classes, simplifying code in a single day.  It also has improved intellisense.  Methods and properties are removed from the list as you type characters.  With overloaded methods, instead of showing just one choice at a time, all possible overloaded functions are shown.  As parameters are entered, the list narrowed.

Two things that I noticed are that it does not do is look in .ascx and .aspx files for Assembly=”xxx.yyy.zzz” declarations for external user controls.  This required the global search and replace to correct.  Also, solutions with mixed languages VB.Net and C# will get mangled.  Just put your C# projects in your solution and reference compiled VB.Net dlls to avoid this.

In my opinion it is well worth the investment.  Check it out for yourself.

posted @ 10:43 AM | Feedback (0)
Aaron Boswell