Article on WCF configuration

27 06 2008

Based on some of my significant recent deep dives into WCF, I have written an article that talks about configuring WCF services.  Here is a link to the article.

http://www.devx.com/dotnet/Article/38407.

More readable version is here





Tim Russert - You will be missed

14 06 2008

When i  watch news channels and follow politics there is one name and one channel i always stop at

When Tim Russert is on the show.

Meet the press was such a great show and kept me

focused for an hour or so.

Of all the interviewers i have seen so far he is clearly the best. I had no option when his show was on, but to stop what i was doing and watch his show.When i change channels looking for a news channel, if i saw Tim, i knew what i was watching.

You will be missed Tim. May you rest in peace.

You will be missed





Dr Randy Pausch’s last lecture.

4 06 2008

This is a simply amazing video by Dr Randy Pausch. Every minute spent is worth your time. dont miss it.

I wanted to get his book. But found this video instead.

Here is the list of lessons learned

  • Loyalty is a two-way street.
  • Never give up.
  • You get people to help you by telling the truth. Being earnest. I’ll take an earnest person over a hip person every day, because hip is short term. Earnest is long term.
  • Apologize when you screw up and focus on other people, not on yourself.
  • Get a feedback loop and listen to it. … Anybody can get chewed out. It’s the rare person who says, oh my god, you were right. … When people give you feedback, cherish it and use it.
  • Show gratitude.
  • Don’t complain. Just work harder.
  • Be good at something, it makes you valuable.
  • Work hard.
  • Find the best in everybody. … No one is all evil. Everybody has a good side; just keep waiting, it will come out.
  • And be prepared. Luck is truly where preparation meets opportunity.




I like to move it move it

10 03 2008

This song is hilarious from the movie Madagascar.
Love the guy with the indian accent.
http://www.youtube.com/watch?v=O_r2psdrQkM





WCF MexTCP issue -There is already a listener on IP endpoint 0.0.0.0:portnumber

21 02 2008

If you happen to use mex endpoint together with other endpoints in a configuration file for your service, AND if you get error “There is already a listener on IP endpoint”, just remove the port number for the mex end point or if you want you can add the “portSharingEnabled” property in the binding configuration.

portSharingEnabled=”true”

Don’t use

Instead use

You still can WSDL Even if you don’t have port number

The error looks like this:

Service cannot be started. System.ServiceModel.AddressAlreadyInUseException: There is already a listener on IP endpoint 0.0.0.0:8081. Make sure that you are not trying to use this endpoint multiple times in your application and that there are no other applications listening on this endpoint. —> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted

at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)

at System.Net.Sockets.Socket.Bind(EndPoint localEP)

at System.ServiceModel.Channels.SocketConnectionListener.Listen()

— End of inner exception stack trace —

at System.ServiceModel.Channels.SocketConnectionListener.Listen()

at System.ServiceModel.Channels.BufferedConnectionListener.Listen()

at System.ServiceModel.Channels.ExclusiveTcpTransportManager.OnOpen()

at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)

at System.ServiceModel.Channels….

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.





Maximum message size quota for incoming messages (65536) has been exceeded.

28 01 2008

There are two errors that may be encountered at run time which relate to the amount of data being received by the client application.

1. The maximum message size quota for incoming messages (65536) has been exceeded.

2. Maximum number of items that can be serialized or deserialized in an object graph is ‘65536′.

In general, the first error will surface when the total number of bytes that the service is attempting to return exceeds the configuration values (the

default is 65536). To raise the total number of bytes that can be returned, the following changes are required:

In the Binding configuration(s):

<binding name=”YourBindingName”

maxBufferSize=”2147483647″

maxReceivedMessageSize=”2147483647″

…other values…

Note that the values being configured above are the maximums possible. It is advisable to configure only the highest values required. All three values

should be configured to the same values.

The second error (from above) may be encountered after making the first set of changes. The second error is caused by the total number of (.net) objects

being returned exceeding the configured value (default = 65536). This value is set on individual endpoints and is not usually explicitly set in the

configuration file. To increase this value, first create a new (or modify an existing) endpoint behavior.

Then assign this behavior to the endpoint receiving the error.

Note again that the value configured above is the maximum.

Powered by ScribeFire.





Why is there always an odd man out?

11 01 2008

My dad is a great speaker. When i was a kid I had a huge stage fright. I could barely speak in public. In school in my seventh grade, i would hardly be able to utter a few words. I remember a tip my dad had given among many others that, when on stage try to indentify the one or two people who can cause trouble by asking questions, early on in the speech and to look into the eyes of people while talking.

I took his advice then and I am glad I lost the fear of the stage. But in life i find there is always a odd man/wo man in every project i have worked on. This person’s sole job seems to be to cause trouble, to disagree or to argue for the sake of argument.

What a waste of time and energy working with such folks?. In some cases these are customers, some cases friends and in some colleagues.

If i put a dollar value to the amount of time spent in unnecassary arguements, i could be building a mansion for myself by now.

Here are some symptoms of such strange characters

1) they tend to talk abstract. They talk to the wall or the door instead of talking to you on your face

2) they agree to what you say in front of you, but once you leave they clap thier hands and do what they want.

3) they have power positions and take full advantage of that.

4) In order to cover their weakness they put the blame you.

5) They are typically in the same rank as you are at work and do not like the fact that you are in the same rank as them

6) They dont tell what they dont like about you directly, but complain to their boss or your boss to get rid of you

To Err is human -but with the odd man to err is a complete waste of time.

Find this person early on, there is one in every project. Have a plan. Stay clear of the OMO ( Odd Man OUt) if at all you can

So long….





Agile FAQ

29 11 2007

I now have another website now exclusively for agile definitions apart from my personal blog.

http://AgileFAQ.net

I often get asken similar questions an what a certain term means in Agile practices when i am out teaching / coaching on agile teams. I have started keeping a catalog of these questions that have been asked in teams before instead of thinking or making up something each time.

They are all intentionally small so that you can easily print them out.

Feel free to send me more definitions you want to add.





Connecting from windows to MYSQL on Ubuntu

7 11 2007

When using mysql server on ubuntu, there is a property called  bind-address in the /etc/mysql/my.cnf file. This forces mysql to only listen to localhost.

If you want to connect to mysql from a different box say windows, make sure you comment this line.

Then restrart my sql –  sudo /etc/init.d/mysql restart

Now login to mysql on comand prompt as root  - sudo mysql -u root -p
‘=Enter password

Create a brand new user with this syntax

grant all privileges on *.* TO ‘devuser’@'IP ADDRESS OF WINDOWS’ IDENTIFIED BY ‘NEW PASSWORD’ with grant option;
After this you can use a mysql client like navicat in windows to connect with user devuser, password NEW PASSWORD.

Note that when IP changes you would have to do this all over again.





The Pair Programming Virus

31 10 2007

Pun intented here.
If you do a lot of pair programming think again

here are some reasons why you should use your own keyboard at all times :)

1) Your pair has a virus ( real kind ) and is sneezing all over the keyboard
2) Your pair had a flu and is recovering from it.
3) Your pair is holding fries in one hand as he./she types and uses the keyboard with the same hand . Umm french fried keyboard.
4) You turn your pairs keyboard on the side and see all the food particles and dandruff fall.
5) Your pair went to the bathroom * enough said :)
If i have convinced you enough carry your own keyboard for pairing sessions and use purell when in doubt :)

Powered by ScribeFire.