There seems to be three tiers of argument regarding the Federation Economy. Canonical references, Feasibility & Human Nature, and Trade & Barter.
As far as Canonical References are concerned, I think it's quite logical to believe that within the confines of the Federation, there is no monatary system required. I could see a barter or credit system installed, or even used by people trading items of value, but overall, there is no need. Think about most things that people spend money on today. Housing, Food, Clothing, Energy (Electric, Natural Gas, Gasoline), Communication and Commodity Items (Phone, Internet, Computers, Televisions, etc.), Vehicular Transportation, Taxes, Non-Renewable Supplies (Soap, Toilet Paper, Etc.). In a three person household, one being a child, a person is spending at least $600-1,000 a month in housing costs at low-to-mid income, an additional $300-1,000 a month in energy, $200-600 in vehicles if they are newly purchased or leased (including insurance), $100-300 in communications (providing Internet, Cable, Phone), $100-200 a week in food, God Knows with Taxes, $50-200 a month in Toiletries, and whatever other expenses. That averages out to be $1,650-$3,900 a month, or $19,800-$46,800 a year.
In the United States, that means that just in the above mentioned catagories, figuring 100 million households (average 3 per household, 2005 census was actually 113 million households), 1,980,000,000,000-$4,680,000,000,000 (~2-4.6 Trillion) is used every year in income, or for ease-sake we'll say 3.3 Trillion Median. And though I'm not going to discuss it beyond this point, medical expenses are not even mentioned here.
The medium income level per household in 2006 was approximately $48,000. Or $4,800,000,000,000 total (4.8 Trillion). So that means we as a country alone spend about 68.75% of all money made per year on the above mentioned items.
Now, say that in the future, energy is provided for free by the government, as is land, communications, food, or whatever other needs. That means that suddenly 68.75% of what people could potentially make are available for use in a generalized economy. On top of that, due to automation, the need for a huge workforce is reduced due to lack of working for menial jobs, such as farming, manufacturing (1 person could run a replicator), etc. I could see in this circumstance people writing because they want, acting because they want to, etc. Open source in this greedy world is starting to take root. People write for the joy of it in their spare time. During all of this 'I'll do what I desire', a branch of Starfleet, or the overall Government through enlistment, would be running the menial jobs that were needed, such as replicator patterns, data networks, energy production, etc.
As far as talking about canonical information, people tend to forget that if you do have something, whether it is replicated or not, you still OWN it. Even if you had to buy extra large things such as houses, land, boats, etc. with credits, money by and large is no longer used in everyday needs. So I don't think it too far off to say that the characters in Star Trek generally don't think of credits, in that estimation, as money. Everything that you need is already provided for.
Where I think the credit idea really would come into play is commerce among other powers. Especially powers that already have replication technology. Or even other worlds within the Federation. So say, for example, you are moving from Earth to Bajor. You no longer have use for that land on earth. I don't see it too far off to sell your house and land for credits to be converted to another currency system so you may move to another society that may not be compatible with the Terran Economic System.
Now, as far as human nature, people here have said that humans havn't changed much in 10,000 years. I would agree. However, the greed analogies to this aspect are not the root of human problems, nor the true driving force. Money in our society is power--- The power to control your own destiny, if not the destiny of others. So I do believe that, with the right combination of automation, replication, and the ability for the average person to do what they want in life, a Star Trek Socialist Economy is completely feasible, and very realistic (IF there are aliens out there who would be willing to trade with us, or we can learn this technology on our own).
Quick Edit: Not to even mention the impact that a world unifcation would cause, if there are aliens and humans learn to trade with them: Internal trade would be completely minor compared to an intergalactic economy.