Saturday, December 26, 2009

How to make ASP.NET 3rd party controls run faster

How to make ASP.NET 3rd party controls run faster: "1. Abstract
The following document will explore the basics of enhancing 3rd party ASP.NET components performance by leveraging the Empty Client (an ASP.NET extension) pipeline.
Subtitle: 


Overview for ASP.NET based components that explores the basics of enhancing 3rd party ASP.NET components performance by leveraging the Empty Client (an ASP.NET..."

20 Must Read LINQ, WCF, Expression Web, VSTS and Windows Forms articles on DotNetCurry – 2009

20 Must Read LINQ, WCF, Expression Web, VSTS and Windows Forms articles on DotNetCurry – 2009: "In this post, we have compiled 20 Must Read articles that were published in the year 2009 and focus around technologies like LINQ, VSTS, Expression Web, WCF and Windows Forms.


"

Sunday, December 20, 2009

20 Must Read ASP.NET, MVC, jQuery and Silverlight articles on DotNetCurry – 2009

20 Must Read ASP.NET, MVC, jQuery and Silverlight articles on DotNetCurry – 2009: "Web technologies have become enormously popular. The authors at DotNetCurry acknowledge this fact and continue working hard to deliver articles, how-to’s, tips and techniques around Microsoft Web and related technologies. This post contains 20 Must Read articles that were published in the year 2009 and focus around web technologies like ASP.NET, MVC, jQuery and Silverlight


"

Wednesday, December 16, 2009

Consuming WCF service out of box

Consuming WCF service out of box: "

Hello All,

I found one issue while consuming WCF service from out of box, There are lots of threads I found for 'The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.' error, CommunicationObjectFaultedException exception thrown and 'The caller was not authenticated by the service.'

I spent lots of time in search, got bunch of solutions, some worked some does not, after doing lots of troubleshooting I got solution for my problem.

My case was, a web application running on different box is trying to consume WCF service which is hosted on different box, but some how on production it was not working. It always throws 'CommunicationObjectFaultedException'. Usually we are putting such calls in using blog, as its taking care of disposing object. But in case of WCF it may not work as per expected, the reason is; A CommunicationObjectFaultedException has been throws so you, the object is not yet initialized and you are using is trying to dispose method which again throw exception.

 

This is because using implicitly call Dispose at the closing brace, which may throw an exception because your object is not yet initialized as its in the Faulted state. To over come this a simple solution, use try catch and call Abort. More reading on this click Avoiding Problems with the Using Statement, good article form Microsoft including Sample application. During my search I found one good code delegate make you fell like you are using clause, but internally its handling such exception.

private class Util
{
public static void UsingWcf<T>(T client, Action<T> action)
where T : System.ServiceModel.ICommunicationObject
{

try
{
action(client);
client.Close();
}
catch (Exception)
{
client.Abort();
throw;
}
}
}
class Program
{
static void Main(string[] args)
{

Util.UsingWcf(new WcfClient(), c =>
{

});

/*using (WcfClient wcfClient = new WcfClient())
{
....
}// This will throw an error
*/
}
}

So we have caught CommunicationObjectFaultedException, but still we are not able to make call to service method. Now you can see one new error 'The caller was not authenticated by the service'. Cool we reach the service but its missing some credentials, as we are consuming service out of box.

Typical configuration section looks like following



Form error 'The caller was not authenticated by the service' we can guess that we need some credentials to call method. You can see the configuration; it says clientCredentialsType="Windows" and security mode is Message, generally with wsHttpBinding these are the typical settings.



As we are using Windows as credential type, we need to provide credentials to use WCF serverice out of box. Once this done you just need to pass user and password in ClientCredentials just like bellow

"

Tuesday, December 15, 2009

WCF Comparison with Web Services and .Net Remoting

WCF Comparison with Web Services and .Net Remoting: "This article is about differences between WCF with Web Services and .Net Remoting"

Saturday, November 21, 2009

Prize winner in Competition “Best ASP.NET article of Sept 2009″

Prize winner in Competition “Best ASP.NET article of Sept 2009″: "

Sorry to post it little bit later, I was out of station for few weeks and great to see that I have own the first prize in the article competition for my article Exploring IIS 6.0 With ASP.NET . This is fourth times in this year I have received the prizes from codeproject. Thanks to all of you who read my articles and vote for it.


Thanks again to all of you. Hope to publish many more articles for you !


Posted in General
"

Friday, November 13, 2009

Announcing the Microsoft SDK for Facebook (Facebook .NET SDK 3.0)

Announcing the Microsoft SDK for Facebook (Facebook .NET SDK 3.0): "This latest release of the Facebook .NET SDK supports the newest Facebook services delivered through the Facebook Open Stream API. Create applications for Facebook using any of your favorite Microsoft development platforms: Silverlight, WPF, ASP.NET, ASP.NET MVC, and Windows Forms."

Thursday, October 29, 2009

ASP.NET MVC Cheat Sheets

ASP.NET MVC Cheat Sheets: "Microsoft MVP Elijah Manor shares lists of quick reference notes for working with ASP.NET MVC that he has collected across the web."

Tuesday, October 27, 2009

Transfer Schema Objects MSSQL 2005

Some time restoring database from ".bak" file might be problematic,

especially the "The backup copy provided by web hosts" "schema mapping" might create issues.
To transfer object from one schema to another following command can be used

ALTER SCHEMA schema_name TRANSFER object_name


but if we want to transfer all objects following cursor will do the job.

this might not be good approach but it worked for me.

declare @oldSchemaName varchar(100)
declare @newSchemaName varchar(100)
declare @name varchar(500)
declare @ExecQuery varchar(1000)
set @oldSchemaName='guest'
set @newSchemaName='dbo'

DECLARE cur CURSOR FOR SELECT @oldSchemaName + '.'+ name FROM sys.objects

where schema_id in(
select top 1 schema_id from sys.schemas where [name] like @oldSchemaName)

OPEN cur FETCH NEXT FROM cur into @name
WHILE @@FETCH_STATUS = 0
begin
set @ExecQuery='ALTER SCHEMA ' + @newSchemaName + 'TRANSFER ' + @name
print (@ExecQuery)
exec(@ExecQuery)

FETCH NEXT FROM cur into @name
end
CLOSE cur
DEALLOCATE cur

Tuesday, October 20, 2009

78 jQuery Scenarios to Fall in Love

78 jQuery Scenarios to Fall in Love: "I am in love with jQuery, are you? If you are not then you may not have seen the productivity in web design that can happen by using jQuery. I have collected some of the most interesting jQuery scenarios around the web that can make you fall in love...


"

Saturday, October 10, 2009

15 Common Mistakes in E-Commerce Design

15 Common Mistakes in E-Commerce Design: "







  



15 Common Mistakes in E-Commerce Design and How to Avoid Them (via @smashingmag) -


Selling online can open up huge new markets for many businesses. When your store can be open 24/7 and you can reach a global market without the costs of mailings and call centers, it can be a huge boon to your business. But there are plenty of things to consider when designing an ecommerce site. It’s not as simple as throwing up some shopping cart software and plopping products into a database.


There are tons of mistakes that online retailers make every day, all of them avoidable with a little careful planning. And even if you’re already committing some of these mistakes, most of them are easy enough to fix. Avoiding them will greatly improve the experience of your customers.


Below are 15 of the most common mistakes that e-commerce sites make, as well as advice on how to avoid or fix them. Take the advice under consideration before embarking on a new e-commerce project or when thinking over your current ecommerce site, and make efforts to follow the recommendations outlined here.


1. A lack of detailed product information


When you’re shopping in a brick-and-mortar store, you have the advantage of being able to pick up an item, feel it, look at it from every angle, and read any information on the packaging or labels. Shopping online removes that interaction. Ecommerce sites need to do the best they can to improve upon the in-store shopping experience.


How often have we gone to an online store and found their descriptions to be completely lacking? And if a customer is left wondering about the specifics of a product, they’re more likely to go look for the information elsewhere. And unless your site’s price is significantly lower than your competitors’, they’ll likely just buy from the other site.


What To Do About It


Provide as much product information as you can. Sizes, materials, weight, dimensions, and any other pertinent information depending on what the product is. For example, in an online clothing store, you might include the fabric type, sizes and colors available, a size chart (usually linked from multiple products), the weight or thickness of the item, the cut and fit of the item, care instructions, and comments about the brand or designer. Using descriptive words rather than simply technical terms can have a greater impact on the consumer.


Examples


ecommerce screenshot


ecommerce screenshot


ecommerce screenshot


2. Hiding Contact Information


Consumers want to know that they’re dealing with a real company when they hand over their credit card information. They want to know that if they have a problem they’ll be able to talk to a real person and get the help they need. If your site doesn’t provide any contact information, or hides it so the consumer can’t find it easily, they’re less likely to trust your site, and therefore less likely to do business with you.


What To Do About It


Put your contact information in an easy-to-find place on every page of your website. The most obvious places to put your contact information are either in your header, the top of your sidebar, or in your footer. Provide multiple means of contact if possible. A contact form, email address, phone number, and mailing address all add to the level of customer trust. Remember, too, that the more expensive or technical the product you’re selling, the more likely a consumer is going to want more contact information.


Examples


ecommerce screenshot


ecommerce screenshot


3. A Long or Confusing Checkout Process


This is one of the most damaging mistakes an ecommerce site can make. You have to make it as easy as possible for your customers to hand over their credit card information and complete their order. The more steps you put between them placing an item in their cart and actually paying for it, the more opportunities you give them to leave your site without completing their purchase.


The ideal checkout process includes a single page for consumers to check their order and enter their billing and shipping information, and a confirmation page before they submit their order. Anything more than that is only an obstacle to completing the checkout process.


What To Do About It


Follow the ideal model as closely as you can. If you have to include other pages, try to make them as quick and easy to fill out as possible. Combine pages if you can, and use two-column layouts for certain sections (like putting billing and shipping information next to each other) to make pages appear shorter.


Examples


ecommerce screenshot


4. Requiring an Account to Order


This ties in directly to the previous item. If you require a customer to sign up for an account before they can place an order, it’s another obstacle you’ve placed in their path. Which is more important to you: getting the order or capturing customer information? Remember that the second option may mean losing some customers.


What To Do About It


There’s an easy fix for this. Instead of requiring a customer to sign up for an account before they order, offer them the option at the end of their ordering process. Give them the option to save their account information to make placing future orders easier or to track the status of their current order. Many customers will opt to save their information, and you won’t be driving away customers before they’ve completed their order.


Examples


ecommerce screenshot


ecommerce screenshot


5. An Inadequate Site Search Engine


If a customer knows exactly what they’re looking for, many will opt to use a search engine instead of sifting through categories and filters. You need to make sure that the search feature on your site works well, and preferably has filters for letting customers refine their results.


How often have you searched for a product on a large ecommerce site and been returned with hundreds of applicable results? While the variety of options can be nice, if half of those results are nothing like what you’re looking for, it’s more an inconvenience than anything else. Including a way for customers to filter their search results by category or feature eliminates this problem.


What To Do About It


Make sure the ecommerce software you’re using has a good built-in search engine, or look for plugins to extend its functionality. Ideally, an ecommerce search engine should let users search by keyword and then refine results based on the categories your site includes. Let users sort their search results based on standard criteria (most popular, highest or lowest price, newest item, etc.) as well as eliminating items that don’t fit within a certain category.


Examples


ecommerce screenshot


ecommerce screenshot


6. Poor Customer Service Options


This is similar to the hiding contact information bit above. You need to make it easy for customers to get in touch with you if they have a problem or question. Make it clear what the best way to contact you is if they have a technical question, a sales question, or they want to return an item. Offering a help request form for customers to fill out can instill more confidence than just an email address.


What To Do About It


Use a ticketing system for customer service inquiries, especially if you don’t have a phone number available. Make sure that you post a FAQ that covers common questions customers might have, like what your return policy is or what to do if they need to order parts or replacement items.


Examples


ecommerce screenshot


ecommerce screenshot


7. Tiny Product Images


Since consumers can’t physically handle the products you’re selling before placing an order on your website, you need to do as much as you can to recreate and improve upon that experience. Tiny product images don’t effectively do this.


What To Do About It


Either provide large images right on the product page or allow users to click on an image to zoom in. You want users to be able to view the image as large as is practical on an average monitor. This means an image that enlarges to 1024×768 pixels is a good size to aim for.


Examples


ecommerce screenshot


ecommerce screenshot


ecommerce screenshot


8. Only One Product Image


Unless your product is delivered digitally (and even sometimes if it is), you’ll want to provide multiple images from different angles. An image in each color, of the front, back, and sides, and even detailed shots of specific features can all go a long way toward making a consumer more likely to buy from you.


What To Do About It


This one’s simple: include more images. Four or five images of each product are ideal, offering enough views to allow a consumer to feel comfortable that they know exactly what they’re getting.


Examples


ecommerce screenshot


ecommerce screenshot


ecommerce screenshot


9. A Poor Shopping Cart Design


Your shopping cart is an incredibly important part of your ecommerce website. It needs to allow users to add multiple products, to revise the quantities or other options about those products, and it needs to remain transparent at the same time. Not exactly the easiest thing to do, right?


What To Do About It


Make sure your cart lets a user add an item and then return to the last page they were on. Even better: allow them to add an item to their cart without ever leaving the page they’re on (by using a mini cart). Let your customers edit the quantities of items in their cart or remove an item from their cart. And let them preview what shipping charges will be before they start the checkout process.


Examples


ecommerce screenshot


ecommerce screenshot


ecommerce screenshot


10. Lack of Payment Options


There are plenty of sites out there that only allow users to pay with Visa or MasterCard, or to only pay with a PayPal account. There’s no reason for this anymore. What about the person who has an AmEx and doesn’t have or want a PayPal account? What about the person who doesn’t have a credit card and wants to pay straight from their bank account? You need to provide as many payment solutions as is practical to optimize the number of orders you get.


What To Do About It


Use a payment service that lets customers pay with each major credit card, and preferably also with an electronic check. Adding a PayPal checkout option increases the choices your customers have, making them more likely to purchase from you. Considering different consumers have different preferences when it comes to making online payments, catering to as many as you can means you’ve expanded your customer base.


Examples


ecommerce screenshot



11. Not Including Related Products


You’ve probably noticed when you go to a brick and mortar store that they group similar products together, or otherwise make it easy for you to find products that are related to you. They’ll put a battery display in the electronics section, or include cell phone cases near the cell phones. The same can be done on your website, and can increase add-on sales for you business.


What To Do About It


Use an ecommerce platform that lets you include related products on product description pages. A platform that will let you manually choose related products can also give you a big advantage, since you may see relations that a software program doesn’t (such as coordinating clothing pieces to create an outfit).


Examples


ecommerce screenshot


ecommerce screenshot


ecommerce screenshot


12. Confusing Navigation


There’s nothing worse than trying to find a product on a site with confusing navigation. Or even worse, an online store that doesn’t use categories or otherwise separate their merchandise to make it easier to find a specific type of product. The same goes for sites that have categories with no products in them or with only one or two items. Why even bother with a category?


What To Do About It


Think through your categories and navigation elements carefully before you start putting products in your catalog. Make sure that every category has at least a few products in it, or else group smaller categories together (or include them in larger, similar categories). Make it easy for customers to look through different categories, get to their shopping cart, and otherwise move around your site.


Examples


ecommerce screenshot


ecommerce screenshot


ecommerce screenshot


13. Not Including Shipping Rates


There’s no good reason not to include accurate shipping rates on your site. I’ve abandoned purchases on numerous occasions because it said something like “We’ll email you with an accurate shipping quote for approval before processing your order.” When shopping online, I want to be able to complete my order all at one time, without having to wait around for an email to decide whether the shipping charges are too high. Include your rates on your site, no matter what.


What To Do About It


Most major shipping companies and the USPS offer shipping calculators on their website, and there are plugins or widgets available for most major shopping cart systems to figure shipping charges on your site. Use one. If you can’t use one for some reason, then use a flat shipping rate that’s high enough to cover whatever it is you need to ship. For particularly heavy or large items, you can always include a freight surcharge in the price (just be sure to indicate that’s where the additional cost is going).


Examples


ecommerce screenshot


ecommerce screenshot


ecommerce screenshot


14. Not Including Store Policies


Before a customer buys from you, they’ll likely want to know what your shipping policies, return policies, and other store rules are. And there’s no reason not to post this information in a FAQ or somewhere else on your site. Making your store policies clear upfront can save a lot of headaches later on from customers who are unhappy with an order they’ve placed.


What To Do About It


Use an FAQ or store policies section on your site to spell out exactly what your rules are for different kinds of customer interaction. It’s something that can save you tons of problems down the road.


Examples


ecommerce screenshot


ecommerce screenshot


ecommerce screenshot


15. Not Putting Focus on the Products


The goal of an ecommerce site is to sell products (or, at least, that’s what the goal should be). If your site puts more focus on bells and whistles or the design itself, it’s not achieving that primary goal. Make sure your site displays your products first, and everything else second.


What To Do About It


Think about how products are displayed in brick and mortar stores. While an in-store or window display may show a lot more than just the products for sale, they all contribute to showcasing the products in their most flattering light. Do the same with your website. Make sure that every design element present is doing something to showcase your products in their best possible light.


Examples


ecommerce screenshot


ecommerce screenshot


ecommerce screenshot


Further Resources



About the author


Cameron Chapman is a professional Web and graphic designer with over 6 years of experience. She also writes for a number of blogs, including her own, Cameron Chapman On Writing . She’s also the author of Internet Famous: A Practical Guide to Becoming an Online Celebrity.





© Cameron Chapman for Smashing Magazine, 2009. |
Permalink |
52 comments |
Add to del.icio.us | Digg this | Stumble on StumbleUpon! | Tweet it! | Submit to Reddit | Forum Smashing Magazine



Post tags:

"